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

Ho do I ignore a specific vulnerability by ID only in a particular file. #3572

Closed
codemedic opened this issue Feb 7, 2023 · 3 comments
Closed
Labels
triage/support Indicates an issue that is a support question.

Comments

@codemedic
Copy link

If I have multiple Dockerfiles, say one just for build and the other for docker images that are meant for deployment, trivy sometimes report issues with the former which I would like to ignore. Since they are build time only, they are safe enough to ignore.

How do I ignore them by ID per file?

@codemedic codemedic added the triage/support Indicates an issue that is a support question. label Feb 7, 2023
@itaysk
Copy link
Contributor

itaysk commented Feb 11, 2023

@itaysk itaysk closed this as completed Feb 11, 2023
@codemedic
Copy link
Author

Thanks, @itaysk

Are there any guides / examples to ignore a specific ID in a specific file?

I was hoping it would be something simpler, like a comment above the offending line in the specific file. I agree, it is not always possible, like a strict JSON file for example.

@itaysk
Copy link
Contributor

itaysk commented Feb 14, 2023

comment above the offending line in the specific file

sounds like #2961, please comment there if you have feedback about this feature

Are there any guides / examples to ignore a specific ID in a specific file?

I think today your best bet would be using rego exceptions which have some examples here. This feature's documentation needs improvement

While we improve the experience around this, you can follow this discussion for some context: #3620.

@itaysk itaysk mentioned this issue Apr 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
triage/support Indicates an issue that is a support question.
Projects
None yet
Development

No branches or pull requests

2 participants