# OpenAPI OWASP API Top 10 & MCP Readiness PR Checklist — Public Edge & Webhook API
- **Score:** 80/100 (Grade B) — **HARDENED — OWASP & MCP READY**
- **Target Standard:** OpenAPI 3.1.0
- **Endpoints Modeled:** 10 ops (~1,410 MCP pre-prompt tokens/turn · $6.35/mo at 50 turns/day on $3/1M)
- **Reclaimable MCP Schema Diet:** 260 tokens/turn ($1.17/mo saved)
## Security & Schema Review Checklist
- [x] **API2-AUTH (OWASP API2:2023)** — Explicit components.securitySchemes (Bearer JWT / OAuth2 scopes) + global/op security
- Bearer JWT / OAuth2 securitySchemes and security[] requirements are enforced.
- [x] **API1-BOLA (OWASP API1:2023)** — Object-ID routes ({id}) enforce explicit 401/403 responses & tenant ownership scopes
- Parameterized {id} endpoints verify tenant ownership and document 401/403 status codes.
- [x] **API3-BOPLA (OWASP API3:2023)** — additionalProperties: false + readOnly: true on server-owned fields (role, id, plan)
- Request schemas lock additionalProperties: false and protect server fields with readOnly: true.
- [x] **API4-BOUNDS (OWASP API4:2023)** — maxLength, maxItems, maximum & bounded pagination (limit <= 100 / cursor) on inputs
- Strings, arrays, and pagination limits define strict maxLength, maxItems, and maximum bounds.
- [ ] **API8-TLS (OWASP API8:2023)** — HTTPS-only servers[] URLs (zero http:// prod) + strict CORS allowlist & headers
- Cleartext http:// server URLs or wildcard CORS with credentials expose tokens and cross-origin data (OWASP API8).
- [ ] **API4-429 (OWASP API4 / API8)** — Explicit 401, 403 & 429 Too Many Requests responses with Retry-After / X-RateLimit-*
- Missing 429 rate-limit contracts and Retry-After headers leave brute-force and scraping throttles undocumented.
- [x] **API9-INV (OWASP API9:2023)** — Versioned base paths + deprecated: true ops declare Sunset header & replacement path
- Deprecated endpoints publish Sunset headers and migration paths; zero shadow APIs.
- [x] **MCP-TOKEN (AI / MCP Readiness)** — Concise tool descriptions (<= 120 tok/op) & OpenAPI 3.1 type arrays (no nullable: true)
- Operation descriptions stay lean (~46 tok/op) and OpenAPI 3.1.0 avoids nullable drift.
## Automated Verification & Done-For-You Remediation
- Free Zero-Upload OpenAPI Diff & OWASP Audit: https://spec.runglab.dev
- $49 Done-For-You OpenAPI & MCP Remediation PR (Creem): https://www.creem.io/product/prod_4KoVJW4YEAf6XjjuSK44lp
- RapidAPI Live Endpoint (`POST /v1/openapi/audit`): https://hub.runglab.dev
- Remote MCP Tool (`audit_openapi_spec`): https://mcp-server.runglab.dev/
- Apify Cloud PPE Actor: https://apify.com/runglab/openapi-spec-diff-auditor
Zero-Upload SpecDiff$49 Remediation PR
Audit Full OpenAPI Specs or Ship a Hardened PR Today
Run a 100% browser-side breaking-change diff, OWASP API Top 10 scan & SARIF 2.1.0 export on SpecDiff (https://spec.runglab.dev), order a $49 Done-For-You OpenAPI & MCP Remediation PR on Creem, or automate via POST /v1/openapi/audit (API Hub), remote MCP tool audit_openapi_spec, and Apify Cloud PPE.
# 1. Lint CORS preflight rules across Workers/Nginx/Express/FastAPI/Next.js/Go:
# https://tools.runglab.dev/webhook-cors-debugger/
# 2. Generate strict CSP & HSTS configs (0-25 ReadyCheck score):
# https://tools.runglab.dev/security-headers/
# 3. Verify live production headers & TLS posture:
# https://audit.runglab.dev
Key Engineering Takeaways
Leaving `http://localhost:8080` or `http://staging...` as the first entry in OpenAPI `servers[]` causes generated SDKs and API docs users to accidentally send production keys over cleartext HTTP.
OWASP API8 pairs transport misconfiguration with permissive CORS (such as reflecting arbitrary `Origin` headers with `Access-Control-Allow-Credentials: true`) — test yours in our Cluster 7B CORS Preflight Linter.
Documenting `429 Too Many Requests` with `application/problem+json` and `Retry-After` prevents AI agents and retry loops from amplifying traffic spikes.
How to detect Broken Object Level Authorization (OWASP API1:2023) blindspots across {id} routes in OpenAPI 3.0/3.1 specs using explicit security scopes, tenant path bindings, and mandatory 401/403 contracts.
Close OWASP API3:2023 Broken Object Property Level Authorization (BOPLA) and Mass Assignment gaps by enforcing additionalProperties: false, readOnly server attributes, and strict request DTOs.
Should localhost http:// URLs ever stay in production OpenAPI specs?
Keep `http://localhost` out of deployed production specs or move it to local override files — published OpenAPI specs should list `https://` servers exclusively.
How do I validate that my API's live CORS headers match OWASP API8?
Use RungLab's Cluster 7B CORS Preflight Linter (/webhook-cors-debugger/) for your server stack and audit live response headers at https://audit.runglab.dev.
What media type is best for 401/403/429 error bodies in OpenAPI?
RFC 9457 `application/problem+json` gives SDKs and agents a predictable `{ type, title, status, detail }` contract without leaking stack traces.