Skip to content

Commit

Permalink
Add trivy vulnerability scanner in build step
Browse files Browse the repository at this point in the history
  • Loading branch information
thomasferrandiz committed Dec 12, 2024
1 parent d5883bd commit 3527e7e
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions .github/workflows/image-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,22 @@ jobs:
tags: ghcr.io/${{ github.repository }}:latest-amd64-thick
file: images/Dockerfile.thick

- name: Run Trivy vulnerability scanner
uses: aquasecurity/[email protected]
with:
image-ref: ghcr.io/${{ github.repository }}:latest-amd64-thick
ignore-unfixed: true
vuln-type: 'os,library'
severity: 'CRITICAL,HIGH'
format: 'sarif'
output: 'trivy-results.sarif'

- name: Upload Trivy scan results to GitHub Security tab
uses: github/codeql-action/upload-sarif@v3
if: always()
with:
sarif_file: 'trivy-results.sarif'

build-origin:
name: Image build/origin
runs-on: ubuntu-latest
Expand Down

0 comments on commit 3527e7e

Please sign in to comment.