-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Dependencytrack default severity #9370
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
Merged
mtesauro
merged 2 commits into
DefectDojo:dev
from
manuel-sommer:dependencytrack_defaultseverity
Feb 6, 2024
Merged
Changes from all commits
Commits
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
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.
@Maffooch and @mtesauro:
The problem we face with DependencyTrack findings is that single findings are not patched if the severity changes (e.g. if the severity is not yet classified).
Thus, we can deal with this in two ways:
The default severity for findings is Critical (which till now is "Critical, see this PR) Then, severities are not deduplicated and in general Teams will have a higher load of critical findings and they have to deal with them. This puts more pressure on the teams then necessary. Also, unclassified findings often don't have a patch available yet. On the other hand, switching severities are not deleted. Thus, it is easier to keep track on vulnerabilities.
The default severity for findings is Informational and we activate the deduplication in settings.dist.py. Then, these findings are closed automatically, but have the real severity once classified right. In this case, findings are closed and a new finding is generated as soon as the severity changes. Keeping track on vulnerabilities is harder.
Both ways are not the 100% right way as the capabilities are still limited due to the missing patch functionality of finding's severities from DependencyTrack to DefectDojo.
Maybe as an interim solution, we could implement both ways and choose the right one with #9351. We could implement a small logic in DependencyTrack to switch between the two options via parser_custom_setting.
What are your opinions and did I forget something?
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 PR and #9371 make sense to go together. This is a tricky problem to solve that is not just limited to dependency track.
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.
But now, if me merge both PRs, we have another problem: Info findings will stay with severity "info" eventhough the severity cfhanges. So, info findings would have to be analyzed.
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 with @manuel-sommer that merging the two would "hide" real CVEs (most ppl/companies ignore info severity findings) if they were created and synced to DD before their real severity was assigned.
Let me collect my thoughts on this issue and then brainstorm on solution ideas:
hash_codecalculation is used to find duplicates. I think duplicate issues are the ones which are about the same vuln but might be coming from different sources (e.g https://nvd.nist.gov/vuln/detail/CVE-2023-52079 and GHSA-7hpj-7hhx-2fgx are the same vuln) and therefore potentially can have different metadata (like severity, references, etc). Therefore I think including severity into the hash_code is a bad idea since it'd break deduplication (e.g. the above two CVEs would have ended up as two different findings in DD when the severity was already updated in GHSA to medium but still unassigned in CVE). Therefore I think Revert adding severity to Dependency Track hash_code calculation #9371 should be merged asap.vulnerability_idsin the case of Dependency Track imports) because then the hash_code would need to be updated as well which can result in new findings to become duplicates of others and existing ones not to be duplicates anymore. This would result in an inconsistent state which could be resolved if after any hash_code updates, some tasks would update all the findings in the DB which either have the old or the new hash_code values and "fix" the duplicate connections (I thinkduplicate_finding_idfield). This is my best idea so far but I might be missing something or misunderstood the internals of DD so feel free to correct me if I'm wrong or you have better alternative.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.
Linking this issue also: #6774