Skip to content

fix(vig-utils): fail loud on unscored CVEs in vulnix gate - #765

Merged
c-vigo merged 3 commits into
feature/625-nix-claude-migrationfrom
bugfix/755-vulnix-gate-fail-loud
Jun 30, 2026
Merged

c-vigo merged 3 commits into
feature/625-nix-claude-migrationfrom
bugfix/755-vulnix-gate-fail-loud

Conversation

@c-vigo

@c-vigo c-vigo commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

Summary

Fixes M2 from the PR #670 review: vulnix-gate silently skipped unscored CVEs and the nightly scan swallowed scanner crashes with || true, so an unscored CRITICAL or a crashed scanner looked identical to a clean result.

Changes

  • vulnix_gate.py — blocking_findings now blocks a CVE with no CVSS v3 base score (score is None); only sub-threshold scored CVEs remain awareness-only. main() sorts unscored findings first (unknown severity = most urgent) and labels them unscored in the GitHub error annotations. An explicit non-expired .vulnixignore exception still covers an unscored CVE.
  • .github/workflows/security-scan.yml — dropped the blanket || true on the vulnix scan/report capture. It now tolerates only vulnix's scan-ran exit codes (<= 2: 0 clean, 1 whitelisted-only, 2 reportable advisories — the gate decides pass/fail) and fails the job on any higher code (3 usage error, 127 not-found, 137 OOM-kill, etc.), so a scanner crash can no longer masquerade as an empty, clean scan.
  • CHANGELOG.md — Security entry.

Test evidence (TDD: RED -> GREEN)

RED (after writing the new specs, before the fix):

FAILED packages/vig-utils/tests/test_vulnix_gate.py::TestBlockingFindings::test_unscored_is_blocking
FAILED packages/vig-utils/tests/test_vulnix_gate.py::TestMain::test_fails_on_unscored
2 failed, 13 passed in 0.04s

GREEN (after the fix):

15 passed in 0.02s

New/updated tests assert an unscored CVE blocks (blocking_findings and the main CLI exit code), that a sub-threshold scored CVE still does not block, and that a non-expired exception still covers an unscored CVE.

just precommit: all hooks pass.

Closes #755

@c-vigo
c-vigo merged commit 7087347 into feature/625-nix-claude-migration Jun 30, 2026
10 checks passed
@c-vigo
c-vigo deleted the bugfix/755-vulnix-gate-fail-loud branch June 30, 2026 09:39
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