What is the preferred Workflow to whitelist CVEs? #2530
Unanswered
PowerOfCreation
asked this question in
Help & Support
Replies: 1 comment 2 replies
-
|
this doc explains trivy ignore file and rego ignore: https://trivy.dev/latest/docs/configuration/filtering/ |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I have spent some time reading the Trivy Operator documentation as well as the Helm Chart and the Trivy documentation. So far I couldn't find an official recommended way how I can whitelist CVEs on a per image base for the Trivy Operator. In the Trivy Operator documentation I didn't find anything about whitelisting CVEs at all, except this old discussion #489 and I'm hoping something has changed since then and I'm also interested in more general guidelines on how to deal with found CVEs, which is why I'm opening this new discussion.
Only in the values.yaml of the Helm chart I was able to find ignoreFile and ignorePolicy. The ignoreFile does only support whitelisting for the entire cluster. It also seems to be different from the .trivyignore file which can be used with the Trivy cli, as it's not a multiline string but just a array of strings meaning nesting and using functionality like in the trivyignore.yaml doesn't seem to be possible at all.
Now that leaves me with the ignorePolicy which can be set on a per namespace level and with Rego. Sadly I wasn't able to find out what exactly I can use in the input..
input.target soundssounds right but in all my VulnerabilityReport CRDsvulnerabilities.targetis an empty string.Now I'm starting to think I'm looking in the wrong place because it seems to me that it's a very common pattern that I have a new CVE in my cluster and after evaluation I might decide that it doesn't affect me and I want to ignore it but only in the places where I have carefully evaluated whether the CVEs is relevant or not, not for the entire cluster. Ignoring for the entire cluster sounds dangerous to me.
I found that probably I could also put a .trivyignore file in each image itself, but this doesn't feel right either, as I don't have control over all images that I'm using in my cluster and would also mean I have to redeploy an image just to change my whitelisted CVEs.
Due the broken windows theory it feels like to me that ignoring/whitelisting CVEs should be a proper documented and streamlined process, but perhaps I misunderstand Trivy's role here and the ignoring part should happen at a later stage like in a Prometheus expression? Would be great if someone could point me in the right direction how to properly deal with the found vulnerabilities!
Thank you for your input!
Beta Was this translation helpful? Give feedback.
All reactions