Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
fqjony committed Sep 12, 2024
1 parent 4b84683 commit 3a8d6fc
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,9 @@ jobs:
- name: Trivy Scanning
run: |
trivy image --severity HIGH,CRITICAL --exit-code 0 --quiet udx-worker/udx-worker:latest | tee trivy.log | grep -v 'INFO'
if grep -q "Total: 0 (HIGH: 0, CRITICAL: 0)" trivy.log; then
echo "No HIGH or CRITICAL vulnerabilities found."
else
if grep -E "Total: [1-9]" trivy.log; then
echo "HIGH or CRITICAL vulnerabilities detected!"
exit 1
fi
else
echo "No HIGH or CRITICAL vulnerabilities found."
fi

0 comments on commit 3a8d6fc

Please sign in to comment.