File tree Expand file tree Collapse file tree 1 file changed +36
-0
lines changed Expand file tree Collapse file tree 1 file changed +36
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : Trivy_IaC
2
+ on :
3
+
4
+ push :
5
+ branches : ["main"]
6
+ pull_request :
7
+ branches : ["main"]
8
+ workflow_dispatch :
9
+
10
+ jobs :
11
+ build :
12
+ name : Build
13
+ runs-on : " ubuntu-latest"
14
+ permissions :
15
+ actions : read
16
+ contents : read
17
+ security-events : write
18
+
19
+ steps :
20
+ - name : Checkout code
21
+ uses : actions/checkout@v4
22
+
23
+ - name : Run Trivy vulnerability scanner in IaC mode
24
+ uses : aquasecurity/trivy-action@0.28.0
25
+ with :
26
+ scan-type : ' config'
27
+ hide-progress : false
28
+ format : ' sarif'
29
+ output : ' trivy-results.sarif'
30
+ # exit-code: '1'
31
+ # severity: 'CRITICAL,HIGH'
32
+
33
+ - name : Upload Trivy scan results to GitHub Security tab
34
+ uses : github/codeql-action/upload-sarif@v3
35
+ with :
36
+ sarif_file : ' trivy-results.sarif'
You can’t perform that action at this time.
0 commit comments