Skip to content

Commit

Permalink
Update Trivy Action
Browse files Browse the repository at this point in the history
  • Loading branch information
leleobhz authored Oct 15, 2024
1 parent 331ccd6 commit f754870
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -83,10 +83,17 @@ jobs:
tags: ${{ steps.build-stage.outputs.tags }}
registry: ghcr.io/zenithtecnologia

- name: Run Trivy vulnerability scanner - origin branch latest release
run: |
podman run --privileged -v /tmp/podman.sock:/var/run/docker.sock -v ./:/data docker.io/aquasec/trivy:latest image --quiet --format sarif --output /data/container.sarif --severity CRITICAL,HIGH --vuln-type os,library --ignore-unfixed ${{ steps.build-stage.outputs.image }}
- name: Run Trivy vulnerability scanner
uses: aquasecurity/trivy-action
with:
image-ref: 'docker.io/my-organization/my-app:${{ github.sha }}'
ignore-unfixed: true
vuln-type: 'os,library'
severity: 'CRITICAL,HIGH'
format: 'sarif'
output: container.sarif
limit-severities-for-sarif: true

- name: Upload Trivy scan results to GitHub Security tab
uses: github/codeql-action/upload-sarif@v3
with:
Expand Down

0 comments on commit f754870

Please sign in to comment.