Interview Prep/DevSecOps/DAST, runtime detection and compliance scans

The ZAP baseline scan of your React SPA finishes in 40 seconds with only header warnings and no real findings

IntermediateTroubleshootingDAST, runtime detection and compliance scans
Answer

Likely causes → The traditional spider only follows <a href> links in HTML. A client-rendered SPA serves one near-empty index.html, so ZAP never discovers the routes or the API calls behind them. Baseline is also passive only.

Diagnose → Check the "URLs found" count in the report or the -d debug output. If it shows a handful of static assets, the crawl failed.

Fix → Enable the AJAX spider (-j), which drives a headless browser. Better still, test the API directly from its OpenAPI spec:

docker run --rm -v "$PWD:/zap/wrk" ghcr.io/zaproxy/zaproxy:stable \
  zap-api-scan.py -t https://staging.acme.com/openapi.json -f openapi -r api-report.html

Prevent → Treat API scanning (from the spec) as the main DAST signal for SPAs, and keep the baseline scan for headers and cookies.

All DevSecOps questions Roadmap: Policy as code

More on DAST, runtime detection and compliance scans