| API1 Broken Object Level Authorization | Data is read-only intelligence with no per-user objects; a key can only read its own metadata (/me). Responses use explicit field lists. |
| API2 Broken Authentication | Hashed (SHA-256) keys with a fixed format; one generic message for unknown/expired/revoked keys; 20 failed attempts/min per client → 429; expiry and revocation; constant-time secret comparison for webhooks and cron. |
| API3 Broken Object Property Level Authorization | No SELECT *: every endpoint returns an allow-listed set of fields. Internal columns (raw feed payloads with attacker .onion links, verification flags) are never exposed. |
| API4 Unrestricted Resource Consumption | Per-key per-minute rate limit and monthly quota, capped page sizes and offsets, 429 + Retry-After. Internal search/export are limited per client. |
| API5 Broken Function Level Authorization | Scopes per endpoint (403 insufficient_scope). Key management is SQL-only (not exposed over HTTP); scheduled jobs need a secret. |
| API6 Unrestricted Access to Sensitive Business Flows | Payments: price fixed on the server, plan taken from the server-created order, webhook HMAC verified in constant time, each event processed once. |
| API7 Server Side Request Forgery | The API never fetches user-supplied URLs. Ingestion only calls a fixed allow-list of feeds with timeouts. |
| API8 Security Misconfiguration | Database row-level security with no anonymous reads; CSP, X-Frame-Options, nosniff, Referrer-Policy, Permissions-Policy, HSTS; no X-Powered-By; Cache-Control: no-store; RFC 9457 errors with no stack traces. |
| API9 Improper Inventory Management | OpenAPI 3.1 spec generated from the code (single source of truth), versioned paths (/v1), changelog, legacy plaintext keys retired. |
| API10 Unsafe Consumption of APIs | Third-party feed data is validated and sanitised; .onion links are dropped; headlines sent to the AI model are fenced as untrusted data (prompt-injection defence). |