Getting Started
Your First Scan

Your First Scan

This guide walks you through running a complete scan with NAT — from pointing it at your API to reading the results.

If you haven't installed NAT yet, start with the Installation guide.

Before you begin

You'll need:

  • NAT installed (pip install nat-engine)
  • The base URL of the API you want to test
  • (Optional) An OpenAPI/Swagger spec for faster endpoint discovery
⚠️

Only scan APIs you own or have explicit written permission to test. Unauthorized scanning may violate computer misuse laws.

Step-by-step walkthrough

Confirm NAT is installed

nat --version

Run a basic scan

The simplest scan just needs a target URL:

nat scan --url https://api.example.com

NAT will:

  1. Send probe requests to map the API surface
  2. Detect authentication mechanisms
  3. Prioritize endpoints by risk
  4. Execute tests and report findings in real time

Improve coverage with an OpenAPI spec

If you have an OpenAPI 3.x or Swagger 2.x specification, provide it to get immediate full endpoint coverage:

nat scan --url https://api.example.com --spec ./openapi.yaml

Scan with authentication

Most APIs require authentication. NAT supports several auth modes:

nat scan --url https://api.example.com \
  --auth-type bearer \
  --token "eyJhbGciOiJSUzI1NiJ9..."

See Authentication Configuration for all supported auth methods.

Read live output

While scanning, NAT streams findings to your terminal:

[NAT] Discovered 42 endpoints across 8 resource groups
[NAT] Starting security analysis...
[HIGH]  POST /api/v1/users — SQL Injection in 'email' parameter
[MED]   GET  /api/v1/orders/{id} — Broken Object Level Authorization
[LOW]   GET  /api/v1/products — Missing rate limiting
[NAT] Scan complete. 3 findings in 00:02:14

View the full report

Open the HTML report in your browser:

nat report --open

Or export to JSON for programmatic processing:

nat report --format json --output ./scan-results.json

Understanding scan results

Severity levels

LevelDescriptionExample
CriticalImmediate exploitable riskRemote code execution, full auth bypass
HighSignificant security flaw requiring urgent fixSQL injection, BOLA, broken auth
MediumExploitable under specific conditionsRate limit bypass, IDOR
LowBest practice or minor exposureVerbose error messages, missing headers
InfoInformational findingEndpoint enumeration result, tech stack detection

Finding details

Each finding includes:

  • Endpoint — exact path and HTTP method
  • Finding type — OWASP category and CWE identifier
  • Evidence — the exact request and response that triggered the finding
  • Risk score — 0–100 numeric score
  • Remediation — actionable fix guidance

Scan options reference

FlagDescriptionDefault
--urlTarget API base URLRequired
--specPath or URL to OpenAPI/Swagger specAuto-discover
--auth-typeAuth method (bearer, header, oauth2, none)none
--depthCrawl depth for endpoint discovery3
--timeoutPer-request timeout in seconds30
--concurrencyParallel request count5
--outputReport output path./nat-report.html
--formatReport format (html, json, sarif)html

See the CLI Reference for the full flag list.

Next steps