T09 · Insecure Skill Coding Practices
- Location
scripts/api_handler.py:6- Finding
Payment Verification Can Be Bypassed or Forged
- Content
View full analysis
0.001: return {"status": "error", "message": "支付金额不匹配"} return {"status": "verified", "price": price, "transaction_id": payment_credential.get('transactionId', '')} ``` ### Technical Analysis The manifest declares `requires_wallet: true`, but `handle_request()` only performs payment verification when `payment_credential` is truthy. An omitted or empty credential therefore skips the payment check and proceeds to the success response. When a credential is supplied, `verify_payment()` trusts caller-controlled fields such as `payStatus`, `paidAmount`, and `transactionId`. It does not verify a cryptographic signature, consult an authoritative payment provider, validate the payment recipient or currency, bind the transaction to the requested task, or prevent transaction replay. Consequently, both of the following requests can pass the payment gate: 1. A request with no payment credential. 2. A reques ...[truncated 1715 chars]- Remediation
View remediation
