Skip to content
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 security scan failing for jmx_prometheus_javaagent-0.16.0.jar #618

Closed
mkothar2 opened this issue Jul 6, 2021 · 6 comments
Closed

Comments

@mkothar2
Copy link

mkothar2 commented Jul 6, 2021

jmx_prometheus_javaagent-0.16.0.jar

Total: 1 (UNKNOWN: 0, LOW: 0, MEDIUM: 0, HIGH: 1, CRITICAL: 0)

+--------------------+------------------+----------+-------------------+---------------+
| LIBRARY | VULNERABILITY ID | SEVERITY | INSTALLED VERSION | FIXED VERSION |
+--------------------+------------------+----------+-------------------+---------------+
| org.yaml:snakeyaml | CVE-2017-18640 | HIGH | 1.23 | 1.26 |
+--------------------+------------------+----------+-------------------+---------------+

@fstab
Copy link
Member

fstab commented Jul 8, 2021

This should not happen, as the whole purpose of the 0.16.0 release was to build a version with snakeyaml 1.29. I am not familiar with Trivy. Do you know why it concludes that snakeyaml 1.23 is in the JAR?

@ross211
Copy link

ross211 commented Jul 12, 2021

The link jmx_prometheus_javaagent_java6-0.16.0.jar referenced in https://github.com/prometheus/jmx_exporter/releases/tag/parent-0.16.0 returns a 404.

Looking inside the supposed Java 7+ jar returns the following which is probably what Trivvy is looking at:

jmx_prometheus_javaagent-0.16.0 $ grep -r '1\.23' .
./META-INF/maven/io.prometheus.jmx/collector/pom.xml:      <version>1.23</version> <!-- required for the Java 6 release -->
./META-INF/maven/org.yaml/snakeyaml/pom.xml:    <version>1.23</version>
./META-INF/maven/org.yaml/snakeyaml/pom.xml:        <tag>snakeyaml-1.23</tag>
./META-INF/maven/org.yaml/snakeyaml/pom.properties:version=1.23

@fstab
Copy link
Member

fstab commented Jul 13, 2021

I removed the pom.xml from the binary and released 0.16.1.

For reference: The metadata in pom.xml wrongly points to 1.23. That version is in fact not included in the Java 7+ binary. However, the metadata makes Trivy assume that the old version is used, and that causes the CVE warning.

Thanks for creating this issue.

@ross211
Copy link

ross211 commented Jul 14, 2021

I can confirm this has cleared the notice in trivy for me.

@dhoard
Copy link
Collaborator

dhoard commented Sep 20, 2021

Since this has been resolved. I propose we should close this issue.

@dhoard
Copy link
Collaborator

dhoard commented Jun 24, 2023

Closing as resolved.

@dhoard dhoard closed this as completed Jun 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants