2022-09-20 11:38:37 +00:00
|
|
|
name: Terraform security scanner
|
|
|
|
|
|
|
|
on:
|
|
|
|
workflow_dispatch:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- main
|
2022-10-18 14:17:41 +00:00
|
|
|
- "release/**"
|
2022-09-20 11:38:37 +00:00
|
|
|
paths:
|
|
|
|
- "**.tf"
|
|
|
|
pull_request:
|
|
|
|
paths:
|
|
|
|
- "**.tf"
|
|
|
|
|
|
|
|
permissions:
|
|
|
|
contents: read
|
|
|
|
pull-requests: write
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
tfsec:
|
|
|
|
name: tfsec
|
2022-11-10 15:55:24 +00:00
|
|
|
runs-on: ubuntu-22.04
|
2022-09-20 11:38:37 +00:00
|
|
|
steps:
|
|
|
|
- name: Checkout
|
2022-12-14 13:55:14 +00:00
|
|
|
uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b # v3.2.0
|
2022-09-20 11:38:37 +00:00
|
|
|
with:
|
2022-10-19 08:32:22 +00:00
|
|
|
ref: ${{ github.head_ref }}
|
2022-09-20 11:38:37 +00:00
|
|
|
|
|
|
|
- name: tfsec
|
2022-11-04 10:58:54 +00:00
|
|
|
uses: aquasecurity/tfsec-pr-commenter-action@7a44c5dcde5dfab737363e391800629e27b6376b
|
2022-09-20 11:38:37 +00:00
|
|
|
with:
|
2022-10-20 08:34:28 +00:00
|
|
|
soft_fail_commenter: true
|
2022-09-20 11:38:37 +00:00
|
|
|
tfsec_formats: default,text
|
|
|
|
tfsec_args: --force-all-dirs
|
|
|
|
github_token: ${{ github.token }}
|
|
|
|
|
|
|
|
- name: tfsec summary
|
|
|
|
shell: bash
|
2022-11-11 13:49:16 +00:00
|
|
|
run: tail -n 27 results.text >> "$GITHUB_STEP_SUMMARY"
|