chore(deps): update terraform-linters/setup-tflint action to v4.1.0 #275
Workflow file for this run
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: review | |
on: | |
pull_request: | |
branches: | |
- main | |
permissions: {} | |
jobs: | |
validate: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
steps: | |
- name: Harden Runner | |
uses: step-security/harden-runner@91182cccc01eb5e619899d80e4e971d6181294a7 # v2.10.1 | |
with: | |
disable-sudo: true | |
egress-policy: block | |
allowed-endpoints: > | |
app.terraform.io:443 | |
archivist.terraform.io:443 | |
checkpoint-api.hashicorp.com:443 | |
github.com:443 | |
registry.terraform.io:443 | |
releases.hashicorp.com:443 | |
- name: Checkout Repo | |
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
with: | |
persist-credentials: false | |
show-progress: false | |
- name: Setup Teraform | |
uses: hashicorp/setup-terraform@b9cd54a3c349d3f38e8881555d616ced269862dd # v3.1.2 | |
with: | |
cli_config_credentials_token: ${{ secrets.TF_API_TOKEN }} | |
- name: Prettify | |
run: terraform fmt -check | |
continue-on-error: true | |
- name: Initialise | |
run: terraform init | |
- name: Validate | |
run: terraform validate -no-color | |
tflint: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
steps: | |
- name: Harden Runner | |
uses: step-security/harden-runner@91182cccc01eb5e619899d80e4e971d6181294a7 # v2.10.1 | |
with: | |
disable-sudo: true | |
egress-policy: block | |
allowed-endpoints: > | |
api.github.com:443 | |
github.com:443 | |
objects.githubusercontent.com:443 | |
- name: Checkout Repo | |
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
with: | |
persist-credentials: false | |
show-progress: false | |
- name: Cache Plugins | |
uses: actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4.1.2 | |
with: | |
path: ~/.tflint.d/plugins | |
key: tflint-${{ hashFiles('.tflint.hcl') }} | |
- name: Setup TFLint | |
uses: terraform-linters/setup-tflint@8093687ecc9dcbfa88d07c103ad4176739a7287e # v4.1.0 | |
with: | |
tflint_version: v0.50.3 | |
- name: Initialise | |
run: tflint --init | |
env: | |
GITHUB_TOKEN: ${{ github.token }} | |
- name: Lint | |
run: tflint -f compact | |
trivy: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
# Needed to upload the results to code-scanning dashboard. | |
security-events: write | |
env: | |
trivy_sarif: trivy.sarif | |
steps: | |
- name: Harden Runner | |
uses: step-security/harden-runner@91182cccc01eb5e619899d80e4e971d6181294a7 # v2.10.1 | |
with: | |
disable-sudo: true | |
egress-policy: block | |
allowed-endpoints: > | |
api.github.com:443 | |
d2glxqk2uabbnd.cloudfront.net:443 | |
d5l0dvt14r5h8.cloudfront.net:443 | |
ghcr.io:443 | |
github.com:443 | |
objects.githubusercontent.com:443 | |
pkg-containers.githubusercontent.com:443 | |
public.ecr.aws:443 | |
raw.githubusercontent.com:443 | |
- name: Checkout Repo | |
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
with: | |
persist-credentials: false | |
show-progress: false | |
- name: Run with SARIF Output | |
uses: aquasecurity/trivy-action@915b19bbe73b92a6cf82a1bc12b087c9a19a5fe2 # 0.28.0 | |
with: | |
scan-type: "fs" | |
format: "sarif" | |
output: ${{ env.trivy_sarif }} | |
env: | |
TRIVY_DB_REPOSITORY: "public.ecr.aws/aquasecurity/trivy-db" | |
TRIVY_JAVA_DB_REPOSITORY: "public.ecr.aws/aquasecurity/trivy-java-db" | |
- name: Report via GitHub CodeQL | |
uses: github/codeql-action/upload-sarif@662472033e021d55d94146f66f6058822b0b39fd # v3.27.0 | |
with: | |
sarif_file: ${{ env.trivy_sarif }} |