T09 · Insecure Skill Coding Practices
- Location
scripts/wake-cli.py:94- Finding
Automatic x402 Payment Signing Without Local Transaction Constraints
- Content
View full analysis
int: """Run the verify flow: POST /verify, then poll until resolved.""" signer = load_signer(args.keypair) log(f"Signer address: {signer.address}") x402 = x402Client() register_exact_svm_client(x402, signer) async with x402HttpxClient(x402, base_url=args.base_url) as client: # Step 1: POST /api/v1/verify log(f"POST {args.base_url}/api/v1/verify") resp = await client.post( "/api/v1/verify", json={"phone": args.phone}, ) ``` ```python async def cmd_schedule(args: argparse.Namespace) -> int: """Run the schedule flow: POST /schedule.""" signer = load_signer(args.keypair) log(f"Signer address: {signer.address}") x402 = x402Client() register_exact_svm_client(x402, signer) body = { "phone": args.phone, "times": args.time, "voice": args.voice, } if args.hints: body["hints"] = args.hints async with x402HttpxClient(x402, base_url=args.base_url) as client: log(f"POST {args.base_url}/api/v1/schedule") resp = await client.post("/api/v1/schedule", json=body) ``` ```python parser.add_argument( "--base-url", default="https://wake.meup.ai", help="Base URL for the Wakeup API (default: https://wake.meup.ai)", ) ``` ### Technical Analysis The client registers a funded Solana keypair with the x402 client and then permits the HTTP client to handle payment negotiation automatically. No application-level control verifies the payment recipient, USDC mint, Solana network, transaction amount, or cumulative expenditure before a signature is produced. The documentatio ...[truncated 1879 chars]- Remediation
View remediation
