Skip to content

fix(metadata): ignore CVSS vector versions when extracting scores - #259

Open
sahilshingate01 wants to merge 1 commit into
c2siorg:mainfrom
sahilshingate01:codex/fix-cvss-vector-severity
Open

sahilshingate01 wants to merge 1 commit into
c2siorg:mainfrom
sahilshingate01:codex/fix-cvss-vector-severity

Conversation

@sahilshingate01

Copy link
Copy Markdown

Bug

CVSS vector strings such as CVSS:3.1/AV:N/... could be parsed as if the version number were the vulnerability score, leading to an incorrect severity fallback.

Root cause and fix

The score pattern accepted any number immediately after “CVSS,” so it captured 3.1 from a vector. The pattern now requires the word “score” and supports an optional CVSS version before it.

Regression tests

Added coverage for ignoring a vector without an explicit score and extracting the score from CVSS v3.1 score: 9.8.

Assisted-By: OpenAI Codex

Generated-By: OpenAI Codex
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