Skip to content

Commit

Permalink
Update GitHub workflow.
Browse files Browse the repository at this point in the history
  • Loading branch information
ropable committed Nov 25, 2024
1 parent 353870f commit e3bd79e
Showing 1 changed file with 13 additions and 9 deletions.
22 changes: 13 additions & 9 deletions .github/workflows/image-build-scan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ on:
# Publish `master` as `latest` image.
branches: [master]
# Publish tagged commits as releases.
tags: ['1.*', '2.*', '3.*']
tags:
- "*"
pull_request:
branches: [master]

Expand Down Expand Up @@ -78,16 +79,19 @@ jobs:
# Run vulnerability scan on built image
#----------------------------------------------
- name: Run Trivy vulnerability scanner
uses: aquasecurity/trivy-action@master
uses: aquasecurity/[email protected]
env:
TRIVY_DB_REPOSITORY: public.ecr.aws/aquasecurity/trivy-db
with:
scan-type: image
scan-type: "image"
scanners: "vuln"
image-ref: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
vuln-type: 'os,library'
severity: 'HIGH,CRITICAL'
format: template
template: '@/contrib/sarif.tpl'
output: trivy-results.sarif
vuln-type: "os,library"
severity: "HIGH,CRITICAL"
format: "sarif"
template: "@/contrib/sarif.tpl"
output: "trivy-results.sarif"
- name: Upload Trivy scan results to GitHub Security tab
uses: github/codeql-action/upload-sarif@v3
with:
sarif_file: trivy-results.sarif
sarif_file: "trivy-results.sarif"

0 comments on commit e3bd79e

Please sign in to comment.