-
Notifications
You must be signed in to change notification settings - Fork 2.8k
fix(vuln) unique vulnerabilities from different data sources #984
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
Codecov Report
@@ Coverage Diff @@
## main #984 +/- ##
==========================================
- Coverage 68.50% 62.18% -6.33%
==========================================
Files 57 65 +8
Lines 2210 2626 +416
==========================================
+ Hits 1514 1633 +119
- Misses 564 858 +294
- Partials 132 135 +3
Continue to review full report at Codecov.
|
|
@knqyf263 would you know if the detected vulnerabilities can include duplicates? This PR handles the case but I'm curious why it happens in the first place to begin with. For example see this test https://github.com/aquasecurity/trivy/pull/984/files#diff-b831e004a3a89308d4c295025cf963c7e4f9c29d8d6f9377fea03ceb3a5cc655R352-R371 |
|
It is possible to happen since Trivy DB might have multiple data sources for the same target. For example, Trivy DB has GItLab Advisory Database and GitHub Security Advisories for Java detection. Then, they might have the same vulnerabilities. |
* Fix duplicate Rule in sarif template * Fix integration tests * Fixed tests * Update certs validity upto 2100 * Moved deduplication logic to Filter * Fix linting issue * Fix liniting issue * fix: deduplicate vulnerabilities * refactor * fix: add installed versions to uniq keys * Fix tests * Fix Unit tests. * Revert port change Co-authored-by: knqyf263 <[email protected]>
Issue
Last reported case aquasecurity/trivy-action#22 (comment)