You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We are building a Java project with Maven, with the dependency camunda-engine:7.17.0.
To manage the versions, the camunda-bom is set into the <dependencyManagement> section of the project's pom.
In this configuration, trivy returns well the expected vulnerabilities.
As projects becomes more complex, dependencies versions have been moved to a custom BOM that contains the camunda-bom in its <dependencyManagement> section.
The custom BOM has been installed in the local Maven repository by mvn install.
In this case, running trivy does not return any vulnerabilities as expected.
It seems that the BOM in <dependencyManagement> is well parsed when set at first level, but the BOM in a BOM is not parsed.
From Docker image aquasec/trivy:latest
latest: Pulling from aquasec/trivy
Digest: sha256:27448497c3ae9cb81bdac3b420226392422b976a921f7461caf97ce5b591dcc0
Status: Image is up to date for aquasec/trivy:latest
Version: 0.48.0
Vulnerability DB:
Version: 2
UpdatedAt: 2023-12-05 18:11:47.850893282 +0000 UTC
NextUpdate: 2023-12-06 00:11:47.850892891 +0000 UTC
DownloadedAt: 2023-12-05 18:13:55.667231472 +0000 UTC
Java DB:
Version: 1
UpdatedAt: 2023-05-10 00:49:18.553984499 +0000 UTC
NextUpdate: 2023-05-13 00:49:18.553984099 +0000 UTC
DownloadedAt: 2023-05-10 16:04:26.298182537 +0000 UTC
Discussed in #5748
Originally posted by glelarge December 6, 2023
Description
We are building a Java project with Maven, with the dependency camunda-engine:7.17.0.
To manage the versions, the camunda-bom is set into the
<dependencyManagement>
section of the project's pom.In this configuration, trivy returns well the expected vulnerabilities.
As projects becomes more complex, dependencies versions have been moved to a custom BOM that contains the
camunda-bom
in its<dependencyManagement>
section.The custom BOM has been installed in the local Maven repository by
mvn install
.In this case, running trivy does not return any vulnerabilities as expected.
It seems that the BOM in
<dependencyManagement>
is well parsed when set at first level, but the BOM in a BOM is not parsed.Digging into the trivy code, it appears that go-dep-parser lib is used to parse dependencies, so I've also opened this issue #279 on go-dep-parser.
Desired Behavior
Vulnerabilities should be found when the dependency comes from a BOM placed in another BOM :
Actual Behavior
camunda-engine:7.17.0
vulnerabilities are not found :Reproduction Steps
The issue can be reproduced with this example project : https://github.com/glelarge/trivy-maven-issue
Target
Filesystem
Scanner
None
Output Format
None
Mode
Standalone
Debug Output
Operating System
Docker image aquasec/trivy:latest
Version
From Docker image aquasec/trivy:latest latest: Pulling from aquasec/trivy Digest: sha256:27448497c3ae9cb81bdac3b420226392422b976a921f7461caf97ce5b591dcc0 Status: Image is up to date for aquasec/trivy:latest Version: 0.48.0 Vulnerability DB: Version: 2 UpdatedAt: 2023-12-05 18:11:47.850893282 +0000 UTC NextUpdate: 2023-12-06 00:11:47.850892891 +0000 UTC DownloadedAt: 2023-12-05 18:13:55.667231472 +0000 UTC Java DB: Version: 1 UpdatedAt: 2023-05-10 00:49:18.553984499 +0000 UTC NextUpdate: 2023-05-13 00:49:18.553984099 +0000 UTC DownloadedAt: 2023-05-10 16:04:26.298182537 +0000 UTC
Checklist
trivy image --reset
The text was updated successfully, but these errors were encountered: