Skip to content

Classify vulnerabilities by CVSS severity - #4

Merged
sns45 merged 1 commit into
mainfrom
feat/severity-classification
Mar 18, 2026
Merged

Classify vulnerabilities by CVSS severity#4
sns45 merged 1 commit into
mainfrom
feat/severity-classification

Conversation

@sns45

@sns45 sns45 commented Mar 18, 2026

Copy link
Copy Markdown
Owner

Summary

  • Parse CVSS v3/v2 scores from OSV.dev and classify vulnerabilities as critical, high, medium, low, or unknown
  • Enrich TriageResult with Vulnerabilities []VulnDetail and CountBySeverity map
  • Include severity ratings in CycloneDX VEX output
  • 14 unit tests covering all boundaries, fallbacks, and edge cases

Context

Foundation for #1 (--fail-on flag) and #2 (human readable summary). Both features need severity data to function.

Test plan

  • go test ./internal/vex/ passes (14 severity tests + 4 existing)
  • go build ./... compiles cleanly
  • go test ./... full suite passes
  • Existing VEX behavior unchanged (backwards compatible via variadic param)

Closes #3

Previously all vulnerabilities were marked as under_investigation with no
severity data. Now the triage flow parses CVSS v3/v2 scores from OSV.dev
responses and classifies each vulnerability as critical, high, medium, low,
or unknown.

TriageResult exposes per-severity counts and enriched VulnDetail structs
so downstream features (human-readable summary, fail-on threshold) can
consume severity data. CycloneDX VEX output now includes severity ratings.

Closes #3
@sns45
sns45 merged commit 04c2d26 into main Mar 18, 2026
1 check passed
@sns45
sns45 deleted the feat/severity-classification branch March 18, 2026 15:07
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.

Classify vulnerabilities by severity instead of marking all as under_investigation

1 participant