bug: false positive: detects unused Go stdlib packages #7472
Replies: 1 comment 4 replies
-
Hello @benhoyt Unfortunately, We believe that it is better to show false positives than to have users miss vulnerabilities. We have same problem in Trivy repo - We use Regards, Dmitriy |
Beta Was this translation helpful? Give feedback.
-
IDs
CVE-2024-34156
Description
Trivy seems to be too loose about how it detects CVEs in Go stdlib packages. For example, there's CVE-2024-34156 in the
encoding/gob
package, but my binary does not useencoding/gob
at all (nor do any of its dependencies). I can verify this withstrings <binary> | grep encoding/gob
.It would be much more precise to only flag vulnerabilities if the binary in question was actually using that stdlib package (or if doing source-based detection, if the source or any of its dependencies used the stdlib package in question). Maybe this information (the specific package or packages) is not available in the vulnerability database? But this kind of thing causes a fair bit of noise for our projects. It looks like it's parseable from the title, at least, for example, from
-f json
:Reproduction Steps
Target
Filesystem
Scanner
Vulnerability
Target OS
No response
Debug Output
Version
Checklist
-f json
that shows data sources and confirmed that the security advisory in data sources was correctBeta Was this translation helpful? Give feedback.
All reactions