Skip to content

Instantly share code, notes, and snippets.

@obrientimothya
Last active August 29, 2021 16:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save obrientimothya/c23d075ea20ee3ae03fb922d166a5509 to your computer and use it in GitHub Desktop.
Save obrientimothya/c23d075ea20ee3ae03fb922d166a5509 to your computer and use it in GitHub Desktop.
secure-docker-image
# The following digest is alpine:3.10.6
# This image has known security issues.
# Therefore, it can be used to test the scan in the GitHub Actions pipeline.
FROM alpine@sha256:abd435b2a549002f78ec235cca4677237e6b8cfa9f7d15a2ea1e644596ff71d2
ARG GOSS_VERSION
ARG TF_VERSION
ARG TFLINT_VERSION
ARG TFSEC_VERSION
RUN wget -q \
"https://releases.hashicorp.com/terraform/${TF_VERSION}/terraform_${TF_VERSION}_linux_amd64.zip" \
&& unzip "./terraform_${TF_VERSION}_linux_amd64.zip" -d /usr/local/bin/ \
&& rm -f "./terraform_${TF_VERSION}_linux_amd64.zip"
RUN wget -q \
"https://github.com/terraform-linters/tflint/releases/download/v${TFLINT_VERSION}/tflint_linux_amd64.zip" \
&& unzip tflint_linux_amd64.zip -d /usr/local/bin/ \
&& rm -f ./tflint_linux_amd64.zip
RUN wget -q \
"https://github.com/liamg/tfsec/releases/download/v${TFSEC_VERSION}/tfsec-linux-amd64" \
&& mv tfsec-linux-amd64 /usr/local/bin/tfsec \
&& chmod +x /usr/local/bin/tfsec
RUN wget -q "https://github.com/aelsabbahy/goss/releases/download/v${GOSS_VERSION}/goss-linux-amd64" \
&& mv goss-linux-amd64 /usr/local/bin/goss \
&& chmod +x /usr/local/bin/goss
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment