-
Notifications
You must be signed in to change notification settings - Fork 249
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
.trivyignore file is ignored #436
Comments
I found the problem: the script The line 13: If the files in the As a workaround (like I did) you can write your |
Thank you for your investigation. I can confirm that the usage of a .trivyignore text file works. But it is not a real workaround because with .trivyignore.yml you can do much more than with .trivyignore. For example configure a file path, for which a specific misconfiguration should be ignored. By using .trivyignore, you can just ignore the misconfiguration for all files. Will .trivyignore.yml/yaml be supported in the future? |
👍 This issue can be closed. |
@nikpivkin if this is the case, then we shouldn't do this as it diverges from Trivy CLI behavior. Was this intentional? |
I don't know, it was implemented a long time ago. |
Just a note: for some reason for me it only works if I explicitly define the file extension e.g. |
I have encountered an issue where the .trivyignore file is not being respected by Trivy in my GitHub Actions pipeline. I have tried both .trivyignore.txt and .trivyignore with aquasecurity/trivy-action@0.29.0, but the vulnerabilities specified to be ignored are still being reported. Steps to Reproduce:
Configure the GitHub Actions workflow to use Trivy:
Expected Behavior: The vulnerability CVE-2025-0395 specified in the .trivyignore file should be ignored during the scan. Actual Behavior: The vulnerability CVE-2025-0395 is still being reported in the scan results:
Additional Information: Trivy version: 0.29.0 Pipeline Results
The result is that my configured files in ./.trivyignore.yml, which should be ignored, are not ignored and I get the following error:
|
I'm using aquasecurity/trivy-action@0.29.0 in my GitHub Actions workflow. I want to use a .trivyignore.yml to specify the files which should be ignored.
.trivyignore.yml:
Locally the misconfiguration is ignored, everything works as expected when I am executing:
In my GitHub Actions workflow, I set
trivyignores: './.trivyignore.yml'
for the aquasecurity/trivy-action call in the with block.The file ./.trivyignore.yml is found, this is the output of the workflow:
As you can see in the last line, trivy itself is not executed with "--ignorefile" like locally. Maybe this is the problem?
The result is that my configured files in ./.trivyignore.yml, which should be ignored, are not ignored and I get the following error:
Please investigate this issue.
The text was updated successfully, but these errors were encountered: