Safeguard
Security Guides•

DAST crawling or OpenAPI import: which gives better coverage?

Crawling finds what a browser can reach, an OpenAPI import lists what the API declares. Use both and compare the gaps. Here is how to decide per target.

Safeguard Security Team
3 min read

For websites with links and forms, crawling usually finds the pages. For APIs, importing an OpenAPI description gives the scanner a complete list of endpoints that a crawler would never see. The strongest setup uses both and compares what each found.

What each approach does

Crawling follows links and submits forms, like a visitor. It discovers what the front end exposes.

Spec import reads an API description. The OpenAPI Specification defines a language agnostic interface to HTTP APIs, so people and tools can understand a service without reading source code or watching traffic. A scanner given that file knows each path, method and parameter.

Where each one fails

CrawlSpec import
Single page apps with heavy scriptsMay miss routesNot relevant
REST endpoints not linked from any pageMissedFound
Undocumented or forgotten endpointsFound only if linkedMissed
Needs a maintained documentNoYes
Parameter types and required fieldsGuessedKnown

The spec only lists what the team documented. Old endpoints that nobody wrote down are exactly the ones that tend to be unprotected, and only observed traffic or a crawl may reveal them.

A practical plan

  1. Export the current API description from your build, not an old copy.
  2. Import it into the scanner and run a scan with a test account.
  3. Run a crawl or a proxy recorded session of the front end against the same target.
  4. Compare the endpoint lists. Anything seen in traffic but absent from the spec is a documentation gap and a risk to review.
  5. Repeat when the API changes.

Keep the OWASP lists in mind

The OWASP API Security Top 10 2023 is the second edition of a list first published in 2019. Its introduction advises teams with an app backed by an API to review both the relevant app focused list and the API list.

Common mistakes

Teams often import a spec and assume coverage is complete. Check the scan report for the number of endpoints tested against the number in the file, and look at which ones returned errors, since an endpoint that always fails to authenticate has not really been tested. Also confirm that the scanner uses realistic values for required parameters. Sending empty strings to every field usually produces shallow results, so supply sample data where the tool allows it.

Try it yourself

Click through it at your own pace, or open it full screen.

Watch how endpoints are listed and which ones raise findings.

Where Safeguard fits

Safeguard provides SBOM and dependency scanning, reachability analysis and policy gates. Try the free scan for the dependency side.

Quick check

Does a spec import replace authentication setup?

No. The scanner still needs valid credentials to reach protected endpoints.

What if my spec is out of date?

Regenerate it from code in the build. A stale file silently shrinks your coverage.

Sources

Last reviewed: 19 October 2026.

Never miss an update

Weekly insights on software supply chain security, delivered to your inbox.

Self-healing security runs on Safeguard.

Your first fix PR is minutes away.

No sales call required, even your agent can complete the purchase over MCP.