File tree Expand file tree Collapse file tree 2 files changed +29
-18
lines changed Expand file tree Collapse file tree 2 files changed +29
-18
lines changed Original file line number Diff line number Diff line change 25
25
GITHUB_BUILD_DIR : ${{github.workspace}}
26
26
27
27
jobs :
28
- trivy :
29
- name : trivy
30
- runs-on : ubuntu-22.04
31
- steps :
32
- - name : Checkout code
33
- uses : actions/checkout@v4
34
- - name : Run Trivy vulnerability scanner in repo mode
35
- uses : aquasecurity/trivy-action@0.22.0
36
- with :
37
- scan-type : ' fs'
38
- ignore-unfixed : true
39
- format : ' sarif'
40
- output : ' trivy-results.sarif'
41
- severity : ' CRITICAL,HIGH'
42
- - name : Upload Trivy scan results to GitHub Security tab
43
- uses : github/codeql-action/upload-sarif@v3
44
- with :
45
- sarif_file : ' trivy-results.sarif'
46
28
test-lint :
47
29
runs-on : ubuntu-22.04
48
30
steps :
Original file line number Diff line number Diff line change
1
+ name : trivy check
2
+ on :
3
+ pull_request :
4
+ branches :
5
+ - master
6
+ push :
7
+ branches :
8
+ - master
9
+ jobs :
10
+ trivy :
11
+ permissions :
12
+ # for github/codeql-action/upload-sarif to upload SARIF results
13
+ security-events : write
14
+ runs-on : ubuntu-22.04
15
+ steps :
16
+ - name : Checkout code
17
+ uses : actions/checkout@v4
18
+ - name : Run Trivy vulnerability scanner in repo mode
19
+ uses : aquasecurity/trivy-action@0.22.0
20
+ with :
21
+ scan-type : ' fs'
22
+ ignore-unfixed : true
23
+ format : ' sarif'
24
+ output : ' trivy-results.sarif'
25
+ severity : ' CRITICAL,HIGH'
26
+ - name : Upload Trivy scan results to GitHub Security tab
27
+ uses : github/codeql-action/upload-sarif@v3
28
+ with :
29
+ sarif_file : ' trivy-results.sarif'
You can’t perform that action at this time.
0 commit comments