File tree Expand file tree Collapse file tree 1 file changed +11
-3
lines changed Expand file tree Collapse file tree 1 file changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -22,20 +22,28 @@ jobs:
22
22
wget -qO - https://aquasecurity.github.io/trivy-repo/deb/public.key | sudo apt-key add -
23
23
echo deb https://aquasecurity.github.io/trivy-repo/deb $(lsb_release -cs) main | sudo tee -a /etc/apt/sources.list.d/trivy.list
24
24
sudo apt-get update && sudo apt-get install -yq trivy
25
+
25
26
build :
26
27
name : IaC Scan
27
28
runs-on : ubuntu-20.04
28
29
steps :
29
30
- name : Checkout code
30
31
uses : actions/checkout@v4
32
+
31
33
- name : Run Trivy vulnerability scanner in fs mode
32
34
uses : aquasecurity/trivy-action@master
33
35
with :
34
36
scan-type : " fs"
35
37
scanners : " misconfig"
36
38
scan-ref : " ."
37
39
hide-progress : false
38
- format : " table "
40
+ format : " sarif "
39
41
ignore-unfixed : true
40
- # severity: "HIGH,CRITICAL,MEDIUM"
41
- # exit-code: 1
42
+ output : " trivy-results.sarif"
43
+ severity : " HIGH,CRITICAL,MEDIUM"
44
+
45
+ - name : Upload Trivy results to GitHub Actions
46
+ uses : github/codeql-action/upload-sarif@v3
47
+ if : always()
48
+ with :
49
+ sarif_file : " trivy-results.sarif"
You can’t perform that action at this time.
0 commit comments