The problem
When you first scan an existing project, you might see:--fail-on critical in CI, but the build would fail immediately because of pre-existing issues. The baseline solves this: save the current state once, and from then on CI only fails on findings that weren’t there before.
How baseline works
Save the current state
Run a scan with This creates
--baseline to record all current findings as the acknowledged baseline:.drako/.baseline.json in your project directory. The file stores SHA-256 fingerprints of each finding — no raw code snippets are stored, so secrets that appear in findings aren’t accidentally committed.Commit the baseline file
Add the baseline file to version control so it’s shared across the team:The
.drako/.last_scan.json cache file is automatically gitignored by Drako.Baseline commands
drako baseline show output:
Behavior details
- The governance score always reflects all findings — the score is your real posture, not a filtered view. Baselined findings still count against the score.
- CI pass/fail is based on new findings only —
--fail-on criticalwill not trigger on baselined CRITICAL findings, only on newly introduced ones. - SARIF output marks baselined findings as
"baselineState": "unchanged"so GitHub Code Scanning shows them as pre-existing rather than new alerts. - The baseline file is team-shared — committing
.drako/.baseline.jsonmeans all developers and CI pipelines see the same baseline state.