OpenAPI and REST API security scanner

Run the scanner in --profile api mode to suppress browser UI noise, validate an OpenAPI 3.x or Swagger 2.0 contract, and verify whether protected endpoints enforce authentication.

API checks in --profile api mode

Check areaRule IDsBehavior
OpenAPI server URLsAPI-OPENAPI-INSECURE-SERVERFlags cleartext http:// servers declared in OpenAPI 3.x or Swagger 2.0 documents.
Credentials in query stringAPI-OPENAPI-KEY-IN-QUERYReports apiKey security schemes configured to send tokens in URL query parameters.
Unprotected spec routesAPI-OPENAPI-UNPROTECTED-SPECFinds state-changing routes in the specification without security requirements.
Anonymous access parityAUTH-MISSING-ENFORCEMENTProbes GET routes marked as secured without auth headers and flags HTTP 200 API payloads.
JWT inspectionAUTH-JWT-ALG-NONE, AUTH-JWT-NO-EXPChecks observed JSON Web Tokens for insecure alg: none headers and missing exp claims.
Stack traces and headersINFO-API-STACKTRACE, INFO-INTERNAL-HEADERFinds unhandled runtime stack traces and internal upstream headers returned in JSON responses.

Audit an API with an OpenAPI spec and bearer token

web-vuln-scanner https://api.example.com --profile api \
  --openapi openapi.json \
  -H "Authorization: Bearer $API_TOKEN" \
  --sarif api-audit.sarif

Auth headers supplied through -H are sent strictly to the target origin and stripped before unauthenticated parity checks or cross-origin CORS tests run. Saved JSON, HTML, and SARIF reports automatically mask header secrets.

Frequently asked questions

Can I pass a remote OpenAPI JSON URL instead of a local file?

Yes. Pass either a local file path (--openapi openapi.json) or a same-origin URL (--openapi https://api.example.com/openapi.json).

Will anonymous parity probes modify database records?

No. Automatic OpenAPI probes only send read-only GET requests, and --no-unauth-check disables unauthenticated probing completely.

Related guides

CORS misconfiguration scanner

Test Access-Control-Allow-Origin reflection and credential flags.

Frontend secret leak detector

Detect masked AWS, Stripe, GitHub, and PEM private keys in responses.

Baseline diffing in CI pipelines

Keep auth context consistent when comparing JSON baselines.