Skip to content

Commit

Permalink
Update dockerimage-trivy.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
theslash84 authored Mar 23, 2024
1 parent ec9617b commit 07a04d0
Showing 1 changed file with 19 additions and 18 deletions.
37 changes: 19 additions & 18 deletions .github/workflows/dockerimage-trivy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,23 +9,24 @@ jobs:
scan:
runs-on: ubuntu-latest
steps:
- name: Check out the repo
uses: actions/checkout@v2
- name: Check out the repo
uses: actions/checkout@v2

- name: Run Trivy vulnerability scanner on Docker image
uses: aquasecurity/trivy-action@master
with:
scan-type: 'image'
image-ref: 'ezio22/myazurefunctionapp:latest'
format: 'table'
exit-code: '1' # Non-zero exit code if vulnerabilities are found
ignore-unfixed: true
severity: 'HIGH,CRITICAL'
output: 'trivy-image-report.txt'

- name: Upload Trivy scan results
uses: actions/upload-artifact@v2
with:
name: trivy-report
path: trivy-image-report.txt

- name: Run Trivy vulnerability scanner on Docker Hub image
uses: aquasecurity/trivy-action@master
with:
scan-type: 'image'
image-ref: 'ezio22/myazurefunctionapp:latest'
format: 'table'
exit-code: '1'
ignore-unfixed: true
severity: 'HIGH,CRITICAL'
output: 'trivy-image-report.txt'

- name: Upload Trivy scan results
uses: actions/upload-artifact@v2
if: always()
with:
name: trivy-report
path: trivy-image-report.txt

0 comments on commit 07a04d0

Please sign in to comment.