Guides · ← All guides · Published November 14, 2026 · Reviewed November 14, 2026 · Ingenious AI team · 7 min read
Eval Exposure Checks in CI: Baseline Diffs and the Block Verdict
A scanner becomes a gate when its output is a verdict a pipeline can read. The contract is deliberately small: a JSON diff and an exit code.
The short answer: save a clean scan as the baseline, then diff every new scan against it: the CI verdict blocks — exit code 1 — when the current scan introduces an exposure the baseline did not have, and passes with exit code 0 otherwise. New exposures are reported distinctly from pre-existing and resolved ones, so a pipeline failure names exactly the regression, not the whole backlog. There is no hosted CI integration claimed: the contract is the JSON plus the exit code, documented on /docs, and any CI system that can run a command and read an exit code can enforce it. Establish your baseline from a free scan of the declared set.
What is a baseline diff verdict?
A baseline diff verdict compares a current scan's exposures with a saved baseline scan's exposures and classifies each as new, pre-existing or resolved. The policy verdict is machine-readable: exit code 1 means 'block — a new exposure was introduced', exit code 0 means 'no new exposure'. Deterministic scoring is what makes the diff meaningful: identical files always produce identical findings, so any delta is a file change.
Why gate on new exposures rather than on the score?
Because scores make bad gates and good dashboards. A score gate ('block below 75') fails a pipeline for last quarter's accepted findings every time someone touches the folder, teaching the team to route around the gate. A new-exposure gate fails only for the thing it exists to prevent: this change, in this commit, introduced a pattern that was not there before. The pre-existing backlog remains visible in the report — reported distinctly, worked on its own schedule — while the gate holds the line at 'no worse'. Lines held at 'no worse' are how backlogs actually shrink: the stock stops growing while the team drains it deliberately.
The verdict's honesty is in its narrowness. It does not claim the baseline is clean; a baseline taken on a folder with three HIGHs blesses those three as 'pre-existing' until they are resolved and the baseline is refreshed. Refresh discipline therefore matters: re-baseline only from a scan the team has reviewed, on purpose, with the refresh recorded. A baseline that quietly absorbs new exposures in an automated refresh is a gate that opens itself — the refresh is a human decision, and the tooling treats it as one.
What does a failing CI run look like in practice?
A pull request adds an eval config copied from staging — with a secret assignment and debug on. The pipeline runs the scan over the declared set, diffs against the baseline, and the verdict is 1: two new exposures, named by class, file and line. The check fails with exactly that list attached, the author recognises the copied file, and the fix is the small one — a config rebuilt with references and debug off — made while the change is still a draft. Compare the alternative timeline without the gate: the same config merges, the next quarterly scan finds it, and the rotation involves a credential that has been live in the main branch for three months.
The CI setting is also where determinism stops being a philosophy and becomes plumbing. A flaky gate gets disabled; a deterministic one — same files, same findings, same verdict — survives contact with a busy team. That is the property the scanner was built around (the same input always yields the same report), and CI is its most demanding consumer.
How do you adopt the gate without stopping the world?
In three deliberate steps. First, baseline honestly: scan the current declared set, file the report, and record the baseline as it is — backlog included — with an owner and a date. Second, wire the diff in warn mode for one cycle: the verdict computed and posted, the pipeline unblocked, so the team sees exactly what would have failed and tunes the declared-set definition (which files are scanned is the usual adjustment). Third, flip to blocking, with the refresh rule written down: baselines change by a reviewed scan, in a commit that says so, never as a side effect of a passing build.
Keep the scanned set definition in version control beside the harness, so 'what CI scans' is a reviewed file rather than a console setting. And keep the human scan in the loop for production-connected runs: CI gates changes to the folder, while the pre-deployment checklist gates the run itself. The two are complements, not substitutes.
Worked example: Anchorpoint Marine Software, scored end to end
Example. Anchorpoint, a fictional marine-logistics software firm, baselined its eval folder in March: the baseline scan carried two known MEDIUMs the team accepted for the quarter. In May, a change added a copied staging config to the folder. The CI diff for that change classified the exposures as follows — the new ones being the copied config's contribution:
| Finding | Class | Severity | Weight |
|---|---|---|---|
| Generic secret assignment in the newly copied config | generic_secret_assignment | HIGH | 15 |
| Service API key (sk-) in the newly copied config | generic_api_key | HIGH | 15 |
| Debug mode enabled in the newly copied settings | debug_mode_enabled | MEDIUM | 8 |
The arithmetic: 15 + 15 + 8 = 38 points of exposure, so the score is 100 − 38 = 62/100, grade C. Scoring uses EvalEgress's published weights — CRITICAL 25, HIGH 15, MEDIUM 8, LOW 3 — with grades at A ≥ 90, B ≥ 75, C ≥ 50 and D ≥ 25.
The verdict was 1 — block — and the failure output named exactly these three as NEW, distinct from the two pre-existing MEDIUMs the baseline already carried. The author rebuilt the config with secrets-manager references and debug off, the next run's diff showed zero new exposures, and the verdict flipped to 0 without the accepted backlog ever blocking anyone. In June the team resolved one of the original MEDIUMs; the diff reported it as RESOLVED, the baseline was refreshed by reviewed commit, and the gate's history became the quarter's cleanest audit artefact.
Adopt the CI gate: the five actions
Baseline, warn, block, refresh by hand:
- Take the baseline from a reviewed scan of the real declared set. Record it with an owner and a date, backlog included — the baseline is a decision, and it should read like one.
- Define the scanned set in version control. Which files CI scans is a reviewed artefact beside the harness, not a console setting someone can widen quietly.
- Run warn mode for one cycle. Post the verdict without blocking, so the team sees precisely what would fail and corrects the set definition before the gate has teeth.
- Flip to blocking on the verdict's exit code. Exit 1 (a new exposure exists) fails the check with the new exposures named; exit 0 passes, whatever the pre-existing backlog holds.
- Refresh baselines only by reviewed commit. A re-baseline is a human decision after fixes land — never an automated side effect — and the refresh commit says what changed and why.
The gate's power is its narrowness: it forbids exactly one thing — getting worse — and proves it with a diff. The mechanics rest on the determinism described in the scoring guide.
Keep checking the boundary
Run the free exposure scan on the files your next eval will run with. Compare plans, read the scoring documentation, and keep reading: what is eval-to-production exposure?, what is egress in AI evaluation?, pre-deployment eval safety checklist, how to stop an AI evaluation from reaching production secrets, containment escape evidence pack explained, the escape-vector test protocol explained, the monitor independence check explained. EvalEgress is one of the Ingenious AI platforms.
Sources
- EvalEgress scoring documentation — the 16 finding classes, severity weights and declared-surface scope every judgement in this guide applies, published 2026.
- What Is Eval-to-Production Exposure? — the companion guide this page builds on, published November 7, 2026.
- The free EvalEgress scan — the declared-file scan this guide's checks are performed with.
Frequently asked questions
Is there a hosted integration for our CI platform?
None is claimed. The contract is the JSON diff plus the exit code, documented on /docs — any CI that runs a command and reads an exit code can enforce it, which is every CI.
What counts as the same exposure in a diff?
Exposures are compared between the current scan and the baseline scan; the diff classifies each as new, pre-existing or resolved. Because scanning is deterministic, an unchanged file set produces an empty new list, always.
Our baseline has findings. Does the gate still help?
Yes — that is its design case. The gate blocks new exposures while the baseline backlog is worked deliberately. Refresh the baseline as findings resolve, and the gate tightens with you.
Can a developer refresh the baseline to make a failure pass?
Only through a reviewed commit that re-baselines — which is visible, attributable and discussable. The protection is procedural, and the tooling keeps it that way on purpose.
Does CI replace the pre-run checklist?
No. CI gates changes to the declared files; the checklist gates a production-connected run itself, including console-side state CI cannot see. Use both, for their different questions.