Skip to content

Commit

Permalink
Trigger Trivy report for containers
Browse files Browse the repository at this point in the history
  • Loading branch information
simao-silva committed Nov 6, 2023
1 parent 619bb96 commit 5c5e657
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 4 deletions.
15 changes: 13 additions & 2 deletions .github/workflows/pr-alpine.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,19 @@ jobs:
uses: aquasecurity/trivy-action@master
with:
image-ref: ${{ env.IMAGE_NAME }}:test-alpine
format: "table"
format: "sarif"
output: "trivy-alpine-image-scan.sarif"
exit-code: "1"
ignore-unfixed: true
vuln-type: "os,library"
severity: "HIGH,CRITICAL"
severity: "MEDIUM,HIGH,CRITICAL"

- name: Upload Trivy scan results to GitHub Security
uses: github/codeql-action/upload-sarif@v2
if: always()
with:
# Path to SARIF file relative to the root of the repository
sarif_file: trivy-alpine-image-scan.sarif
# Optional category for the results
# Used to differentiate multiple results for one commit
category: alpine-image-scan
13 changes: 12 additions & 1 deletion .github/workflows/pr-debian.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,19 @@ jobs:
uses: aquasecurity/trivy-action@master
with:
image-ref: ${{ env.IMAGE_NAME }}:test-debian
format: "table"
format: "sarif"
output: "trivy-debian-image-scan.sarif"
exit-code: "1"
ignore-unfixed: true
vuln-type: "os,library"
severity: "MEDIUM,CRITICAL,HIGH"

- name: Upload Trivy scan results to GitHub Security
uses: github/codeql-action/upload-sarif@v2
if: always()
with:
# Path to SARIF file relative to the root of the repository
sarif_file: trivy-debian-image-scan.sarif
# Optional category for the results
# Used to differentiate multiple results for one commit
category: debian-image-scan
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
selenium==4.15.2
requests==2.0.0
deep_translator==1.11.4
# deep_translator==1.11.4

0 comments on commit 5c5e657

Please sign in to comment.