Replies: 2 comments 2 replies
-
|
Hello @blaargh You wrote about Can you try scanning your |
Beta Was this translation helpful? Give feedback.
-
|
I can try the pom.xml directly, but that is not our use case. In fact, we usually scan docker images via the Harbor integration of Trivy. What we witnessed there was, it doesn't matter if the jar within the docker image actually contains a vulnerable library. Only the meta information are scanned. This lead to a false positive for Snakeyaml 1.33, where we had explicitly version 2.2 in our jar, but some library mentions a dependency on version 1.33 in their meta data, even though there was no file with that version present. We then tried to debug this, to see if there were any false negatives we didn't catch. And this mentioned json library was one of them. The jar explicitly contained this version, and it still didn't find it because the metadata looked like the Screenshot, at least that is our assumption. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Description
When a dependency from maven looks like this:

where the actual dependency version is referenced with a variable, Trivy does not find this vulnerable version
If its explicitly listed like this:

the vulnerability is detected correctly
Desired Behavior
The vulnerable version should be found
Actual Behavior
The vulnerable version is not found
Reproduction Steps
1. Build a jar with for example https://mvnrepository.com/artifact/com.networknt/json-schema-validator/1.0.43 2. Do a scan via trivy rootfs json.jarTarget
Filesystem
Scanner
Vulnerability
Output Format
Table
Mode
Standalone
Debug Output
Operating System
Windows 10 with Ubuntu WSL2
Version
Checklist
trivy image --resetBeta Was this translation helpful? Give feedback.
All reactions