Skip to content

Commit d76d5de

Browse files
authored
Checksum verification for tflint (#5719)
2 parents d409352 + e3887b7 commit d76d5de

2 files changed

Lines changed: 9 additions & 3 deletions

File tree

tools/cloud-workstations/Dockerfile

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,14 @@ RUN wget https://github.com/koalaman/shellcheck/releases/download/${SHELLCHECK_V
3737
mv shellcheck-${SHELLCHECK_VER}/shellcheck /usr/local/bin/shellcheck && \
3838
rm -rf shellcheck-*
3939

40-
# --- Install TFLint ---
41-
RUN curl -s https://raw.githubusercontent.com/terraform-linters/tflint/master/install_linux.sh | bash
40+
# --- Install TFLint Securely ---
41+
RUN TFLINT_ZIP_HASH="c004ec45ade3caf87cd4089feb1d2af9f7df57b13140a36df8a63c0a8cc69f14" && \
42+
curl -fsSLo /tmp/tflint_linux_amd64.zip \
43+
https://github.com/terraform-linters/tflint/releases/download/${TFLINT_VERSION:-v0.62.1}/tflint_linux_amd64.zip && \
44+
echo "${TFLINT_ZIP_HASH} /tmp/tflint_linux_amd64.zip" | sha256sum -c - && \
45+
unzip -o /tmp/tflint_linux_amd64.zip -d /usr/local/bin && \
46+
chmod +x /usr/local/bin/tflint && \
47+
rm -f /tmp/tflint_linux_amd64.zip
4248

4349
# --- Add HashiCorp Repo and Install Terraform/Packer ---
4450
RUN curl -fsSL https://apt.releases.hashicorp.com/gpg | gpg --dearmor -o /usr/share/keyrings/hashicorp-archive-keyring.gpg && \

tools/cloud-workstations/workstation-image.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ steps:
2424
- '--cache-from'
2525
- '${_LOCATION}-docker.pkg.dev/${PROJECT_ID}/${_REPO}/hpc-toolkit-workstation:latest'
2626
- '--build-arg'
27-
- 'TFLINT_VERSION=v0.58.1'
27+
- 'TFLINT_VERSION=v0.62.1'
2828
- '-f'
2929
- 'tools/cloud-workstations/Dockerfile'
3030
- '.'

0 commit comments

Comments
 (0)