# OpenAPI OWASP API Top 10 & MCP Readiness PR Checklist — JWT & OAuth2 API Service
- **Score:** 85/100 (Grade B) — **HARDENED — OWASP & MCP READY**
- **Target Standard:** OpenAPI 3.1.0
- **Endpoints Modeled:** 10 ops (~1,490 MCP pre-prompt tokens/turn · $6.71/mo at 50 turns/day on $3/1M)
- **Reclaimable MCP Schema Diet:** 340 tokens/turn ($1.53/mo saved)
## Security & Schema Review Checklist
- [ ] **API2-AUTH (OWASP API2:2023)** — Explicit components.securitySchemes (Bearer JWT / OAuth2 scopes) + global/op security
- Missing components.securitySchemes or global security[] lets unauthenticated callers probe private routes (OWASP API2).
- [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.
- [x] **API8-TLS (OWASP API8:2023)** — HTTPS-only servers[] URLs (zero http:// prod) + strict CORS allowlist & headers
- Production servers[] enforce HTTPS-only URLs and strict origin allowlist CORS.
- [x] **API4-429 (OWASP API4 / API8)** — Explicit 401, 403 & 429 Too Many Requests responses with Retry-After / X-RateLimit-*
- 401, 403, and 429 Too Many Requests responses include Retry-After / X-RateLimit-* headers.
- [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 (~54 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.
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.
Why shouldn't I model Authorization as a normal header parameter in OpenAPI?
OpenAPI 3.0/3.1 explicitly ignores Authorization, Accept, and Content-Type header parameters in favor of `components.securitySchemes` — using `parameters` breaks Swagger UI auth buttons, SDKs, and gateway enforcement.
How do I mark a single public route like /health when global security is enabled?
Add `security: []` directly on that specific operation (`get:`) to override the root `security:` requirement explicitly.
Can RungLab check my domain's RFC 9728 OAuth metadata alongside OpenAPI?
Yes — use our Cluster 6 Agent Discovery Linter (/agent-discovery/) for RFC 9728 manifests and SpecDiff (https://spec.runglab.dev) for OpenAPI securitySchemes.