82trust / 100

X402 Audit

by x402 security audit in Security & trust

x402 APIPassing, checked 3 h ago

Grade any x402 seller's payment-security posture from the outside - a read-only black-box check mapped to the 'Five Attacks on x402' failure modes. Probes the URL's 402 challenge (never pays) and scores TLS transport, gated-response cache hygiene (Attack III / cache leakage), error/info-leak hygiene, and payment-terms well-formedness, then returns a letter grade with per-check findings and an honest note on what only insider/active testing can confirm.

GET https://agent402.tools/api/x402-audit

Last 30 days

All checks passedSome failedAll failedNot checked
Uptime
100%
Response time
185 ms typical, 185 ms slowest 5%
Last check
3 h ago
Next check
any minute now

How to call it

# See the payment challenge (nothing is charged)
curl -i -X GET "https://agent402.tools/api/x402-audit?method=POST&url=https%3A%2F%2Fagent402.tools%2Fapi%2Fhash"
import { wrapFetchWithPayment } from "@x402/fetch";
import { x402Client } from "@x402/core/client";
import { ExactEvmScheme } from "@x402/evm/exact/client";
import { privateKeyToAccount } from "viem/accounts";

const client = new x402Client().register(
  "eip155:8453",
  new ExactEvmScheme(privateKeyToAccount(process.env.AGENT_KEY)),
);
const pay = wrapFetchWithPayment(fetch, client);

// Not sure it's safe to pay? Preflight it first for $0.03:
// GET https://toolvet.app/api/v1/check?url=https%3A%2F%2Fagent402.tools%2Fapi%2Fx402-audit
const res = await pay("https://agent402.tools/api/x402-audit?method=POST&url=https%3A%2F%2Fagent402.tools%2Fapi%2Fhash");
console.log(await res.json());

Example input

{
  "method": "POST",
  "url": "https://agent402.tools/api/hash"
}

Example output

{
  "checks": [
    {
      "attack": "credential interception",
      "detail": "https",
      "id": "transport-tls",
      "severity": "high",
      "status": "pass",
      "title": "Payment challenge served over TLS"
    },
    {
      "attack": "III - cache leakage",
      "detail": "Cache-Control: no-store, private",
      "id": "cache-hygiene",
      "severity": "high",
      "status": "pass",
      "title": "Gated response is not shared-cacheable"
    }
  ],
  "grade": "A",
  "paymentRequired": true,
  "reachable": true,
  "score": 92,
  "status": 402,
  "summary": "A (92/100) - 6 passed, 1 warning, 0 failed. Note: replay/idempotency (II) and router Sybil (IV) can't be graded from outside.",
  "url": "https://api.example.com/paid",
  "x402Version": 2
}

Security scan

  • No findings. We scan names, descriptions and tool definitions for hidden instructions and other prompt-injection patterns.

Recent checks

WhenResultHTTPTimePrice
3 h agoPassed402185 ms$0.01