Teams inheriting legacy web applications cannot fix every low-priority header on day one. Baseline diffing lets CI pipelines enforce zero regressions while keeping existing accepted issues tracked separately.
Save a known JSON baseline report with --json baseline.json, then compare future runs against it:
web-vuln-scanner https://staging.example.com --baseline baseline.json --fail-on-regression
| Bucket | Meaning during diffing |
|---|---|
| New issues | The deterministic finding fingerprint was absent in the baseline JSON. |
| Worsened issues | The finding existed earlier, and its severity increased. |
| Resolved issues | The finding disappeared and its check category ran cleanly in the current scan. |
| Unverified issues | The category timed out or hit the request budget, so resolution could not be confirmed. |
The diff engine verifies that the scan profile (web vs api) and --auth-context label match the baseline before comparing findings. For local auditing across sprints, pass --project my-app --save-run to store history and finding triage states in local configuration storage.
It exits with status code 2 when new or worsened issues are detected, matching --fail-on severity threshold behavior.
Comparing an anonymous scan against an authenticated scan produces misleading diffs on protected pages. Enforcing matching auth context prevents false resolved alerts.
Combine baseline files with SARIF alerts inside pull request workflows.
Review --project, --save-run, and --max-requests flags.
Understand CheckOutcome coverage tracking behind unverified diffs.