Skip to content

Commit

Permalink
ci: upload security scanning to GHCS
Browse files Browse the repository at this point in the history
  • Loading branch information
JoshuaLicense committed Jul 11, 2024
1 parent 4402e0b commit 03b17ac
Showing 1 changed file with 12 additions and 7 deletions.
19 changes: 12 additions & 7 deletions .github/workflows/docker.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -168,13 +168,18 @@ jobs:
cache-from: type=gha

- name: Scan
id: scan
uses: aquasecurity/trivy-action@0.23.0
with:
image-ref: ${{ steps.build-and-push.outputs.imageid }}
# format: 'sarif'
# output: 'trivy-results.sarif'

# - name: Upload Trivy scan results to GitHub Code Scanning
# uses: github/codeql-action/upload-sarif@v3
# with:
# sarif_file: 'trivy-results.sarif'
format: 'sarif'
exit-code: '1'
ignore-unfixed: true
vuln-type: 'os,library'
severity: 'CRITICAL,HIGH'

- name: Upload Trivy scan results to GitHub Code Scanning
if: ${{ always() && !cancelled() && steps.scan.outcome == 'success' || steps.scan.outcome == 'failure' }}
uses: github/codeql-action/upload-sarif@v3
with:
sarif_file: 'trivy-results.sarif'

0 comments on commit 03b17ac

Please sign in to comment.