Skip to content

Commit

Permalink
added tflint
Browse files Browse the repository at this point in the history
  • Loading branch information
davenicoll committed May 25, 2023
1 parent 0939cfd commit d1b7b21
Show file tree
Hide file tree
Showing 5 changed files with 40 additions and 20 deletions.
17 changes: 10 additions & 7 deletions Dockerfile/full-alpine-amd64
Original file line number Diff line number Diff line change
Expand Up @@ -64,16 +64,19 @@ RUN wget -nv https://github.com/hadolint/hadolint/releases/download/v${hadolint_
&& mv hadolint-Linux-x86_64 /usr/local/bin/hadolint \
&& chmod 755 /usr/local/bin/hadolint

# Install TFLint (https://github.com/terraform-linters/tflint)
ARG tflint_version=0.45.0
RUN wget -nv https://github.com/terraform-linters/tflint/releases/download/v${tflint_version}/tflint_linux_amd64.zip \
&& unzip -d /usr/local/bin tflint_linux_amd64.zip \
&& rm tflint_linux_amd64.zip
# Install tflint (https://github.com/terraform-linters/tflint)
RUN export tflintrelease="$(curl -Ls -o /dev/null -w %{url_effective} "https://github.com/terraform-linters/tflint/releases/latest" | awk -F / '{print substr($NF,2);}')" \
&& echo "Installing tflint v${tfsecrelease}" \
&& wget https://github.com/terraform-linters/tflint/releases/download/v${tflintrelease}/tflint_linux_amd64.zip \
&& unzip tflint_linux_amd64.zip \
&& mv tflint /usr/bin/tflint \
&& chmod +x /usr/bin/tflint

# Install tfsec (https://github.com/aquasecurity/tfsec)
RUN export tfsecrelease="$(curl -Ls -o /dev/null -w %{url_effective} "https://github.com/aquasecurity/tfsec/releases/latest" | awk -F / '{print substr($NF,1);}')" \
RUN export tfsecrelease="$(curl -Ls -o /dev/null -w %{url_effective} "https://github.com/aquasecurity/tfsec/releases/latest" | awk -F / '{print substr($NF,2);}')" \
&& echo "Installing tfsec v${tfsecrelease}" \
&& wget https://github.com/aquasecurity/tfsec/releases/download/${tfsecrelease}/tfsec-linux-amd64 \
&& wget https://github.com/aquasecurity/tfsec/releases/download/v${tfsecrelease}/tfsec-linux-amd64 \
&& mv tfsec-linux-amd64 /usr/bin/tfsec \
&& chmod +x /usr/bin/tfsec


16 changes: 9 additions & 7 deletions Dockerfile/full-ubuntu-amd64
Original file line number Diff line number Diff line change
Expand Up @@ -66,15 +66,17 @@ RUN wget -nv https://github.com/hadolint/hadolint/releases/download/v${hadolint_
&& mv hadolint-Linux-x86_64 /usr/local/bin/hadolint \
&& chmod 755 /usr/local/bin/hadolint

# Install TFLint (https://github.com/terraform-linters/tflint)
ARG tflint_version=0.45.0
RUN wget -nv https://github.com/terraform-linters/tflint/releases/download/v${tflint_version}/tflint_linux_amd64.zip \
&& unzip -d /usr/local/bin tflint_linux_amd64.zip \
&& rm tflint_linux_amd64.zip
# Install tflint (https://github.com/terraform-linters/tflint)
RUN export tflintrelease="$(curl -Ls -o /dev/null -w %{url_effective} "https://github.com/terraform-linters/tflint/releases/latest" | awk -F / '{print substr($NF,2);}')" \
&& echo "Installing tflint v${tfsecrelease}" \
&& wget https://github.com/terraform-linters/tflint/releases/download/v${tflintrelease}/tflint_linux_amd64.zip \
&& unzip tflint_linux_amd64.zip \
&& mv tflint /usr/bin/tflint \
&& chmod +x /usr/bin/tflint

# Install tfsec (https://github.com/aquasecurity/tfsec)
RUN export tfsecrelease="$(curl -Ls -o /dev/null -w %{url_effective} "https://github.com/aquasecurity/tfsec/releases/latest" | awk -F / '{print substr($NF,1);}')" \
RUN export tfsecrelease="$(curl -Ls -o /dev/null -w %{url_effective} "https://github.com/aquasecurity/tfsec/releases/latest" | awk -F / '{print substr($NF,2);}')" \
&& echo "Installing tfsec v${tfsecrelease}" \
&& wget https://github.com/aquasecurity/tfsec/releases/download/${tfsecrelease}/tfsec-linux-amd64 \
&& wget https://github.com/aquasecurity/tfsec/releases/download/v${tfsecrelease}/tfsec-linux-amd64 \
&& mv tfsec-linux-amd64 /usr/bin/tfsec \
&& chmod +x /usr/bin/tfsec
13 changes: 10 additions & 3 deletions Dockerfile/standard-alpine-amd64
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,17 @@ RUN export atmosrelease="$(curl -Ls -o /dev/null -w %{url_effective} https://git
&& mv atmos_${atmosrelease}_linux_amd64 /usr/bin/atmos \
&& chmod +x /usr/bin/atmos

