Skip to content

Support CVSS 4.0 metric ingestion in make_metric #862

Closed
Akshat1000Sharma wants to merge 1 commit intoNixOS:mainfrom
Akshat1000Sharma:ingest-cvss-fix
Closed

Support CVSS 4.0 metric ingestion in make_metric #862
Akshat1000Sharma wants to merge 1 commit intoNixOS:mainfrom
Akshat1000Sharma:ingest-cvss-fix

Conversation

@Akshat1000Sharma
Copy link
Copy Markdown

This PR fixes CVSS metric ingestion for newer CVEs that no longer provide cvssV3_1.

Previously, make_metric always attempted to read CVSS data from cvssV3_1, which caused CVEs that only include cvssV4_0 to store an empty raw_cvss_json. As a result, severity metrics were not shown in the overview.

The logic has been updated to select the available CVSS version in priority order (cvssV4_0 -> cvssV3_1 -> cvssV3_0) while respecting data["format"] if provided. The selected format is stored in ctx["format"].

This keeps the change minimal and ensures modern CVEs with CVSS 4.0 metrics are ingested correctly.

Fixes #839

@fricklerhandwerk
Copy link
Copy Markdown
Collaborator

Hey @Akshat1000Sharma, seems like you had a race with #857 there. I suggest closing this, as the other one is near the finish line. Also, while your change has a neat version of the algorithm, it doesn't cover display in the front-end, and doesn't have any tests.

@Akshat1000Sharma

This comment was marked as resolved.

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.

Ingest CVSS 4.0 metrics

2 participants