Skip to content

Commit

Permalink
exclude high vulns from build pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
fqjony committed Sep 24, 2024
1 parent a8e130a commit 10c9b91
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,13 +48,13 @@ jobs:
while [ $attempt -le $max_retries ]; do
echo "Running Trivy scan, attempt $attempt..."
trivy image --severity HIGH,CRITICAL --exit-code 1 --quiet udx-worker/udx-worker:latest | tee trivy.log | grep -v 'INFO'
trivy image --severity CRITICAL --exit-code 1 --quiet udx-worker/udx-worker:latest | tee trivy.log | grep -v 'INFO'

if grep -E "Total: [1-9]" trivy.log; then
echo "HIGH or CRITICAL vulnerabilities detected!"
echo "CRITICAL vulnerabilities detected!"
exit 1
else
echo "No HIGH or CRITICAL vulnerabilities found."
echo "No CRITICAL vulnerabilities found."
success=true
break
fi
Expand Down

0 comments on commit 10c9b91

Please sign in to comment.