Skip to content

Commit

Permalink
add image scanning on pull_request
Browse files Browse the repository at this point in the history
Signed-off-by: zhzhuang-zju <[email protected]>
  • Loading branch information
zhzhuang-zju committed Dec 6, 2023
1 parent 6128367 commit efa5f94
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion .github/workflows/ci-image-scanning.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
name: image-scanning
on:
push:
push:
pull_request:
jobs:
use-trivy-to-scan-image:
name: image-scanning
Expand Down Expand Up @@ -38,13 +39,15 @@ jobs:
vuln-type: 'os,library'
output: 'trivy-results.sarif'
- name: display scan results
if: ${{ github.event_name == 'pull_request' }}
uses: aquasecurity/[email protected]
with:
image-ref: 'docker.io/karmada/${{ matrix.target }}:latest'
format: 'table'
ignore-unfixed: true
vuln-type: 'os,library'
- name: Upload Trivy scan results to GitHub Security tab
if: ${{ github.event_name == 'push' }}
uses: github/codeql-action/upload-sarif@v2
with:
sarif_file: 'trivy-results.sarif'

0 comments on commit efa5f94

Please sign in to comment.