Skip to content

Commit efca312

Browse files
authored
Merge pull request #6519 from zhzhuang-zju/trivyfix
Eliminate Trivy abnormal alerts
2 parents d44ab1d + ef629a2 commit efca312

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

.github/workflows/ci-image-scanning-on-schedule.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ jobs:
5656
format: 'sarif'
5757
ignore-unfixed: true
5858
vuln-type: 'os,library'
59+
cache: false
5960
output: '${{ matrix.target }}:${{ matrix.karmada-version }}.trivy-results.sarif'
6061
- name: display scan results
6162
uses: aquasecurity/[email protected]
@@ -65,6 +66,7 @@ jobs:
6566
image-ref: 'docker.io/karmada/${{ matrix.target }}:${{ matrix.karmada-version }}'
6667
format: 'table'
6768
ignore-unfixed: true
69+
cache: false
6870
vuln-type: 'os,library'
6971
- name: Upload Trivy scan results to GitHub Security tab
7072
uses: github/codeql-action/upload-sarif@v3

.github/workflows/ci-image-scanning.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,10 @@ jobs:
3232
steps:
3333
- name: checkout code
3434
uses: actions/checkout@v4
35+
with:
36+
# fetch-depth:
37+
# 0 indicates all history for all branches and tags.
38+
fetch-depth: 0
3539
- name: install Go
3640
uses: actions/setup-go@v5
3741
with:
@@ -52,6 +56,7 @@ jobs:
5256
ignore-unfixed: true
5357
vuln-type: 'os,library'
5458
output: 'trivy-results.sarif'
59+
cache: false
5560
- name: display scan results
5661
uses: aquasecurity/[email protected]
5762
env:
@@ -61,6 +66,7 @@ jobs:
6166
format: 'table'
6267
ignore-unfixed: true
6368
vuln-type: 'os,library'
69+
cache: false
6470
- name: Upload Trivy scan results to GitHub Security tab
6571
uses: github/codeql-action/upload-sarif@v3
6672
with:

0 commit comments

Comments
 (0)