T09 · Insecure Skill Coding Practices
- Location
x402.md:65- Finding
Unvalidated Server-Directed Cryptocurrency Payment Authorization
- Content
View full analysis
"); const wallet = createWalletClient({ account, chain: base, transport: http() }); const client = new x402Client(wallet); const response = await client.fetch( "https://api.hlprivateer.xyz/v1/agent/positions" ); const data = await response.json(); ``` ### Technical Analysis The documented x402 flow requires the client to sign a cryptocurrency authorization derived from a server-provided challenge. Fields such as `network`, `asset`, `resource`, `payTo`, `maxAmountRequired`, and expiration constraints determine what asset can be transferred, to whom, for what amount, and for how long the authorization remains usable. The guide does not require the client to verify these values against a local policy before signing. In part ...[truncated 2451 chars]- Remediation
View remediation
