2022-09-20 07:38:37 -04:00
|
|
|
name: Terraform security scanner
|
|
|
|
|
|
|
|
on:
|
|
|
|
workflow_dispatch:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- main
|
2022-10-18 10:17:41 -04:00
|
|
|
- "release/**"
|
2022-09-20 07:38:37 -04:00
|
|
|
paths:
|
|
|
|
- "**.tf"
|
|
|
|
pull_request:
|
|
|
|
paths:
|
|
|
|
- "**.tf"
|
|
|
|
|
|
|
|
permissions:
|
|
|
|
contents: read
|
|
|
|
pull-requests: write
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
tfsec:
|
|
|
|
name: tfsec
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- name: Checkout
|
2022-10-18 07:00:41 -04:00
|
|
|
uses: actions/checkout@1f9a0c22da41e6ebfa534300ef656657ea2c6707
|
2022-09-20 07:38:37 -04:00
|
|
|
with:
|
2022-10-19 04:32:22 -04:00
|
|
|
ref: ${{ github.head_ref }}
|
2022-09-20 07:38:37 -04:00
|
|
|
|
|
|
|
- name: tfsec
|
2022-10-13 10:49:33 -04:00
|
|
|
uses: aquasecurity/tfsec-pr-commenter-action@d9fa64305ec243e19f9be1200dfc8e8154dc364f
|
2022-09-20 07:38:37 -04:00
|
|
|
with:
|
2022-10-20 04:34:28 -04:00
|
|
|
soft_fail_commenter: true
|
2022-09-20 07:38:37 -04:00
|
|
|
tfsec_formats: default,text
|
|
|
|
tfsec_args: --force-all-dirs
|
|
|
|
github_token: ${{ github.token }}
|
|
|
|
|
|
|
|
- name: tfsec summary
|
|
|
|
shell: bash
|
|
|
|
run: cat results.text | tail -n 27 >> $GITHUB_STEP_SUMMARY
|