-
-
Notifications
You must be signed in to change notification settings - Fork 712
Add CVSSv4 support to Dependency-Track #5456
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
Closed
tobiasgies
wants to merge
28
commits into
DependencyTrack:master
from
tobiasgies:4707-add-cvss4-support
Closed
Changes from 27 commits
Commits
Show all changes
28 commits
Select commit
Hold shift + click to select a range
ec1e8ff
Add CVSSv4 fields to vulnerabilty DBO and corresponding DB update
tobiasgies 2fdbc0d
Add CVSSv4 handling to VulnerabilityUtil
tobiasgies ef99b86
Add CVSSv4 handling to VulnerabilityResource
tobiasgies 5c6ebd0
Add v4.14.0 updater to UpgradeItems
tobiasgies 33fccc0
Add CVSSv4 score handling to Finding and GroupedFinding models
tobiasgies bb01cc6
Use new version of getSeverity method in v4.11.0 Updater
tobiasgies e1d4974
Add CVSSv4 handling to GHSA, NVD and VulnDB importers (if provided)
tobiasgies 9bc6113
Add CVSSv4 handling to Sonatype OSS Index Analyser
tobiasgies 48729ce
Add todo reminder for revision tomorrow
tobiasgies ea3ae1f
Rework: CVSSv4 doesn't have exploitability and impact subscores, but …
tobiasgies ec66cc7
Add CVSS4 fields in more places
tobiasgies a6e4da9
Repair some tests broken by the changes so far; fix GroupedFinding no…
tobiasgies af0891a
Repair more broken tests
tobiasgies ca0d7b0
Add more tests for Vulnerability DBO
tobiasgies c2e8d38
Add cvssv4 field to new vulnerability notification
tobiasgies 34a1434
Add cvssv4 handling to CycloneDX parser
tobiasgies 6a67fa4
Add CVSSv4 handling to OSV paser
tobiasgies b8bdf6a
Add CVSSv4 parsing to Trivy parser. Updates Trivy protobuf definition…
tobiasgies 1d43c62
Ensure calculator resource has basic CVSSv4 calculation capability
tobiasgies 348f35a
Add ability to filter findings by CVSSv4 score to FindingResource
tobiasgies 639befc
Ensure NIST API mirror task successfully parses CVSS4-scored vulnerab…
tobiasgies d2b83b0
Ensure NIST mirror task successfully parses CVSS4-scored vulnerabilities
tobiasgies e4c8745
Fix copy/paste error in query parameters
tobiasgies 7cf0e2c
Ensure advisories with CVSS 4 scores get parsed correctly in OsvDownl…
tobiasgies abffd2e
Ensure advisories with CVSS 4 scores get parsed correctly in TrivyAna…
tobiasgies cda9018
Add missing validation to VulnerabilityResource and some more CVSS4 t…
tobiasgies f7dc16c
Fix copy/paste error in parameter description
tobiasgies e983b98
Increase timeout for testNotificationRuleTest because it has become f…
tobiasgies File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
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
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
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
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
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.
Maybe we should do here more strict validation, accept only valid CVSSv4 vectors
Uh oh!
There was an error while loading. Please reload this page.
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 agree in principle, I just copy/pasted the validation code for the other CVSS vector versions for the moment. However I think this might be duplicate work - the
org.metaeffekt.core:ae-securitypackage contains stricter validation logic inCvssVector.parseVector. Any invalid vector will cause the method to return null instead of aCvssVectorinstance, causing the data to be thrown out.With that in mind, do you still think additional validation is needed in this place?
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.
Yes I know that for every other places related to CVSS we have
PRINTABLE_CHARS_PLUS.Regarding to
validation in
CvssVector.parseVectoris also very simple, regex is:For instance, I am able to create such internal Vulnerability in DependencyTrack 4.13.6(note that i was able to put invalid cvss 4.0 vector into cvss 2.0)

From my experience strict validation should be present from the begining of the feature because then data that normaly will be rejected(because validation) are living in db and can cause a problems
Second thing is that OWASP product should be secure as much as possible, because this is OWASP mission at the end,
how can we teach people to write application according to ASVS 4.X when we not do the same.
On the other hand previous version of cvss was written in a way that is used in PR, making difference here can cause problems that i am not aware of, so I agree with that maybe it can be addressed later(I can do that)
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.
It might make sense to look into creating a custom validator, like we have for cron expressions for example.
I do agree that adding that for existing CVSS types might cause issues that would need proper data migration first. But for everything we add going forward, it makes sense to be more defensive as to what we accept.