# Install tflint (https://github.com/terraform-linters/tflint)
RUN export tflintrelease="$(curl -Ls -o /dev/null -w %{url_effective} "https://github.com/terraform-linters/tflint/releases/latest" | awk -F / '{print substr($NF,2);}')" \
&& echo "Installing tflint v${tfsecrelease}" \
&& wget https://github.com/terraform-linters/tflint/releases/download/v${tflintrelease}/tflint_linux_amd64.zip \
&& unzip tflint_linux_amd64.zip \
&& mv tflint /usr/bin/tflint \
&& chmod +x /usr/bin/tflint

# Install tfsec (https://github.com/aquasecurity/tfsec)
RUN export tfsecrelease="$(curl -Ls -o /dev/null -w %{url_effective} "https://github.com/aquasecurity/tfsec/releases/latest" | awk -F / '{print substr($NF,1);}')" \
RUN export tfsecrelease="$(curl -Ls -o /dev/null -w %{url_effective} "https://github.com/aquasecurity/tfsec/releases/latest" | awk -F / '{print substr($NF,2);}')" \
&& echo "Installing tfsec v${tfsecrelease}" \
&& wget https://github.com/aquasecurity/tfsec/releases/download/${tfsecrelease}/tfsec-linux-amd64 \
&& wget https://github.com/aquasecurity/tfsec/releases/download/v${tfsecrelease}/tfsec-linux-amd64 \
&& mv tfsec-linux-amd64 /usr/bin/tfsec \
&& chmod +x /usr/bin/tfsec

12 changes: 10 additions & 2 deletions Dockerfile/standard-ubuntu-amd64
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,18 @@ RUN export atmosrelease="$(curl -Ls -o /dev/null -w %{url_effective} https://git
&& mv atmos_${atmosrelease}_linux_amd64 /usr/bin/atmos \
&& chmod +x /usr/bin/atmos

# Install tflint (https://github.com/terraform-linters/tflint)
RUN export tflintrelease="$(curl -Ls -o /dev/null -w %{url_effective} "https://github.com/terraform-linters/tflint/releases/latest" | awk -F / '{print substr($NF,2);}')" \
&& echo "Installing tflint v${tfsecrelease}" \
&& wget https://github.com/terraform-linters/tflint/releases/download/v${tflintrelease}/tflint_linux_amd64.zip \
&& unzip tflint_linux_amd64.zip \
&& mv tflint /usr/bin/tflint \
&& chmod +x /usr/bin/tflint

# Install tfsec (https://github.com/aquasecurity/tfsec)
RUN export tfsecrelease="$(curl -Ls -o /dev/null -w %{url_effective} "https://github.com/aquasecurity/tfsec/releases/latest" | awk -F / '{print substr($NF,1);}')" \
RUN export tfsecrelease="$(curl -Ls -o /dev/null -w %{url_effective} "https://github.com/aquasecurity/tfsec/releases/latest" | awk -F / '{print substr($NF,2);}')" \
&& echo "Installing tfsec v${tfsecrelease}" \
&& wget https://github.com/aquasecurity/tfsec/releases/download/${tfsecrelease}/tfsec-linux-amd64 \
&& wget https://github.com/aquasecurity/tfsec/releases/download/v${tfsecrelease}/tfsec-linux-amd64 \
&& mv tfsec-linux-amd64 /usr/bin/tfsec \
&& chmod +x /usr/bin/tfsec

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ docker pull ghcr.io/slalombuild/pe-toolkit-standard-ubuntu-amd64:latest

| Standard | Full |
| --- | --- |
| `terraform`<br/> `atmos`<br/> `curl`<br/> `bash`<br/> `jq`<br/> `yq`<br/> `figlet`<br/> `unzip`<br/> `zip`<br/> `git`<br/> `shellcheck`<br/> `nano`<br/> `tfsec` <br/>| _everything in standard_<br/> `terraform-docs`<br/> `node` and `npm`<br/> `python` and `pip`<br/> `go`<br/> |
| `terraform`<br/> `atmos`<br/> `curl`<br/> `bash`<br/> `jq`<br/> `yq`<br/> `figlet`<br/> `unzip`<br/> `zip`<br/> `git`<br/> `shellcheck`<br/> `nano`<br/> `tflint`<br/> `tfsec`<br/>| _everything in standard_<br/> `terraform-docs`<br/> `node` and `npm`<br/> `python` and `pip`<br/> `go`<br/> |

#### I'd like the image(s) to include x, can I add it?

Expand Down

0 comments on commit d1b7b21

Please sign in to comment.