`zap-baseline.py` fails the pipeline with exit code 2 even though the report has no high-risk alerts
BeginnerTroubleshootingDAST, runtime detection and compliance scans
Answer
Likely causes → The ZAP packaged scans exit with 1 when there are FAIL-level alerts, 2 when there are only WARN-level alerts, and 3 on errors. By default every rule is WARN, so any finding returns 2.
Diagnose → Read the summary at the end of the log, for example FAIL-NEW: 0 WARN-NEW: 7.
Fix → Generate a rules file, decide per rule, and run with it:
zap-baseline.py -t https://staging.acme.com -g gen.conf # generate defaults
# edit to: 10038 FAIL (Content Security Policy Header Not Set) ; 10027 IGNORE ...
zap-baseline.py -t https://staging.acme.com -c rules.tsv -I # -I: don't fail on WARN
Prevent → Version the rules file and review IGNORE entries the way you review scanner suppressions.
More on 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 findingsIntermediateThe authenticated ZAP full scan only ever tests the login page and `/logout`, and the report shows mostly `302` responsesIntermediateThe DAST job reports nothing, and its log shows mostly `403` and `429` responsesBeginnerAn active DAST scan against staging created 12,000 junk records and sent password-reset emails to real customer addresses copied from prodIntermediateNuclei runs in CI against staging and reports nothing for a known exposed `/.git/config`BeginnerFalco pods are in `CrashLoopBackOff` on new nodes after an OS upgrade, logging `Unable to load the driver`Intermediate