configure trivy action to upload results to security tab

pull/43/head
Andre Henn 2023-12-20 16:39:52 +01:00
parent 4343dca5d3
commit 8eb35730e3
No known key found for this signature in database
GPG Key ID: 776670F973DDECAA
1 changed files with 7 additions and 2 deletions

View File

@ -15,8 +15,13 @@ jobs:
- name: Run trivy - name: Run trivy
uses: aquasecurity/trivy-action@master uses: aquasecurity/trivy-action@master
with: with:
image-ref: 'geoserver-docker.osgeo.org/geoserver:${{ github.sha }}'
format: 'table' format: 'table'
ignore-unfixed: true ignore-unfixed: true
vuln-type: 'os,library' image-ref: 'geoserver-docker.osgeo.org/geoserver:${{ github.sha }}'
output: 'trivy-results.sarif'
severity: 'CRITICAL,HIGH' severity: 'CRITICAL,HIGH'
vuln-type: 'os,library'
- name: Upload Trivy scan results to GitHub Security tab
uses: github/codeql-action/upload-sarif@v2
with:
sarif_file: 'trivy-results.sarif'