Repository navigation
Conversation
Verify contractCall, customTx, and their kebab-case aliases (contract-call, custom-tx) in AbstractEthLikeNewCoins.verifyTssTransaction instead of returning true unchecked. Require exactly one declared recipient and compare decoded to, value (default 0), and calldata against it, throwing TxIntentMismatchRecipientError on any mismatch or when zero or multiple recipients are supplied. Exempt the kebab-case aliases from the generic missing-txParams guard so they reach the same fail-closed check. Leave NO_RECIPIENT_TX_TYPES and non-EVM coins unchanged. Ticket: CECHO-2680 Co-authored-by: Ralph CLI <ralph-cli@bitgo.com> Ralph: 18.13.2-bitgo.13 openrouter/google/gemini-4-neon@default openrouter/z-ai/glm-5.3-flash@smol:low+commit:high+memory:low openrouter/anthropic/claude-opus-5.5@slow:high+plan:xhigh openrouter/openai/gpt-6.1-terra@vision:low+advisor:medium openrouter/deepseek/deepseek-v4.1-flash-1017@task:high openrouter/inclusionai/ling-3.1-flash@tiny:low openrouter/moonshotai/kimi-k3.1-pro@designer:high openrouter/google/gemini-3-pro-image@image web/exa@web openrouter/microsoft/mai-transcribe-2@dictation openrouter/typesafe/jev-1.14@judge
There was a problem hiding this comment.
Claude Code Review
This repository is configured for manual code reviews. Comment @claude review for a one-time review, or @claude review always to subscribe this PR to a review on every future push.
Tip: disable this comment in your organization's Code Review settings.
Contributor
Contributor
|
|
This was referenced Nov 19, 2026
verifyTssContractCall decoded a TransactionBuilder round trip, which drops calldata shorter than a selector and trailing bytes after recognised calls, so the check could pass bytes that differ from what is signed. Decode the serialized transaction directly. Restore coverage that a wrapper approve relabelled as customTx is still rejected. Ticket: CECHO-2680
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Hardens
AbstractEthLikeNewCoins.verifyTssTransaction(modules/abstract-eth/src/abstractEthLikeNewCoins.ts) forcontractCall,customTx, and their kebab-case aliases (contract-call,custom-tx), which previously returnedtruewith only a warning and without inspectingto,value, ordata.Behavior implemented (match-and-validate)
txPrebuild.txHexand requires exact match onto,value(defaulting declaredamountto'0'when omitted), anddata(defaulting empty to'0x'). Any mismatch throwsTxIntentMismatchRecipientError.TxIntentMismatchRecipientError.TxIntentMismatchRecipientError.contract-callandcustom-txare exempted from the genericmissing txParamsguard so they reach the same fail-closed check as camelCase.NO_RECIPIENT_TX_TYPESin@bitgo/sdk-coreis untouched, so non-EVM coins (e.g. Solana/Aptos/SuicustomTx, ProvenancecontractCall) are unaffected.modules/sdk-coin-eth/test/unit/tssPaymentVerification.ts: replaced the pinnedcontractCallwarning test with 26 regression tests covering all 4 spellings (matching call, mismatched destination/value/calldata, missing/empty recipients, >1 recipients, and default-0 value / empty calldata).modules/sdk-coin-eth/test/unit/eth.ts: moved 7 TSS wrapper-approve tests fromcustomTx(with 0 recipients) totokenApprovalso they keep exercisingassertWrapperApproveIsDeclared.Design reconciliation: match-and-validate vs. unapproved reject-all proposal
contractCall/customTxon EVM TSS even when recipients are supplied, explicitly noting it was a proposal and did not change the ticket description. Because that scope change has not been approved, this PR does not silently adopt it. If reviewers prefer unconditional rejection, it is a small follow-up change inverifyTssContractCall.Production compatibility, limits, and known gaps
MARTS.WALLET_PLATFORM.BITGO2__TRANSACTION_REQUEST(INTENT+INTENTS[]) for Nov 5–19, 2026 shows 0 EVMcontractCall/customTxrequests (only SolanacustomTx, 125 distinct requests), consistent with the earlier full-history check.contractCall/customTxwith 0 recipients will now throw (breaking change for that shape).EvmCoinbypass: Non-EIP-1559 chains routed throughEvmCoin.verifyLegacyTssTransaction(e.g. legacyEvmCoinpaths tracked in CECHO-2681 / CECHO-2683) are not protected by this PR.sdk-coin-tempooverridesverifyTransactionwith its own verifier and is unaffected.v54.4.0. This PR does not claim INFOSEC-671 is closed or release-ready.Issue Number
CECHO-2680 (related: INFOSEC-671, CECHO-2460)
Type of change
contractCall/customTxwith 0 or >1 recipients or mismatchedto/value/data)How Has This Been Tested?
distonhbarevm):contractCallmismatch →true,customTxno recipients →true,contract-callmismatch →true,custom-txempty recipients →true;transfercontrol threw.TxIntentMismatchRecipientError; matchingcontractCall/customTxpass; 2-recipient case throws;transfercontrol throws.@bitgo/sdk-coin-eth: 602 passing@bitgo/abstract-eth: 188 passing@bitgo/sdk-coin-evm: 40 passing@bitgo/sdk-coin-bsc: 45 passing@bitgo/sdk-coin-xdc: 65 passing@bitgo/sdk-coin-flr: 61 passing@bitgo/sdk-coin-ethlike: 55 passing@bitgo/sdk-coin-polygon: 71 passing@bitgo/sdk-core(test/unit/bitgo/utils/tss/recipientUtils.ts): 44 passingmodules/bitgo/test/v2/unit/pendingApproval.tshad 32 passing / 3 failing (tbtcrecreate + 2keychains.tsTypeErrors); verified identical 3 failures on stashed unmodifiedorigin/master.eslint --quiet .andprettier --checkclean onmodules/abstract-ethandmodules/sdk-coin-eth.