-
Notifications
You must be signed in to change notification settings - Fork 56
40 lines (36 loc) · 1010 Bytes
/
test-tfsec.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
name: Terraform security scanner
on:
workflow_dispatch:
push:
branches:
- main
- "release/**"
paths:
- "**.tf"
- ".github/workflows/test-tfsec.yml"
pull_request:
paths:
- "**.tf"
- ".github/workflows/test-tfsec.yml"
jobs:
tfsec:
name: tfsec
runs-on: ubuntu-22.04
permissions:
contents: read
pull-requests: write
steps:
- name: Checkout
uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0
with:
ref: ${{ !github.event.pull_request.head.repo.fork && github.head_ref || '' }}
- name: tfsec
uses: aquasecurity/tfsec-pr-commenter-action@5b483d46fb4fd0cbe2259cf68354a3fb23aa70fe
with:
soft_fail_commenter: true
tfsec_formats: default,text
tfsec_args: --force-all-dirs
github_token: ${{ github.token }}
- name: tfsec summary
shell: bash
run: tail -n 27 results.text >> "$GITHUB_STEP_SUMMARY"