Skip to content

chore: respect the upcoming changes in ECS Tagging #201

chore: respect the upcoming changes in ECS Tagging

chore: respect the upcoming changes in ECS Tagging #201

name: "static analysis"
on:
pull_request:
branches:
- main
push:
branches:
- main
jobs:
validate:
name: validate
runs-on: ubuntu-latest
strategy:
matrix:
terraform: [ ~1.7 ]
steps:
- uses: actions/checkout@v4
- uses: actions/cache@v4
with:
path: ~/.tflint.d/plugins
key: ${{ matrix.os }}-tflint-${{ hashFiles('.tflint.hcl') }}
- uses: hashicorp/setup-terraform@v3
with:
terraform_version: ${{ matrix.terraform }}
- uses: terraform-linters/setup-tflint@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
- run: make fmt
- run: make validate
- run: make tflint
- name: trivy config
run: |
cat >> ./trivy.yaml << EOF
# see https://aquasecurity.github.io/trivy/latest/docs/references/configuration/config-file/ for reference
exit-code: 1
exit-on-eol: 1
misconfiguration:
terraform:
exclude-downloaded-modules: true
severity:
- HIGH
- CRITICAL
scan:
skip-dirs:
- "**/.terraform/**/*"
EOF
cat ./trivy.yaml
- uses: aquasecurity/trivy-action@0.19.0
with:
scan-type: 'config'
hide-progress: false
trivy-config: trivy.yaml