File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : Scan
2+
3+ on :
4+ push :
5+ branches : [ "main" ]
6+ pull_request :
7+
8+ permissions :
9+ contents : read
10+
11+ jobs :
12+ trivy-iac-scan :
13+ permissions :
14+ contents : read
15+ security-events : write
16+ actions : read # only required for a private repository by github/codeql-action/upload-sarif to get the Action run status
17+ name : Trivy IaC Scan
18+ runs-on : ubuntu-latest
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.33.1
25+ with :
26+ scan-type : ' config'
27+ hide-progress : true
28+ format : ' sarif'
29+ output : ' trivy-results.sarif'
30+
31+ - name : Upload Trivy scan results to GitHub Security tab
32+ if : always()
33+ uses : github/codeql-action/upload-sarif@v4
34+ with :
35+ sarif_file : ' trivy-results.sarif'
Original file line number Diff line number Diff line change 1+ ignorefile : .trivyignore.yaml # experimental so the doc say we must specify it explicitly
You can’t perform that action at this time.
0 commit comments