Skip to content

Commit cc61845

Browse files
authored
Create Trivy_IaC.yml
1 parent 43a50e4 commit cc61845

File tree

1 file changed

+36
-0
lines changed

1 file changed

+36
-0
lines changed

.github/workflows/Trivy_IaC.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
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'

0 commit comments

Comments
 (0)