-
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
exit-code with SARIF format doesn't respect the 'severity' parameter #309
Comments
can we solve this issue? I have the same problem. 'Code scanning' reports 1 medium vulnerability but exit-code does not respect severity: 'HIGH,CRITICAL'
|
It seems like the sarif report should not even have results not in the Here's the PR: This may not fix the exit-code part, I haven't tested that but I'll post back if I do. Update Addition: I just noticed this flag |
I've got caught out with this too. I found the output from the trivy command to be helpful, in that without
and with the setting set to
It does feel like incompatible options (severity with sarif without limit-severities-for-sarif) should at least result result in a warning that the severity will then be ignored. |
Hello,
I'm trying to construct a scan step with Trivy action and have faced an issue when the action uses
exit-code
when no intended severities are found because by default SARIF format enforces output of all vulnerabilities regardless of configured severities.If
limit-severities-for-sarif: true
my pipeline works fine but I will get a stripped report file.The goal is to get a full SARIF file and stop workflow (with exit-code) if only selected severities are found.
In Workflow: https://github.com/Alpacked/security-hardening-helm/actions/runs/7916739186/job/21611265613
Resulted vulnerabilities from scan:
The text was updated successfully, but these errors were encountered: