Skip to content

Maven: Trivy reports vulnerability based on wrong dependency version #7567

Closed Answered by DmitriyLewen
dhladik asked this question in Q&A
Discussion options

You must be logged in to vote

Hello @dhladik @concreted

You found very interesting case.

Trivy uses the following steps to find Artifact from jar file:

  1. Check pom.properties and MANIFEST.MF files (https://aquasecurity.github.io/trivy/v0.55/docs/coverage/language/java/#jarwarparear)
  2. Find artifact in trivy-java-db by sha1.
  3. ...

protobuf-kotlin-3.25.5.jar doesn't have pom.properties file.
MANIFEST.MF file doesn't contain required info:

Manifest-Version: 1.0
Created-By: mergejars
Target-Label: @//java/kotlin:well_known_protos_kotlin
Injecting-Rule-Kind: kt_jvm_library

Therefore, Trivy tries to find artifact by sha1.

I downloaded this file and found sha1 for this file:

➜ shasum protobuf-kotlin-3.25.5.jar 
c102af05b1429abf…

Replies: 3 comments 3 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by dhladik
Comment options

You must be logged in to vote
3 replies
@DmitriyLewen
Comment options

@dhladik
Comment options

@dhladik
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
triage/support Indicates an issue that is a support question. scan/vulnerability Issues relating to vulnerability scanning
3 participants