Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add tfsec #16

Merged
merged 6 commits into from
May 18, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 20 additions & 12 deletions Dockerfile/full-alpine-amd64
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,18 @@ FROM alpine:latest
RUN apk update && \
apk upgrade && \
apk add --update --no-cache \
curl \
bash \
jq \
yq \
figlet \
unzip \
zip \
git \
shellcheck \
nano \
tar && \
rm -rf /var/cache/apk/*
curl \
bash \
jq \
yq \
figlet \
unzip \
zip \
git \
shellcheck \
nano \
tar && \
rm -rf /var/cache/apk/*

# Install languages, libraries and frameworks
RUN apk add --update \
Expand Down Expand Up @@ -69,3 +69,11 @@ 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 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);}')" \
&& echo "Installing tfsec v${tfsecrelease}" \
&& wget https://github.com/aquasecurity/tfsec/releases/download/${tfsecrelease}/tfsec-linux-amd64 \
&& mv tfsec-linux-amd64 /usr/bin/tfsec \
&& chmod +x /usr/bin/tfsec

33 changes: 20 additions & 13 deletions Dockerfile/full-ubuntu-amd64
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,19 @@ FROM ubuntu:latest
RUN apt update -yq && \
apt upgrade -yq && \
apt install -yq --no-install-recommends --no-install-suggests \
ca-certificates \
apt-transport-https \
wget \
curl \
bash \
jq \
figlet \
unzip \
zip \
git \
shellcheck \
nano \
tar
ca-certificates \
apt-transport-https \
wget \
curl \
bash \
jq \
figlet \
unzip \
zip \
git \
shellcheck \
nano \
tar

# Install languages, libraries and frameworks
RUN apt install -yq --no-install-recommends --no-install-suggests \
Expand Down Expand Up @@ -71,3 +71,10 @@ 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 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);}')" \
&& echo "Installing tfsec v${tfsecrelease}" \
&& wget https://github.com/aquasecurity/tfsec/releases/download/${tfsecrelease}/tfsec-linux-amd64 \
&& mv tfsec-linux-amd64 /usr/bin/tfsec \
&& chmod +x /usr/bin/tfsec
30 changes: 19 additions & 11 deletions Dockerfile/standard-alpine-amd64
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,17 @@ FROM alpine:latest
RUN apk update && \
apk upgrade && \
apk add --update --no-cache \
curl \
bash \
jq \
yq \
figlet \
unzip \
zip \
git \
shellcheck \
nano && \
rm -rf /var/cache/apk/*
curl \
bash \
jq \
yq \
figlet \
unzip \
zip \
git \
shellcheck \
nano && \
rm -rf /var/cache/apk/*

# Install terraform (https://github.com/hashicorp/terraform)
RUN export tfrelease="$(curl -Ls -o /dev/null -w %{url_effective} https://github.com/hashicorp/terraform/releases/latest | awk -F / '{print substr($NF,2);}')" \
Expand All @@ -29,3 +29,11 @@ RUN export atmosrelease="$(curl -Ls -o /dev/null -w %{url_effective} https://git
&& wget https://github.com/cloudposse/atmos/releases/download/v${atmosrelease}/atmos_${atmosrelease}_linux_amd64 \
&& mv atmos_${atmosrelease}_linux_amd64 /usr/bin/atmos \
&& chmod +x /usr/bin/atmos

# 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);}')" \
&& echo "Installing tfsec v${tfsecrelease}" \
&& wget https://github.com/aquasecurity/tfsec/releases/download/${tfsecrelease}/tfsec-linux-amd64 \
&& mv tfsec-linux-amd64 /usr/bin/tfsec \
&& chmod +x /usr/bin/tfsec

32 changes: 20 additions & 12 deletions Dockerfile/standard-ubuntu-amd64
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,18 @@ FROM ubuntu:latest
RUN apt update -yq && \
apt upgrade -yq && \
apt install -yq --no-install-recommends --no-install-suggests \
ca-certificates \
wget \
curl \
bash \
jq \
figlet \
unzip \
zip \
git \
shellcheck \
nano && \
rm -rf /var/lib/apt/lists/*
ca-certificates \
wget \
curl \
bash \
jq \
figlet \
unzip \
zip \
git \
shellcheck \
nano && \
rm -rf /var/lib/apt/lists/*

# Install terraform (https://github.com/hashicorp/terraform)
RUN export tfrelease="$(curl -Ls -o /dev/null -w %{url_effective} https://github.com/hashicorp/terraform/releases/latest | awk -F / '{print substr($NF,2);}')" \
Expand All @@ -30,3 +30,11 @@ RUN export atmosrelease="$(curl -Ls -o /dev/null -w %{url_effective} https://git
&& wget https://github.com/cloudposse/atmos/releases/download/v${atmosrelease}/atmos_${atmosrelease}_linux_amd64 \
&& mv atmos_${atmosrelease}_linux_amd64 /usr/bin/atmos \
&& chmod +x /usr/bin/atmos

# 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);}')" \
&& echo "Installing tfsec v${tfsecrelease}" \
&& wget https://github.com/aquasecurity/tfsec/releases/download/${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/> | _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/> `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