-
Notifications
You must be signed in to change notification settings - Fork 32
fix: properly filter cvss scores for the advisory #1883
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Currently the logic incorrectly filters CVSS scores based on the vulnerability ID instead of the advisory ID. This change ensures that only CVSS scores related to the specific advisory are included in the advisory summary.
Reviewer's GuideRefactor the advisory summary builder to drop the vulnerability context and correctly filter CVSS entries by advisory ID, and enhance test coverage to verify advisory-specific scores and severities. Class diagram for VulnerabilitySummary advisories field updateclassDiagram
class VulnerabilitySummary {
+advisories: Vec<VulnerabilityAdvisoryHead>
}
class VulnerabilityAdvisoryHead {
+from_entities(vuln_advisories: &[advisory::Model], vuln_cvss3s: &[cvss3::Model], tx: &C)
}
VulnerabilitySummary o-- VulnerabilityAdvisoryHead : advisories
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1883 +/- ##
==========================================
- Coverage 67.94% 67.94% -0.01%
==========================================
Files 364 364
Lines 22973 22967 -6
Branches 22973 22967 -6
==========================================
- Hits 15610 15604 -6
Misses 6486 6486
Partials 877 877 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
approving the rust part -- no idea about the business
|
Successfully created backport PR for |
Currently the logic incorrectly filters CVSS scores based on the vulnerability ID instead of the advisory ID. This change ensures that only CVSS scores related to the specific advisory are included in the advisory summary.
Summary by Sourcery
Fix CVSS filtering logic for advisory summaries to use advisory_id instead of vulnerability_id, update related invocation, and add validation tests
Bug Fixes:
Enhancements:
Tests: