Skip to content

Commit 3bd17b2

Browse files
Add terraform scanner
1 parent 2cfdbe4 commit 3bd17b2

1 file changed

Lines changed: 34 additions & 0 deletions

File tree

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: Terraform Security Scan
2+
3+
on:
4+
pull_request:
5+
paths:
6+
- '**/*.tf'
7+
- '**/*.tfvars'
8+
- '**/*.hcl'
9+
10+
permissions:
11+
contents: read
12+
security-events: write
13+
14+
jobs:
15+
tfsec:
16+
name: Run tfsec on PR
17+
runs-on: ubuntu-latest
18+
19+
steps:
20+
- name: Checkout code
21+
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
22+
23+
- name: Run tfsec
24+
uses: aquasecurity/tfsec-action@v1.0.3
25+
with:
26+
format: sarif
27+
additional_args: --out tfsec.sarif
28+
soft_fail: false
29+
30+
- name: Upload tfsec SARIF
31+
if: always()
32+
uses: github/codeql-action/upload-sarif@v3
33+
with:
34+
sarif_file: tfsec.sarif

0 commit comments

Comments
 (0)