-
Notifications
You must be signed in to change notification settings - Fork 12
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
Support CVSSv3 scores and severities #69
Conversation
Previously, CVSSv2 severities were assumed.
If a v3 score exists, store it in our database. If not, store the v2 score.
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.
I had one minor suggestions, which you can take or leave. This looks good to me!
Co-authored-by: Shane Frasier <jeremy.frasier@trio.dhs.gov>
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.
Still looks great to me!
As of May 2022, some Nessus plugins report a severity that is inconsistent with their (non-NVD, non-CVE-based) CVSS v3 score. To reduce confusion, we ensure that the severity is correct here. For examples, see the following plugins: 34460, 104572, 107056, 140770, 156560, 156941, 156441
958f636
to
79d29f5
Compare
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. Had a couple of thoughts about severity to score mapping.
Co-authored-by: Mark Feldhousen <felddy@users.noreply.github.com>
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.
This looks pretty solid. I had a couple of suggestions that you can ignore if desired. I did have one question I would like answered though just in case I missed/misunderstood logic somewhere.
Co-authored-by: Nick <50747025+mcdonnnj@users.noreply.github.com>
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.
LGTM ✔
🗣 Description
This PR adds support for CVSS v3 scores by importing them from the NVD. It also appropriately sets the severity of each CVE based on the v2 or v3 scoring system.
💭 Motivation and context
Since CVSS v3 has been out for quite a while now, it's about time that we support it.
This PR updates
cyhy-nvdsync
to import data for any CVE that has either v2 or v3 score. Previously, we only imported the v2 score.If a v3 score is present in the NVD data, that score is imported into the DB. If no v3 score is present, the v2 score is imported. In either case, the version of the CVSS score is now stored in the DB along with the score itself.
Resolves:
This is part of the work for cisagov/cyhy-system#59.
Marking this PR as blocked until the CyHy team allows us to deploy it. Note that this PR should be deployed in conjunction with cisagov/cyhy-reports#76.
🧪 Testing
To test the updated
cyhy-nvdsync
code (1ad23ec and d5e722e), I ran it in my test environment and validated the following things:cvss_version
value (either "2.0", "3.0", or "3.1").To test the updated
ticket_manager.py
code (2b81487 and 79d29f5), I deployed the code changes to my test environment and re-ran vulnerability scans for some hosts that previously had open tickets. I verified that their tickets were correctly updated with the new expected values fordetails.cvss_base_score
,details.cvss_version
, anddetails.severity
. I also confirmed that no tickets were updated with unexpected or erroneous details.✅ Pre-approval checklist
✅ Post-merge checklist