diff --git a/.github/workflows/terraform-static-analysis.yml b/.github/workflows/terraform-static-analysis.yml new file mode 100644 index 0000000..09d6de3 --- /dev/null +++ b/.github/workflows/terraform-static-analysis.yml @@ -0,0 +1,31 @@ +name: Terraform static code analysis + +on: + pull_request: + branches: + - "main" + push: + branches: + - "*" + +permissions: + id-token: write + contents: read + +jobs: + terraform-static-analysis: + name: Terraform Static Analysis + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v3 + with: + fetch-depth: 0 + - name: Run Analysis + uses: ministryofjustice/github-actions/terraform-static-analysis@main + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + scan_type: full + checkov_exclude: "CKV_TF_1,CKV_AWS_274" + checkov_external_modules: true