Security regression tests from your OpenAPI spec
Your spec already says which endpoints need a token, which fields a response may contain and which inputs are valid. Portman turns that into checks that fail the build when the API stops matching, mapped to 4 of the OWASP API Security Top 10.
- API211 / 12 opsfailRejects requests without credentials
GET /invoices/{id} returned 200 without a token. The spec requires bearerAuth.
Variation per operation with auth removed; expects 401 or 403
- API212 / 12 opspassRejects invalid credentials
Every operation returned 401.
Variation with a bogus bearer token / API key
- API310 / 12 opsfailNo undeclared response fields
GET /users/{id} returns password_reset_token, which the spec does not declare.
JSON schema validation with additionalProperties: false
- API312 / 12 opspassNo stack traces in error responses
No stack frames found.
Scans 4xx bodies for Node, Python and Java stack frames
- API435 / 36 opsfailOut-of-spec input is rejected with a 4xx
POST /invoices with limit=10001 (maximum 100) returned 500.
Fuzzing: missing required fields, values past minimum / maximum / maxLength
- API80 / 12 opswarnSecurity headers
X-Content-Type-Options is missing on all responses. HSTS is present.
Strict-Transport-Security and X-Content-Type-Options: nosniff on every response
- API812 / 12 opspassNo stack disclosure
Server: nginx (no version).
No X-Powered-By header, no version number in Server
- API812 / 12 opspassCORS is not wide open with credentials
No credentialed wildcard origins.
Access-Control-Allow-Origin: * never paired with Allow-Credentials: true
Illustrative report for a fictional invoicing API. Every check runs as a Postman test in Newman, so failures show up in CI next to your contract tests.
Agents probe your API all day. Close the gaps before they find them.
AI agents call APIs with real credentials, chain tools no one designed together, and retry until something works. Prompt injection can turn a trusted agent against the data it can reach. Your API is the last line: whatever it allows, an agent will eventually do.
- 49.8%
of organizations confirmed or suspected an AI agent took an action nobody intended or authorized in the past year.
Salt Security, State of Agentic AI and API Security 2H 2026 - 12.5×
growth in AI-driven bot activity in 2025. 27% of bot attacks target API endpoints, mostly with valid, well-formed requests.
Thales 2026 Bad Bot Report, via Help Net Security - 48%
of AI agents in production run without security or monitoring, while agent fleets doubled in four months.
Gravitee, State of AI Agent Security 2026
- An agent calls an endpoint it was never meant to reach
- Every operation must reject missing and forged credentials, and tokens without the right scope when you supply one. Checked on every build, including endpoints added last week.
- An agent reads, and repeats, everything in a response
- Strict schema checks fail when a response carries fields the spec does not declare, before an agent can forward them.
- An agent sends inputs no human would type
- Fuzzed requests must get a clean 4xx. A 500 or an accepted out-of-range value is a gap an agent will find by trial and error.
- An agent learns your API from the spec
- Agents and MCP tools trust the OpenAPI spec literally. Contract tests keep the API and the spec in agreement, so the agent does what the spec says.
Portman tests what your API allows. It does not watch agent traffic at runtime; that is what API gateways and bot management do.
Is your API ready for post-quantum encryption?
Test any API host for post-quantum key exchange in a few seconds, or add --checkTls to your Portman run.
Built from what Portman already does
No new runtime and no agent. The security preset is a Portman config: strict schema validation, a variation per operation with the credentials removed or forged, fuzzed inputs, and header assertions. Merge it into your existing config and run it in the same pipeline.
The auth checks run on every operation, even when the spec never documents a 401. A new endpoint that forgets its auth middleware fails on the first build.
{ "tests": { "contractTests": [ { "openApiOperation": "*::/*", "schemaValidation": { "enabled": true, "additionalProperties": false } } ], "variationTests": [ { "openApiOperation": "*::/*", "variations": [ { "name": "No credentials", "overwrites": [ { "overwriteRequestSecurity": { "remove": true } } ], "tests": { "extendTests": [ { "tests": [ "pm.test('Rejected', () =>", " pm.expect(pm.response.code)", " .to.be.oneOf([401, 403]))" ] } ] } } ] } ] }}What it doesn't do
Use it next to a scanner and a pentest, not instead of them.
- SQL injection, SSRF, XSS
- It won't find these. Portman has no attack payloads, so you still need a DAST tool such as ZAP, Burp or StackHawk.
- Shadow endpoints
- It only tests what's in the spec. Endpoints the spec doesn't list stay invisible to it.
- Who can see whose data
- Authorization testing (OWASP API1 and API5) needs tests you write, with real test users per tenant.
- Proof of security
- It never proves something is secure, only that the API matches the spec.
Run these checks on every API, every day
The preset runs in your CI today. We’re exploring a hosted service for teams with many APIs that need these checks to run continuously, not only on pull requests.
- Scheduled security runs against staging and production
- One security policy enforced across all your APIs
- Findings grouped by OWASP category, with history
- Alerts when an endpoint stops requiring auth
The Portman CLI stays free and Apache 2.0. Nothing it does today moves behind a paywall.
Try it
Copy portman-config.security.json from the security example, point Portman at your spec and run it with Newman.