ci: image-scanning increases results display

Signed-off-by: zhzhuang-zju <m17799853869@163.com>
This commit is contained in:
zhzhuang-zju 2023-10-25 16:10:15 +08:00
parent 4e7084c0f5
commit c310f89c12
1 changed files with 8 additions and 1 deletions

View File

@ -23,7 +23,7 @@ jobs:
- karmada-metrics-adapter - karmada-metrics-adapter
steps: steps:
- name: checkout code - name: checkout code
uses: actions/checkout@v2 uses: actions/checkout@v3
- name: Build an image from Dockerfile - name: Build an image from Dockerfile
run: | run: |
export VERSION="latest" export VERSION="latest"
@ -37,6 +37,13 @@ jobs:
ignore-unfixed: true ignore-unfixed: true
vuln-type: 'os,library' vuln-type: 'os,library'
output: 'trivy-results.sarif' output: 'trivy-results.sarif'
- name: display scan results
uses: aquasecurity/trivy-action@0.12.0
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 - name: Upload Trivy scan results to GitHub Security tab
uses: github/codeql-action/upload-sarif@v2 uses: github/codeql-action/upload-sarif@v2
with: with: