fix(cvss): honor Exploit Maturity threat metric in CVSS v4.0 scoring [Backport release/0.5.z] - #2578
Merged
rh-jfuller merged 2 commits intoAug 14, 2026
Conversation
Use calculated_full_score() instead of calculated_base_score() for v4.0 so E:P/E:U are not stripped. No change for CVEs without an E metric. Implements TC-5626 Assisted-by: Claude Code
Add missing test for CVSS v4.0 with E:A (Attacked) exploit maturity metric as requested in PR review. Also fix variable name inconsistency where the local variable was renamed to full_score but still referenced cvss.full_score instead of cvss.base_score in the fallback. Addresses review feedback on PR guacsec#2569 Co-Authored-By: Claude Code <noreply@anthropic.com>
Contributor
Reviewer's GuideThis backport fixes CVSS v4.0 scoring to include the Exploit Maturity (E) threat metric by switching to full-score calculation, adding a fallback re-parse path, updating severity derivation, and covering the behavior with targeted tests and a missing import on the 0.5.z branch. File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
Contributor
There was a problem hiding this comment.
Hey - I've left some high level feedback:
- The fallback to
CvssV4::from_str(&cvss.vector_string)whencalculated_full_score()returnsNoneis non-obvious; consider adding a brief comment explaining the upstream/library behavior that requires reparsing the vector string. - Right now a missing full score silently falls back to
base_score; if this represents an unexpected state rather than a normal case, consider making the behavior explicit (e.g., via logging or a dedicated branch) to make future debugging easier.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- The fallback to `CvssV4::from_str(&cvss.vector_string)` when `calculated_full_score()` returns `None` is non-obvious; consider adding a brief comment explaining the upstream/library behavior that requires reparsing the vector string.
- Right now a missing full score silently falls back to `base_score`; if this represents an unexpected state rather than a normal case, consider making the behavior explicit (e.g., via logging or a dedicated branch) to make future debugging easier.Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
|
@rh-jfuller - James you reviewed the orginal PR. Could you give this backport your blessing too please? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Backport of #2569 to release/0.5.z
Summary
Use
calculated_full_score()instead ofcalculated_base_score()for CVSS v4.0 so the Exploit Maturity (E) threat metric is included in scoring. Fixes inflated scores for CVEs withE:PorE:U(e.g., 10.0 instead of 9.3 for CVE-2026-18236).Fromimpl is changed; v2/v3 are unaffecteduse std::str::FromStr;import (already present on main but missing on 0.5.z)Implements TC-5626
Original PR: #2569
Summary by Sourcery
Honor CVSS v4.0 Exploit Maturity in vulnerability scoring to prevent inflated scores and ensure correct severity classification.
Bug Fixes:
Enhancements:
Tests: