-
Notifications
You must be signed in to change notification settings - Fork 1.7k
fix: add CVSSv4 support to auditjs parser and improve error handling #12391
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
base: bugfix
Are you sure you want to change the base?
fix: add CVSSv4 support to auditjs parser and improve error handling #12391
Conversation
This pull request addresses potential security vulnerabilities including DOMPurify XSS issues, a high-severity MySQL certificate verification vulnerability, and modifications to CVSS parsing and testing in the AuditJS parser, with associated updates to test cases and dependency handling. 💭 Unconfirmed Findings (6)
All finding details can be found in the DryRun Security Dashboard. |
Thank you for the PR. Can you look at my comment, the linting errors and rebase against the |
5a8ace2
to
594038c
Compare
Thanks, I've updated the base branch here on the GitHub PR as well. Could you look at providing/updating a test case that covers the new CVSS code? |
Sure, I’ll take a look at the test file next week and may extend it with additional scan examples to cover CVSS v2 and v4 cases. |
I've added new tests for CVSS V2 and V4 vectors and updated the scan examples. However, to run the tests properly, it's necessary to manually add the updated parse_cvss_from_text function to the auditjs parser (for now). |
Thanks! I've approved the workflows to run, can you look at the test failure: https://github.com/DefectDojo/django-DefectDojo/actions/runs/15003307072/job/42158252920?pr=12391#step:8:3482 |
Yes, this error occurs due to missing functionality in the CVSS library. So, we're waiting for updates.
|
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.
@Haralishev77 I think it would be fine if you add some extra code to handle the CVSS4 case, i.e. mimic what your upstream PR does. I am saying this because it looks like it might take a while before RedHat will release a version with your fix/enhancement. And soon we will add CVSS4 support to Defect Dojo and that will be a point where we will double check all CVSS related code in parsers and could cleanup the extra code.
Okay, I’ll push the changes soon. |
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.
Looks good to me, feel free to take it out of draft.
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.
Approved
Summary
This PR adds CVSS v4 support to the AuditJS parser in DefectDojo.
Changes
CVSS:4.0
vectors using theCVSS4
class.Note
Support for CVSS4 relies on RedHatProductSecurity/cvss#75 being merged and released (likely in version
3.5
).Once it's available, the
requirements.txt
should be updated accordingly.