Skip to content

Commit 5310e35

Browse files
pohanhuangmergify[bot]
authored andcommitted
fix: trivy vex issue (#1286)
* fix: trivy vex issue Signed-off-by: pohanhuang <pohan.huang@suse.com> * fix: rollback to v** Signed-off-by: pohanhuang <pohan.huang@suse.com> --------- Signed-off-by: pohanhuang <pohan.huang@suse.com> (cherry picked from commit 83e0a2e)
1 parent a461a21 commit 5310e35

1 file changed

Lines changed: 14 additions & 5 deletions

File tree

.github/workflows/scan.yml

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,21 +9,30 @@ on:
99
jobs:
1010
build:
1111
name: Build
12-
runs-on: ubuntu-24.04
12+
runs-on: ubuntu-latest
1313
steps:
1414
- name: Checkout code
15-
uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3
15+
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
16+
17+
- name: Download Rancher's VEX Hub report
18+
run: |
19+
curl -fsSL -H "Accept: application/vnd.git-lfs+json" \
20+
"https://media.githubusercontent.com/media/rancher/vexhub/main/reports/rancher.openvex.json" \
21+
-o rancher.openvex.json
1622
1723
- name: Run Trivy vulnerability scanner in repo mode
18-
uses: aquasecurity/trivy-action@57a97c7e7821a5776cebc9bb87c984fa69cba8f1 # v0.35.0
24+
uses: aquasecurity/trivy-action@57a97c7e7821a5776cebc9bb87c984fa69cba8f1 # v0.35.0
1925
with:
2026
scan-type: 'fs'
2127
ignore-unfixed: true
2228
format: 'sarif'
2329
output: 'trivy-results.sarif'
2430
severity: 'CRITICAL,HIGH,MEDIUM'
31+
env:
32+
TRIVY_VEX: rancher.openvex.json
33+
TRIVY_SHOW_SUPPRESSED: true
2534

2635
- name: Upload Trivy scan results to GitHub Security tab
27-
uses: github/codeql-action/upload-sarif@b8d3b6e8af63cde30bdc382c0bc28114f4346c88 # v2
36+
uses: github/codeql-action/upload-sarif@ebcb5b36ded6beda4ceefea6a8bc4cc885255bb3 # v3.34.1
2837
with:
29-
sarif_file: 'trivy-results.sarif'
38+
sarif_file: 'trivy-results.sarif'

0 commit comments

Comments
 (0)