Merge pull request #807 from ministryofjustice/feature/remove-s3 #204
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: terraform-tools | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
workflow_dispatch: | |
jobs: | |
tfsec: | |
runs-on: ubuntu-latest | |
permissions: | |
security-events: write | |
steps: | |
- uses: actions/[email protected] | |
- run: rm -r modules/ # remove modules from being security checked | |
- run: rm -r terraform/ # remove legacy terraform dir from being security checked | |
- uses: aquasecurity/[email protected] | |
with: | |
tfsec_args: --force-all-dirs --soft-fail -m CRITICAL | |
sarif_file: tfsec.sarif | |
- uses: github/codeql-action/upload-sarif@v2 | |
with: | |
sarif_file: tfsec.sarif | |
tflint: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/[email protected] | |
- uses: actions/[email protected] | |
with: | |
path: ~/.tflint.d/plugins | |
key: tflint-${{ hashFiles('.tflint.hcl') }} | |
- uses: terraform-linters/[email protected] | |
with: | |
tflint_version: latest | |
- run: tflint --version | |
- run: tflint -c $(realpath .tflint.hcl) --init | |
env: | |
GITHUB_TOKEN: ${{ github.token }} # https://github.com/terraform-linters/tflint/blob/master/docs/user-guide/plugins.md#avoiding-rate-limiting | |
- run: rm -r modules/ # remove modules from being linted | |
- run: rm -r terraform/ # remove legacy terraform dir from being linted | |
- run: tflint -c $(realpath .tflint.hcl) -f compact --recursive |