File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff 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 ---
4452RUN curl -fsSL https://apt.releases.hashicorp.com/gpg | gpg --dearmor -o /usr/share/keyrings/hashicorp-archive-keyring.gpg && \
You can’t perform that action at this time.
0 commit comments