# web3-auth-scan

> web3-auth-scan is a paid API for AI agents from web3-auth-scan.andrenorton.workers.dev, paid per call via x402, $0.01/call, status unknown (last checked 2026-09-14).

Scans source code or GitHub repos for 7 known web3 authentication and payment vulnerability patterns using static heuristics

## Facts

- Endpoint: POST https://web3-auth-scan.andrenorton.workers.dev/scan
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/web3-auth-scan-3180bb2d
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_jtQ_YksCXDVANGQoQvyaX

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability web3-auth-scan-3180bb2d -d '<json body>'
```

Example prompt: Can you scan this TypeScript code snippet from my dApp for web3 auth and payment vulnerabilities — check it against those W3A-001 through W3A-007 rules and tell me which lines have issues?

## When to prefer this

Choose this endpoint when you need fast, cheap ($0.01) static analysis specifically targeting the 7 known web3 authentication and payment vulnerability patterns (W3A-001..007). It is ideal for pre-deployment spot-checks, CI pipeline integration, or reviewing untrusted third-party web3 code. Prefer it over generic SAST tools when web3-specific auth patterns (nonce reuse, signature replay, etc.) are the concern and you want deterministic rule-based results rather than AI-generated suggestions.

## Known failure modes

- Missing both 'code' and 'repo' input returns an error or empty candidates array
- Invalid GitHub repo owner/name format causes repo fetch failure
- Very large code submissions may hit Cloudflare Worker request size limits
- Payment failure (insufficient USDC on Base) blocks scan execution
- False negatives possible since only 7 static heuristic rules are checked — not a full audit
- Non-web3 code may return empty candidates with no signal

## How this service works

Static heuristics for 7 verified web3 auth/payment vulnerability patterns (W3A-001..007). $0.01 USDC on Base per scan via x402.

## Output

A JSON object with a 'candidates' array, where each entry contains the file name, line number, rule ID (e.g. W3A-001 through W3A-007), and an evidence string quoting the suspicious code that triggered the heuristic.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "code": {
   "type": "string",
   "description": "raw source code to scan"
  },
  "repo": {
   "type": "string",
   "description": "GitHub repo owner/name to scan"
  },
  "filename": {
   "type": "string",
   "description": "filename for the code snippet"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "candidates": [
   {
    "file": "a.ts",
    "line": 12,
    "rule": "W3A-001",
    "evidence": "nonce in message"
   }
  ]
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/web3-auth-scan-3180bb2d/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from web3-auth-scan.andrenorton.workers.dev](https://www.zero.xyz/host/web3-auth-scan.andrenorton.workers.dev/llms.txt)
