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 and --ignore-unfixed #87

Open
sldblog opened this issue Nov 2, 2021 · 2 comments
Open

trivy and --ignore-unfixed #87

sldblog opened this issue Nov 2, 2021 · 2 comments
Labels
question Further information is requested

Comments

@sldblog
Copy link
Contributor

sldblog commented Nov 2, 2021

Is this option a good practice to have?

My primary worry is that it completely hides the CVEs:

$ trivy image --vuln-type=os --ignore-unfixed --severity=HIGH,CRITICAL quay.io/hmpps/hmpps-delius-interventions-event-listener:2021-11-02.382.391ebb7
2021-11-02T10:02:01.288Z	INFO	Detected OS: debian
2021-11-02T10:02:01.288Z	INFO	Detecting Debian vulnerabilities...

quay.io/hmpps/hmpps-delius-interventions-event-listener:2021-11-02.382.391ebb7 (debian 11.1)
============================================================================================
Total: 0 (HIGH: 0, CRITICAL: 0)

The same command without the --ignore-unfixed:

$ trivy image --vuln-type=os --severity=HIGH,CRITICAL quay.io/hmpps/hmpps-delius-interventions-event-listener:2021-11-02.382.391ebb7
2021-11-02T10:01:13.629Z	INFO	Detected OS: debian
2021-11-02T10:01:13.629Z	INFO	Detecting Debian vulnerabilities...

quay.io/hmpps/hmpps-delius-interventions-event-listener:2021-11-02.382.391ebb7 (debian 11.1)
============================================================================================
Total: 6 (HIGH: 2, CRITICAL: 4)
{snip}

So we have a false sense of no vulnerabilities, while there are actually 4 critical OS ones.

@sldblog
Copy link
Contributor Author

sldblog commented Nov 2, 2021

(We switched to adoptopenjdk/openjdk16:alpine-jre as the final base image and there are no critical ones there, with the added benefit of having half-size images)

@sldblog sldblog added the question Further information is requested label Nov 2, 2021
@dazoakley
Copy link
Contributor

dazoakley commented Jan 20, 2022

I guess it's a trade off of noise vs benefit? When this was introduced the first thing (many many) people asked "Is this just going to bombard me with noise about things I just can't fix?".

Hence why --ignore-unfixed was used - if there is a simple fix in the underlying base os or programming language package management system it would be flagged as insecure, otherwise don't produce noise. Not saying it was the best choice, but that's the background behind it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants