Auditing an OpenAPI File for Security Design Gaps
Use your OpenAPI description to find missing authentication, weak OAuth flows, tokens in URLs and unbounded inputs before the API ships.

Many API security problems are decided at design time and written down in the OpenAPI file long before anyone runs a scanner. Which operations need a token, which OAuth flows exist, what goes into the URL, what the server accepts in a body: it is all there. The OpenAPI Security Auditor reads that description and applies defensive checks drawn from the OWASP API Security Top 10 and current OAuth guidance.
Why audit the description
Reviewing the description is fast, needs no running environment and fits into code review. It catches gaps while they are still cheap to fix. It is not a substitute for testing the real service, because the server may enforce more or less than it documents, but it makes the documented contract safer and clearer for everyone who builds on it.
Transport and authentication
The first checks look at how clients connect. Server URLs and OAuth endpoints over plain http are high risk. A file with no security schemes at all is flagged. The auditor then works out the effective security for every operation, using the operation's own setting or the global default, and lists every operation that is public.
Public endpoints are not automatically wrong. Health checks, login and public catalogues are meant to be open. But a public write operation, or a public read on a path that looks like users, accounts or admin data, is flagged so a person confirms it is intended.
OAuth flows and scopes
Two OAuth flows are flagged as deprecated by the OAuth 2.0 Security Best Current Practice, RFC 9700. The implicit flow returns tokens in the browser address bar, and the resource owner password flow hands user passwords to the client. Authorization code with PKCE replaces both. Scopes named admin, all, root or an asterisk are flagged because they grant far more than most clients need. Smaller scopes such as orders:read and orders:write limit the damage a leaked token can do.
Secrets in URLs
API keys in the query string and parameters named like tokens, passwords or secrets in paths or queries are high risk. URLs are written to server logs, proxy logs, browser history and analytics tools, and they travel in Referer headers. Move these values to headers or request bodies.
Inputs and mass assignment
Request bodies are walked property by property. Objects that accept any extra property invite mass assignment, where a client sets a field the server binds without meaning to. Fields such as role, roles, permissions or isAdmin in request bodies are flagged unless marked readOnly. Strings without maxLength or pattern and arrays without maxItems are noted because unbounded input is a common route to resource exhaustion.
Errors and rate limits
Secured operations should document 401 and 403 responses, and every operation should document 429 when the API is rate limited, ideally with a Retry-After header. Clear error contracts help client developers back off correctly instead of retrying in tight loops.
Reading the score
High findings cost 10 points, medium 4 and low 1, with low findings capped at 20 points so a long list of minor documentation gaps cannot outweigh a real hole. The score maps to a letter grade from A to F. Work from the top: fix transport and authentication first, then OAuth, then data in URLs, then inputs and error documentation.
Limits
The auditor reads only the text you paste and never sends requests to your API. It cannot see gateway policies, server-side validation or rate limits that are not described, so a good grade means the description follows good practice, not that the service has been tested. Pair it with authorised security testing of the running system.



