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.
- name: Scan Docker image for vulnerabilities
id: scan
uses: aquasecurity/trivy-action@0.17.0
with:
input: /github/workspace/vault-init-image
severity: 'HIGH,CRITICAL'
exit-code: '1'
format: 'sarif'
limit-severities-for-sarif: false
output: 'trivy-results.sarif'
In Workflow: https://github.com/Alpacked/security-hardening-helm/actions/runs/7916739186/job/21611265613
Resulted vulnerabilities from scan: 
Hello,
I'm trying to construct a scan step with Trivy action and have faced an issue when the action uses
exit-codewhen no intended severities are found because by default SARIF format enforces output of all vulnerabilities regardless of configured severities.If
limit-severities-for-sarif: truemy 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: