Skip to content

Commit 102ebfe

Browse files
authored
Merge pull request #6529 from zhzhuang-zju/automated-cherry-pick-of-#6519-#6514-upstream-release-1.12
Automated cherry pick of #6519: Eliminate Trivy abnormal alerts #6514: Bump aquasecurity/trivy-action from 0.31.0 to 0.32.0
2 parents 615d942 + ea0e61b commit 102ebfe

File tree

3 files changed

+13
-5
lines changed

3 files changed

+13
-5
lines changed

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

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ jobs:
4747
export REGISTRY="docker.io/karmada"
4848
make image-${{ matrix.target }}
4949
- name: Run Trivy vulnerability scanner
50-
uses: aquasecurity/trivy-action@0.29.0
50+
uses: aquasecurity/trivy-action@0.32.0
5151
env:
5252
ACTIONS_RUNTIME_TOKEN: ${{ secrets.GITHUB_TOKEN }}
5353
TRIVY_DB_REPOSITORY: ghcr.io/aquasecurity/trivy-db,public.ecr.aws/aquasecurity/trivy-db
@@ -56,15 +56,17 @@ 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
61-
uses: aquasecurity/trivy-action@0.29.0
62+
uses: aquasecurity/trivy-action@0.32.0
6263
env:
6364
TRIVY_SKIP_DB_UPDATE: true # Avoid updating the vulnerability db as it was cached in the previous step.
6465
with:
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: 8 additions & 2 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:
@@ -42,7 +46,7 @@ jobs:
4246
export REGISTRY="docker.io/karmada"
4347
make image-${{ matrix.target }}
4448
- name: Run Trivy vulnerability scanner
45-
uses: aquasecurity/trivy-action@0.29.0
49+
uses: aquasecurity/trivy-action@0.32.0
4650
env:
4751
ACTIONS_RUNTIME_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4852
TRIVY_DB_REPOSITORY: ghcr.io/aquasecurity/trivy-db,public.ecr.aws/aquasecurity/trivy-db
@@ -52,15 +56,17 @@ jobs:
5256
ignore-unfixed: true
5357
vuln-type: 'os,library'
5458
output: 'trivy-results.sarif'
59+
cache: false
5560
- name: display scan results
56-
uses: aquasecurity/trivy-action@0.29.0
61+
uses: aquasecurity/trivy-action@0.32.0
5762
env:
5863
TRIVY_SKIP_DB_UPDATE: true # Avoid updating the vulnerability db as it was cached in the previous step.
5964
with:
6065
image-ref: 'docker.io/karmada/${{ matrix.target }}:latest'
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:

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ jobs:
167167
steps:
168168
- uses: actions/checkout@v4
169169
- name: Generate sbom for karmada file system
170-
uses: aquasecurity/trivy-action@0.29.0
170+
uses: aquasecurity/trivy-action@0.32.0
171171
with:
172172
scan-type: 'fs'
173173
format: 'spdx'

0 commit comments

Comments
 (0)