Skip to content

security: fail closed on untrusted payment targets (AIFINP-62) - #10

Draft
coinsecuritiescompany wants to merge 29 commits into
mainfrom
agent/fix-aifinp-62
Draft

security: fail closed on untrusted payment targets (AIFINP-62)#10
coinsecuritiescompany wants to merge 29 commits into
mainfrom
agent/fix-aifinp-62

Conversation

@coinsecuritiescompany

@coinsecuritiescompany coinsecuritiescompany commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

Outcome

Blocks untrusted 402 metadata before wallet signing across Node, MCP and Python. Solana payment signing is quarantined because deployed contract v0.5.3 is replay-unsafe.

Node SDK 1.7.1

  • binds EVM chain, splitter, runtime codehash, v1.2 ABI, treasury/owner, fee policy, provider merchant and validity window
  • rejects RPC error, wrong chain/codehash, EOA/empty code, stale entry, target/version/merchant/royalty/fee mismatch
  • removes dynamic ABI detection, RPC fallback and all v1.1 payMatic signing
  • enables only Polygon v1.2 Safe governance; quarantines Base/Optimism/Unichain/BOT/XRPL EVM
  • disables standard x402 EIP-3009 signing until asset/payTo/domain/decimals have a signed registry
  • corrects the legacy Solana builder to the deployed v0.5.3 IDL for audit evidence, but makes it unreachable from the wallet path
  • always rejects Solana payment signing with solana_route_disabled_pending_v0_6_upgrade until replay-safe contract PRs #1 and #2 are deployed and bound to a verified ProgramData hash/upgrade authority

MCP 1.4.1

  • builds against this PR's local SDK in CI
  • declares tweetnacl and bs58 directly (previous build depended on transitive hoisting)
  • inherits the same EVM validation and Solana quarantine

Python 1.3.1

  • mirrors exact Polygon quote/runtime validation and removes v1.1/treasury fallbacks
  • mirrors Solana metadata validation but blocks the signing route before RPC/transaction construction

Validation performed

  • Node TypeScript build after quarantine: passed
  • Node focused payment suite after quarantine: 38 passed
  • Node offline suite before Solana follow-ups: 81 passed
  • Node publish tarball: passed
  • MCP build against published dependency: passed
  • MCP build against local Node 1.7.1: passed
  • MCP bin syntax + tarball: passed
  • Python compileall after quarantine: passed
  • version gate: Node 1.7.0→1.7.1, MCP 1.4.0→1.4.1, Python 1.3.0→1.3.1

Validation not performed locally

  • The environment rejected the post-Solana full Node-suite rerun after reaching its execution usage limit. The 38 payment-critical tests are post-patch; 81/81 is pre-follow-up evidence.
  • Python pytest dependencies could not be installed for the same reason. CI must run the existing Python suite plus 30 target-validation tests.
  • This PR must not be marked ready if either CI job is red.

Explicit remaining acceptance gaps

  • Jira requires a signed registry/signer policy. No root public key, threshold, rotation procedure or signed registry document exists in connected sources.
  • Solana v0.6.0 must compile/test, pass independent review, be upgraded by the verified authority, and publish ProgramData hash + generated IDL before SDK work can replace the quarantined v0.5 builder.
  • Standard x402 signing and remote registry updates remain disabled.

Latest GitHub commit: 2215372337e5d1437bf90a3b342d96c15e83110b.
Local equivalent: 6f9ae92.

Partially satisfies AIFINP-62 pending signed-root policy, CI, contract deployment evidence, and reviewer approval.

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