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

SDIT-1681: 🐛 Only output severity defects to sarif format #324

Merged
merged 1 commit into from
Apr 26, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/security_trivy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ jobs:
format: 'sarif'
output: 'trivy-results.sarif'
exit-code: 1
limit-severities-for-sarif: true
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

starting to get complicated. We're only interested in high and critical issues, but by default the sarif format retrieves all the issues. This is then compounded by the exit-code, that looks at whether any issues are in the output format and doesn't take into account that it is a sarif format. Would be nice to see all the issues in the security tab, but that doesn't look like it is possible according to aquasecurity/trivy-action#309.

- uses: github/codeql-action/upload-sarif@v3
if: success() || steps.trivy.conclusion == 'failure'
with:
Expand Down