Skip to content

ci: replace invalid osv-scanner severity flags#9333

Merged
sachushaji merged 1 commit into
masterfrom
VL-7134-osv-severity-gate
Jul 22, 2026
Merged

ci: replace invalid osv-scanner severity flags#9333
sachushaji merged 1 commit into
masterfrom
VL-7134-osv-severity-gate

Conversation

@sachushaji

Copy link
Copy Markdown
Contributor

osv-scanner v2.3.8 has no --severity flag, so #9331 broke the audit step with 'flag provided but not defined: -severity'. Replace it with a JSON output scan plus a composite-action gate that fails only on findings with CVSS >= 7.0 (HIGH/CRITICAL), which is what #9331 intended. Medium/low findings are logged as warnings and no longer block releases.

TICKET: VL-7134

TICKET: VL-7134

osv-scanner v2.3.8 has no --severity flag, so #9331 broke the audit step
with 'flag provided but not defined: -severity'. Replace it with a JSON
output scan plus a composite-action gate that fails only on findings with
CVSS >= 7.0 (HIGH/CRITICAL), which is what #9331 intended. Medium/low
findings are logged as warnings and no longer block releases.

TICKET: VL-7134

TICKET: VL-7134
@linear-code

linear-code Bot commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

VL-7134

@sachushaji
sachushaji marked this pull request as ready for review July 22, 2026 19:17
@sachushaji
sachushaji requested review from a team as code owners July 22, 2026 19:17
@sachushaji
sachushaji merged commit b3068d7 into master Jul 22, 2026
23 checks passed

@zahin-mohammad zahin-mohammad left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approve — correct, well-structured hotfix. #9331's --severity=HIGH/CRITICAL isn't a valid v2.3.8 scan flag, so the audit step has been erroring (no continue-on-error) and breaking every release/publish since it merged. This restores the gate.

Verified:

  • --severity is not a v2.3.8 scan flag (only --min-severity on fix); --format json / --output-file are correct.
  • groups[].max_severity exists (results.go:301) — jq path is right; CVSS ≥ 7.0 == HIGH+CRITICAL matches intent.
  • The pinned action forwards scan-args verbatim, no injected format/output flags.
  • Fail-closed on scan errors (invalid/missing JSON → exit 1); working tree cleaned via rm -f.

Non-blocking:

  1. Fail-open on unscored advisories: by construction, any advisory with empty max_severity (no CVSS vector) can't block — warning only. Pre-#9331 blocked on any finding, so an unscored-but-severe advisory that used to block now passes. Intended direction, but worth a conscious sign-off.
  2. Release/publish-only path is untestable in PR CI — recommend a workflow_dispatch dry-run before the next real release relies on it.
  3. Trivial: hardcoded WCN-1550 in the warning string will go stale; commit/PR body repeats TICKET: VL-7134.

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.

3 participants