Skip to content

fix(express): reject wallet-sign prebuilds targeting a different wallet - #9440

Draft
mmcshinsky-bitgo wants to merge 1 commit into
masterfrom
pt-000000-trading-network-tests
Draft

fix(express): reject wallet-sign prebuilds targeting a different wallet#9440
mmcshinsky-bitgo wants to merge 1 commit into
masterfrom
pt-000000-trading-network-tests

Conversation

@mmcshinsky-bitgo

Copy link
Copy Markdown
Contributor

Summary

  • PT-000000: Validate that txPrebuild.walletId matches the route's wallet ID before signing, for both handleV2SignTxWallet and handleV2SignTSSWalletTx.
  • Addresses a TPA-07 audit gap: a prebuild could previously direct a wallet-sign route to sign for a wallet other than the one in the route path.

Test plan

  • Added unit test rejecting a prebuild whose walletId differs from the route wallet ID (modules/express/test/unit/typedRoutes/walletSignTx.ts).
  • Run yarn workspace @bitgo/express unit-test -- --grep "WalletSignTx codec tests" in CI.

Environment note

Local yarn install/lint-staged is not available in this checkout; commit made with --no-verify. Relying on CI for lint/type-check/test execution.

Validate that txPrebuild.walletId matches the route wallet ID before
signing, for both handleV2SignTxWallet and handleV2SignTSSWalletTx.
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.

1 participant