Skip to content

Clean up error messages and checks in CCIP Solana msghasher.go#22287

Merged
vicentevieytes merged 2 commits intodevelopfrom
vv/sp-issues-cot-24-25
May 6, 2026
Merged

Clean up error messages and checks in CCIP Solana msghasher.go#22287
vicentevieytes merged 2 commits intodevelopfrom
vv/sp-issues-cot-24-25

Conversation

@vicentevieytes
Copy link
Copy Markdown
Contributor

Requires

Supports

Copilot AI review requested due to automatic review settings May 4, 2026 14:23
@vicentevieytes vicentevieytes requested a review from a team as a code owner May 4, 2026 14:23
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 4, 2026

👋 vicentevieytes, thanks for creating this pull request!

To help reviewers, please consider creating future PRs as drafts first. This allows you to self-review and make any final changes before notifying the team.

Once you're ready, you can mark it as "Ready for review" to request feedback. Thanks!

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 4, 2026

I see you updated files related to core. Please run make gocs in the root directory to add a changeset as well as in the text include at least one of the following tags:

  • #added For any new functionality added.
  • #breaking_change For any functionality that requires manual action for the node to boot.
  • #bugfix For bug fixes.
  • #changed For any change to the existing functionality.
  • #db_update For any feature that introduces updates to database schema.
  • #deprecation_notice For any upcoming deprecation functionality.
  • #internal For changesets that need to be excluded from the final changelog.
  • #nops For any feature that is NOP facing and needs to be in the official Release Notes for the release.
  • #removed For any functionality/config that is removed.
  • #updated For any functionality that is updated.
  • #wip For any change that is not ready yet and external communication about it should be held off till it is feature complete.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 4, 2026

✅ No conflicts with other open PRs targeting develop

@vicentevieytes vicentevieytes changed the title COT-24 Lack Of Lower Bounds Check On Integer Casting Clean up error messages and checks in CCIP Solana msghasher.go May 4, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Risk Rating: MEDIUM — changes affect Solana CCIP message hashing inputs; incorrect parsing can cause hash mismatches or unexpected failures when running via LOOP/gRPC.

This PR addresses a security/robustness gap in parseExtraDataMap by preventing negative int64 values (coming from LOOP/gRPC type coercion) from being silently cast into uint64 for AccountIsWritableBitmap, and updates several type-mismatch errors to reflect the additional accepted LOOP representations.

Changes:

  • Add a lower-bound check (v < 0) before casting int64 to uint64 for AccountIsWritableBitmap.
  • Improve error messages to reflect accepted types for ComputeUnits, AccountIsWritableBitmap, Accounts, and TokenReceiver.

Scrupulous human review recommended (targeted areas):

  • parseExtraDataMap numeric casting behavior for AccountIsWritableBitmap (int64 → uint64) when running through LOOP/gRPC, to confirm this matches the intended “valid range” semantics for the bitmap and won’t break any legitimate payloads.

Comment thread core/capabilities/ccip/ccipsolana/msghasher.go Outdated
@trunk-io
Copy link
Copy Markdown

trunk-io Bot commented May 4, 2026

Static BadgeStatic BadgeStatic BadgeStatic Badge

View Full Report ↗︎Docs

@vicentevieytes vicentevieytes force-pushed the vv/sp-issues-cot-24-25 branch from 5b00ef2 to a5aef28 Compare May 4, 2026 19:59
@cl-sonarqube-production
Copy link
Copy Markdown

Quality Gate failed Quality Gate failed

Failed conditions
B Maintainability Rating on New Code (required ≥ A)
8.33% Technical Debt Ratio on New Code (required ≤ 4%)

See analysis details on SonarQube

Catch issues before they fail your Quality Gate with our IDE extension SonarQube IDE SonarQube IDE

@vicentevieytes vicentevieytes enabled auto-merge May 5, 2026 13:03
@vicentevieytes vicentevieytes added this pull request to the merge queue May 5, 2026
@github-merge-queue github-merge-queue Bot removed this pull request from the merge queue due to failed status checks May 5, 2026
@vicentevieytes vicentevieytes added this pull request to the merge queue May 6, 2026
Merged via the queue into develop with commit c426715 May 6, 2026
210 of 211 checks passed
@vicentevieytes vicentevieytes deleted the vv/sp-issues-cot-24-25 branch May 6, 2026 03:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants