Skip to content

Commit 1a8e5b4

Browse files
committed
Add checksum verification
1 parent 57e7174 commit 1a8e5b4

1 file changed

Lines changed: 10 additions & 2 deletions

File tree

tools/cloud-workstations/Dockerfile

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,16 @@ 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 curl -fsSLo /tmp/tflint_linux_amd64.zip \
42+
https://github.com/terraform-linters/tflint/releases/download/${TFLINT_VERSION}/tflint_linux_amd64.zip && \
43+
curl -fsSLo /tmp/checksums.txt \
44+
https://github.com/terraform-linters/tflint/releases/download/${TFLINT_VERSION}/checksums.txt && \
45+
cd /tmp && \
46+
grep "tflint_linux_amd64.zip" checksums.txt | sha256sum -c - && \
47+
unzip /tmp/tflint_linux_amd64.zip -d /usr/local/bin && \
48+
chmod +x /usr/local/bin/tflint && \
49+
rm -f /tmp/tflint_linux_amd64.zip /tmp/checksums.txt
4250

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

0 commit comments

Comments
 (0)