ci: print Trivy fs findings to the workflow log#28
Merged
Conversation
The Trivy fs scan wrote its findings table to trivy-results.txt via the output option. That file was previously consumed by a 'comment results on the PR' step, which has since been removed, so the findings now go nowhere: a failing scan shows only 'exit code 1' in the logs with no detail. Drop the output redirect so the findings table prints to the Actions log, making failures self-explanatory.
Contributor
There was a problem hiding this comment.
Pull request overview
This PR restores visibility of Trivy filesystem (fs) scan findings in CI by removing the output: redirection that wrote results to a file, allowing Trivy to print the findings table directly to the workflow log.
Changes:
- Removed
output: 'trivy-results.txt'from the Trivy fs scan step so findings are emitted to stdout (and therefore visible in Actions logs).
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The reusable
trivy-go-tests.yamlfs scan usedoutput: 'trivy-results.txt', which writes the findings table to a file instead of stdout. That file used to be read by a "Comment Trivy Results on the Pull Request" step, but that step was removed (in the image-scan rollout), so the findings now go nowhere. A failing scan shows only:…with no indication of which CVEs/packages failed, forcing people to reproduce the scan locally to triage.
This removes the
output:redirect so Trivy prints the findings table directly to the workflow log. Failures become self-explanatory in the Actions UI.Why
Restores visibility of Trivy findings in CI logs. No change to what is scanned or gated — same scan-type, severity, ignore-unfixed, and
exit-code: '1'. Only where the output goes.Notes
deployment.yamlalready prints to the log (nooutput:redirect).QA Report
Integration Tests