Skip to content

Commit

Permalink
fix(trivy): don't fail on high findings (#30)
Browse files Browse the repository at this point in the history
action should only fail if there is an error/misconfiguration
  • Loading branch information
evegufy authored Nov 15, 2023
1 parent 0d14524 commit 343cdb9
Showing 1 changed file with 6 additions and 10 deletions.
16 changes: 6 additions & 10 deletions .github/workflows/trivy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,15 +52,13 @@ jobs:
uses: actions/checkout@v3

- name: Run Trivy vulnerability scanner in repo mode
uses: aquasecurity/trivy-action@master
uses: aquasecurity/trivy-action@0.14.0
with:
scan-type: "config"
# ignore-unfixed: true
exit-code: "1"
hide-progress: false
format: "sarif"
output: "trivy-results1.sarif"
severity: "CRITICAL,HIGH"
vuln-type: "os,library"

- name: Upload Trivy scan results to GitHub Security tab
uses: github/codeql-action/upload-sarif@v2
Expand All @@ -86,14 +84,13 @@ jobs:
# For public images, no ENV vars must be set.
- name: Run Trivy vulnerability scanner
if: always()
uses: aquasecurity/trivy-action@master
uses: aquasecurity/trivy-action@0.14.0
with:
# Path to Docker image
image-ref: "${{ env.IMAGE_NAMESPACE }}/${{ env.IMAGE_NAME }}:latest"
format: "sarif"
output: "trivy-results2.sarif"
exit-code: "1"
severity: "CRITICAL,HIGH"
vuln-type: "os,library"

- name: Upload Trivy scan results to GitHub Security tab
if: always()
Expand All @@ -119,14 +116,13 @@ jobs:
# For public images, no ENV vars must be set.
- name: Run Trivy vulnerability scanner
if: always()
uses: aquasecurity/trivy-action@master
uses: aquasecurity/trivy-action@0.14.0
with:
# Path to Docker image
image-ref: "${{ env.IMAGE_NAMESPACE }}/${{ env.IMAGE_NAME_CONSORTIA }}:latest"
format: "sarif"
output: "trivy-results3.sarif"
exit-code: "1"
severity: "CRITICAL,HIGH"
vuln-type: "os,library"

- name: Upload Trivy scan results to GitHub Security tab
if: always()
Expand Down

0 comments on commit 343cdb9

Please sign in to comment.