Skip to content

Commit

Permalink
Update trivy.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
simonjohansson authored Sep 14, 2022
1 parent bd86684 commit bb0b24e
Showing 1 changed file with 5 additions and 10 deletions.
15 changes: 5 additions & 10 deletions .github/workflows/trivy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,18 +28,13 @@ jobs:
- name: Checkout code
uses: actions/checkout@v3

- name: Build an image from Dockerfile
run: |
docker build -t docker.io/my-organization/my-app:${{ github.sha }} .
- name: Run Trivy vulnerability scanner
uses: aquasecurity/trivy-action@7b7aa264d83dc58691451798b4d117d53d21edfe
- name: Run Trivy vulnerability scanner in fs mode
uses: aquasecurity/trivy-action@master
with:
image-ref: 'docker.io/my-organization/my-app:${{ github.sha }}'
format: 'template'
template: '@/contrib/sarif.tpl'
scan-type: 'fs'
scan-ref: '.'
output: 'trivy-results.sarif'
severity: 'CRITICAL,HIGH'
template: '@/contrib/sarif.tpl'

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

0 comments on commit bb0b24e

Please sign in to comment.