-
-
Notifications
You must be signed in to change notification settings - Fork 578
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
Trivy Server Integration Reports Different Vulnerabilities Compared to Trivy Client #4164
Comments
Just seeing if anyone has any thoughts on what is causing this or possible workarounds? |
It's likely that we're currently not (or wrongly) populating a Trivy server API field that helps Trivy in "narrowing down" on the actually applicable vulnerabilities. Seeing that you're dealing with UBI images, my gut feeling is that we're not properly communicating that they are Red Hat components, so Trivy cannot take Red Hat advisories into consideration. Again, just a gut feeling, would need to verify. |
Is there any update to this, or has it been verified what the likely culprit could be? |
I am experiencing the same thing. My images are debian bookworm. |
I wasted some time here with Wireshark. (I was hoping to connect proto files and see protobuf unmarshalled, but Wireshark only supports that for UDP or HTTP/2 sadly. Would make much more sense to print unmarshaled protobuf in dev application setup) One difference I found between sending locally using trivy cli to trivy cli server and sending to dependency track trivy integration via dependency track frontend is as follows: In protobuf call from dependency track to Trivy integration In protobuf call from trivy cli to trivy cli server |
@nscuro Perhaps this should be a P1 issue. This kind of makes the Trivy integration unusable. I have hundreds of noisy/non-applicable Critical + High issues. Too many to manually suppress. |
I will try to have a look this weekend. There are a few Protobuf extensions for BurpSuite, I am optimistic that will yield some insights. |
I think I found the issue(s), they should be fixed with #4245. @cheapshot2000 with those fixes, I'm now getting 197 vulnerabilities for the BOM you provided. I haven't done a diff of the vulns, but I suspect the additional 6 are due to them having been added since you originally reported the issue. Once the linked PR is merged to
|
Great news! Thank you @nscuro . We'll give it a try early next week... |
@nscuro Thanks for the improvement! But still there are differences in Trivy Client and Dependency Track integration. I tried sbom scan of ubi9_sbom_with_vulns.cdx.json using the correct snapshot image ( With Trivy client there are 197 vulnerabilities (0 criticals, 2 high) I will also send you a bom on Slack that shows 3 criticals, 54 high in Trivy client, but 9 criticals, 83 high in Dependency Track |
Severity and CVSS vectors are taken as-is from the Trivy response: dependency-track/src/main/java/org/dependencytrack/parser/trivy/TrivyParser.java Lines 71 to 94 in 5235dd8
Do note though that if you have mirrored CVEs from the NVD (which is enabled by default), DT will not let Trivy overwrite CVE data, which includes severity. So it's very possible the difference you're seeing is caused by DT showing severities sourced from the NVD, whereas Trivy might've used a vendor-specific rating. |
In this case, Trivy Severity and CVSS are much more useful. I tested by disabling NVD mirroring in the snapshot release, re-imported the BOM and got the correct (3 critical, 54 high) for my bom. What would the downsides of disabling NVD mirroring be exactly?
|
Also, any tips on how to disable snapshot popup on every refresh of the frontend? Frontend code is:
So I could change unzip the jar from the docker, change version and re-jar it. But I think it would be best to do a minor release of dependency-track with this fix attached. |
If you look at the PR I referenced, it has a
No. The reason it works for Snyk is because Snyk has its own vulnerabilities ( |
@nscuro - Thank you for the fix; just wanted to confirm with the snapshot version mentioned above we are seeing identical vuln #'s from trivy client compared to trivy/dt integration. :) |
Thanks @cheapshot2000! Closing this issue then. We're hoping to get the v4.12.1 release out this week. |
Current Behavior
Dependency Track, using ONLY Trivy Server integration, reports different vulnerabilities that the Trivy Client/CLI does with the same SBOM.
Ultimately, we are trying to get scans from our CICD pipelines and DT to align. However, DT is processing / scanning differently using the Trivy Server integration resulting in vastly different vulnerability results than using the Trivy client. Even with no other analyzers, scanners, or data sources beyond the trivy server integration.
Steps to Reproduce
Files for reproducing:::
Export of the UBI from DT w/ Trivy Server Integration
ubi9_bom_exported_from_DT.json
Trivy Client output showing far fewer vulnerabilities
ubi9_vuln_scan.txt
Trivy Client SBOM w/ Vulns
ubi9_sbom_with_vulns.cdx.json
Trivy Client SBOM w/o Vulns
ubi9_sbom_without_vulns.cdx.json
Expected Behavior
When DT is ‘offline’ and with no other data sources, the vulnerabilities reported by DT w/ Trivy Server integration should match that from Trivy Client.
I understand that DT has other datasources and will decorate/assess differently. The offline aspect of this is to show that this is only coming from the trivy server integration with DT - and that differences are not coming from other data sources.
Dependency-Track Version
4.11.7
Dependency-Track Distribution
Container Image
Database Server
PostgreSQL
Database Server Version
14.12
Browser
Google Chrome
Checklist
The text was updated successfully, but these errors were encountered: