Skip to content

Commit

Permalink
fix: add o/p to show vuln
Browse files Browse the repository at this point in the history
Signed-off-by: Ved Ratan <[email protected]>
  • Loading branch information
VedRatan committed Aug 1, 2024
1 parent c5e6d38 commit aef407c
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions .github/workflows/nightly-scan-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -67,3 +67,24 @@ jobs:
output: 'trivy-scan.json'
exit-code: '1'

- name: Convert trivy json file to tabular form
uses: aquasecurity/[email protected]
if: always() && steps.trivy-scan.conclusion == 'failure'
with:
scan-type: convert
vuln-type: ""
image-ref: trivy-scan.json
format: table
output: trivy-scan.txt

- name: Cat trivy/grype scan file if status == failure
if: always() && (steps.trivy-scan.conclusion == 'failure' || steps.grype-scan.conclusion == 'failure')
shell: bash
run: |
echo "====trivy-scan-txt===="
[ -s "trivy-scan.txt" ] && cat trivy-scan.txt
echo "====trivy-scan-json===="
[ -s "trivy-scan-json" ] && cat trivy-scan-json
echo "====grype-scan===="
cat ${{ steps.grype-scan.outputs.sarif }}
exit 1

0 comments on commit aef407c

Please sign in to comment.