I've been auditing APIs for a while now, and there's a pattern that keeps coming up. Teams spend weeks getting their endpoints working, tests pass, deployment is clean. But the OpenAPI (or Swagger) file sitting in the repo tells a different story.
The spec is often treated as documentation. But from a security perspective, it's a declaration of your attack surface.
Here are the three things I check first in any spec audit, based on the OWASP API Security Top 10:
**1. Missing Security on Sensitive Endpoints (API1/API2)**
The most common and dangerous finding. An endpoint like GET /users/{id} that returns PII but has no security block defined in the spec is effectively declaring itself public . If your gateway or generated code trusts the spec, that endpoint ships without auth.
**2. Unbounded Input Schemas (API3)**
A string field without maxLength or pattern is an invitation for resource exhaustion or injection attempts . If you're accepting user input, the spec should define the boundaries. No boundaries means no enforcement at the schema level.
**3. API Keys in Query Parameters (API2)**
This one is subtle but common. If your spec shows api_key as a query parameter instead of a header, you're leaking credentials into server logs, browser history, and referrer headers . It's a design flaw that's hard to fix after clients integrate.
**Why I'm posting this:**
I got tired of manually grepping through YAML files looking for these issues, so I built a tool called Cloakwave that uploads an OpenAPI/Swagger spec and returns a report of potential security findings like the ones above. It's not a replacement for a full pentest it's a quick sanity check before the spec becomes code.
If you want to try it on one of your own specs, the link is in my profile (trying to respect the sub's self-promo norms here).
**Genuine question for the community:** For those of you doing API security reviews, what's the spec-level issue you see most often? I'm curious whether my findings match what others are seeing in the wild.