Skip to content

Commit

Permalink
Merge pull request #452 from RoKrish14/RoKrish14-patch-1
Browse files Browse the repository at this point in the history
chore: Updated trivy workflow
  • Loading branch information
tom-rm-meyer-ISST authored Jun 14, 2024
2 parents 31f8df2 + 6eb1435 commit 0b01cb2
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions .github/workflows/trivy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,15 @@ jobs:
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6

- name: Run Trivy vulnerability scanner in repo mode
uses: aquasecurity/trivy-action@b2933f565dbc598b29947660e66259e3c7bc8561 # v0.20.0
uses: aquasecurity/trivy-action@595be6a0f6560a0a8fc419ddf630567fc623531d # v0.22.0
with:
image-ref: "tractusx/app-puris-frontend:latest"
format: "sarif"
output: "trivy-results-1.sarif"
vuln-type: "os,library"
severity: "CRITICAL,HIGH" # While vulnerabilities of all severities are reported in the SARIF output, the exit code and workflow failure are triggered only by these specified severities (CRITICAL or HIGH).
exit-code: "1"
limit-severities-for-sarif: true

- name: Upload Trivy scan results to GitHub Security tab
uses: github/codeql-action/upload-sarif@66b90a5db151a8042fa97405c6cf843bbe433f7b # v2.227
Expand All @@ -64,12 +67,15 @@ jobs:
steps:
# Pull image from Docker Hub and run Trivy vulnerability scanner
- name: Run Trivy vulnerability scanner
uses: aquasecurity/trivy-action@2b6a709cf9c4025c5438138008beaddbb02086f0 # v0.14.0
uses: aquasecurity/trivy-action@595be6a0f6560a0a8fc419ddf630567fc623531d # v0.22.0
with:
image-ref: "tractusx/app-puris-backend:latest"
format: "sarif"
output: "trivy-results-2.sarif"
vuln-type: "os,library"
severity: "CRITICAL,HIGH" # While vulnerabilities of all severities are reported in the SARIF output, the exit code and workflow failure are triggered only by these specified severities (CRITICAL or HIGH).
exit-code: "1"
limit-severities-for-sarif: true

- name: Upload Trivy scan results to GitHub Security tab
uses: github/codeql-action/upload-sarif@66b90a5db151a8042fa97405c6cf843bbe433f7b # v2.227
Expand Down

0 comments on commit 0b01cb2

Please sign in to comment.