Skip to content

Fix CVE gate hard-failing on baseline runs#55

Merged
wnstfy merged 1 commit into
mainfrom
fix/cve-gate-baseline
May 28, 2026
Merged

Fix CVE gate hard-failing on baseline runs#55
wnstfy merged 1 commit into
mainfrom
fix/cve-gate-baseline

Conversation

@wnstfy
Copy link
Copy Markdown
Contributor

@wnstfy wnstfy commented May 28, 2026

Summary

  • cve-delta.py applied --fail-on even on a baseline run (no previous scan to diff against). Any PR that adds a brand-new image — which by definition has no base-branch counterpart — had every CVE in that image counted as "introduced," tripping the required scan check.
  • A baseline run has no prior state, so it cannot represent a regression. The fix reports the findings informationally and returns 0 instead of exit 2. Normal delta runs (real regressions) still hard-fail.

Test plan

  • Baseline run (head has a HIGH, empty base) → exit 0 (was 2)
  • Real regression (base clean, head adds a net-new HIGH) → exit 2 (unchanged)
  • No-change run → exit 0 (unchanged)
  • Baseline report still lists the image's CVEs under an informational section

cve-delta.py applied --fail-on even when there was no previous scan to
diff against, so any PR adding a brand-new image (no base-branch
counterpart) tripped the gate on that image's pre-existing CVEs. A
baseline run has no prior state and cannot represent a regression, so
report the findings informationally and return 0 instead of exit 2.
@github-actions
Copy link
Copy Markdown
Contributor

Trivy misconfiguration findings (HIGH + CRITICAL)

✅ No HIGH or CRITICAL misconfigurations detected.

@wnstfy wnstfy merged commit 2f82c85 into main May 28, 2026
4 checks passed
@wnstfy wnstfy deleted the fix/cve-gate-baseline branch May 28, 2026 19:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant