-
Notifications
You must be signed in to change notification settings - Fork 0
42 lines (34 loc) · 950 Bytes
/
ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
name: Continuous Integration
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
analyze:
name: Analyze the Terraform scripts
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write
steps:
- name: Clone repository
uses: actions/checkout@v3
- name: Setup Terraform CLI
uses: hashicorp/setup-terraform@v2
- name: Run Terraform init
run: terraform init
- name: Run Terraform format check
run: terraform fmt -check -recursive
- name: Run Terraform validate check
run: terraform validate
- name: Run tfsec
uses: aquasecurity/tfsec-sarif-action@v0.1.4
with:
config_file: tfsec.yml
sarif_file: tfsec.sarif
- name: Upload SARIF file
uses: github/codeql-action/upload-sarif@v2
with:
sarif_file: tfsec.sarif