Preview

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.

example-api.securityexample
Checks
8
Passed
4
Failed
3
Warnings
1
  • API2
    failRejects 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

    11 / 12 ops
  • API2
    passRejects invalid credentials

    Every operation returned 401.

    Variation with a bogus bearer token / API key

    12 / 12 ops
  • API3
    failNo undeclared response fields

    GET /users/{id} returns password_reset_token, which the spec does not declare.

    JSON schema validation with additionalProperties: false

    10 / 12 ops
  • API3
    passNo stack traces in error responses

    No stack frames found.

    Scans 4xx bodies for Node, Python and Java stack frames

    12 / 12 ops
  • API4
    failOut-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

    35 / 36 ops
  • API8
    warnSecurity 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

    0 / 12 ops
  • API8
    passNo stack disclosure

    Server: nginx (no version).

    No X-Powered-By header, no version number in Server

    12 / 12 ops
  • API8
    passCORS is not wide open with credentials

    No credentialed wildcard origins.

    Access-Control-Allow-Origin: * never paired with Allow-Credentials: true

    12 / 12 ops

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.

AI agents

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.

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.
How agents find the gaps, and how to test your agent’s token

Portman tests what your API allows. It does not watch agent traffic at runtime; that is what API gateways and bot management do.

Free tool

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.

Test an API

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.

portman-config.security.json
{  "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.
Portman Cloud · exploring, not a product yet

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.

Star Portman685Portman is open source. A star helps other teams find it.