feat: CVSS v4.0 support and replace cvss implementation to comply with the specifications #651
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Why this PR
CVSS v4.0 has been released lately, and the OSV will most probably add its support (the first CVSS v4.0 vector known to the FIRST.ORG SIG CVSS has been published by Palo Alto Networks for the CVE-2023-3282).
As a FIRST.ORG SIG CVSS member and Go CVSS implementation maintainer, I'm looking forward to improve its adoption and understanding in the Open-Source Ecosystem.
Moreover, there exist issues with the currently used CVSS implementation, such as invalid scoring computation, and CVSS v4.0 is currently not planned for support.
What it brings
With the current PR, I provide multiple direct improvements:
Given ossf/osv-schema#166 the CVSS v4.0 key will most likely be
CVSS_V4
to align with the previous CVSS versions support.Is it breaking ?
For the code, no, but for the Go version, yes 🎉