Skip to content
Merged
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
5 changes: 3 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
#
# Install required tools
#
ARG PRE_COMMIT_VERSION=${PRE_COMMIT_VERSION:-latest}

Check warning on line 23 in Dockerfile

View workflow job for this annotation

GitHub Actions / Ubuntu ARM

Variables should be defined before their use

UndefinedVar: Usage of undefined variable '$PRE_COMMIT_VERSION' More info: https://docs.docker.com/go/dockerfile/rule/undefined-var/
RUN touch /.env && \
if [ "$PRE_COMMIT_VERSION" = "false" ]; then \
echo "Vital software can't be skipped" && exit 1; \
Expand All @@ -30,19 +30,19 @@
#
# Install tools
#
ARG OPENTOFU_VERSION=${OPENTOFU_VERSION:-false}

Check warning on line 33 in Dockerfile

View workflow job for this annotation

GitHub Actions / Ubuntu ARM

Variables should be defined before their use

UndefinedVar: Usage of undefined variable '$OPENTOFU_VERSION' More info: https://docs.docker.com/go/dockerfile/rule/undefined-var/
ARG TERRAFORM_VERSION=${TERRAFORM_VERSION:-false}

Check warning on line 34 in Dockerfile

View workflow job for this annotation

GitHub Actions / Ubuntu ARM

Variables should be defined before their use

UndefinedVar: Usage of undefined variable '$TERRAFORM_VERSION' More info: https://docs.docker.com/go/dockerfile/rule/undefined-var/

Check warning on line 34 in Dockerfile

View workflow job for this annotation

GitHub Actions / Ubuntu x64

Variables should be defined before their use

UndefinedVar: Usage of undefined variable '$TERRAFORM_VERSION' More info: https://docs.docker.com/go/dockerfile/rule/undefined-var/

Check warning on line 34 in Dockerfile

View workflow job for this annotation

GitHub Actions / Ubuntu x64

Variables should be defined before their use

UndefinedVar: Usage of undefined variable '$TERRAFORM_VERSION' More info: https://docs.docker.com/go/dockerfile/rule/undefined-var/

ARG CHECKOV_VERSION=${CHECKOV_VERSION:-false}

Check warning on line 36 in Dockerfile

View workflow job for this annotation

GitHub Actions / Ubuntu ARM

Variables should be defined before their use

UndefinedVar: Usage of undefined variable '$CHECKOV_VERSION' More info: https://docs.docker.com/go/dockerfile/rule/undefined-var/

Check warning on line 36 in Dockerfile

View workflow job for this annotation

GitHub Actions / Ubuntu x64

Variables should be defined before their use

UndefinedVar: Usage of undefined variable '$CHECKOV_VERSION' More info: https://docs.docker.com/go/dockerfile/rule/undefined-var/

Check warning on line 36 in Dockerfile

View workflow job for this annotation

GitHub Actions / Ubuntu x64

Variables should be defined before their use

UndefinedVar: Usage of undefined variable '$CHECKOV_VERSION' More info: https://docs.docker.com/go/dockerfile/rule/undefined-var/
ARG HCLEDIT_VERSION=${HCLEDIT_VERSION:-false}

Check warning on line 37 in Dockerfile

View workflow job for this annotation

GitHub Actions / Ubuntu ARM

Variables should be defined before their use

UndefinedVar: Usage of undefined variable '$HCLEDIT_VERSION' More info: https://docs.docker.com/go/dockerfile/rule/undefined-var/

Check warning on line 37 in Dockerfile

View workflow job for this annotation

GitHub Actions / Ubuntu x64

Variables should be defined before their use

UndefinedVar: Usage of undefined variable '$HCLEDIT_VERSION' More info: https://docs.docker.com/go/dockerfile/rule/undefined-var/
ARG INFRACOST_VERSION=${INFRACOST_VERSION:-false}

Check warning on line 38 in Dockerfile

View workflow job for this annotation

GitHub Actions / Ubuntu x64

Variables should be defined before their use

UndefinedVar: Usage of undefined variable '$INFRACOST_VERSION' More info: https://docs.docker.com/go/dockerfile/rule/undefined-var/

Check warning on line 38 in Dockerfile

View workflow job for this annotation

GitHub Actions / Ubuntu x64

Variables should be defined before their use

UndefinedVar: Usage of undefined variable '$INFRACOST_VERSION' More info: https://docs.docker.com/go/dockerfile/rule/undefined-var/
ARG TERRAFORM_DOCS_VERSION=${TERRAFORM_DOCS_VERSION:-false}
ARG TERRAGRUNT_VERSION=${TERRAGRUNT_VERSION:-false}

Check warning on line 40 in Dockerfile

View workflow job for this annotation

GitHub Actions / Ubuntu ARM

Variables should be defined before their use

UndefinedVar: Usage of undefined variable '$TERRAGRUNT_VERSION' More info: https://docs.docker.com/go/dockerfile/rule/undefined-var/

Check warning on line 40 in Dockerfile

View workflow job for this annotation

GitHub Actions / Ubuntu x64

Variables should be defined before their use

UndefinedVar: Usage of undefined variable '$TERRAGRUNT_VERSION' More info: https://docs.docker.com/go/dockerfile/rule/undefined-var/

Check warning on line 40 in Dockerfile

View workflow job for this annotation

GitHub Actions / Ubuntu x64

Variables should be defined before their use

UndefinedVar: Usage of undefined variable '$TERRAGRUNT_VERSION' More info: https://docs.docker.com/go/dockerfile/rule/undefined-var/
ARG TERRASCAN_VERSION=${TERRASCAN_VERSION:-false}

Check warning on line 41 in Dockerfile

View workflow job for this annotation

GitHub Actions / Ubuntu ARM

Variables should be defined before their use

UndefinedVar: Usage of undefined variable '$TERRASCAN_VERSION' More info: https://docs.docker.com/go/dockerfile/rule/undefined-var/

Check warning on line 41 in Dockerfile

View workflow job for this annotation

GitHub Actions / Ubuntu x64

Variables should be defined before their use

UndefinedVar: Usage of undefined variable '$TERRASCAN_VERSION' More info: https://docs.docker.com/go/dockerfile/rule/undefined-var/
ARG TFLINT_VERSION=${TFLINT_VERSION:-false}

Check warning on line 42 in Dockerfile

View workflow job for this annotation

GitHub Actions / Ubuntu x64

Variables should be defined before their use

UndefinedVar: Usage of undefined variable '$TFLINT_VERSION' More info: https://docs.docker.com/go/dockerfile/rule/undefined-var/

Check warning on line 42 in Dockerfile

View workflow job for this annotation

GitHub Actions / Ubuntu x64

Variables should be defined before their use

UndefinedVar: Usage of undefined variable '$TFLINT_VERSION' More info: https://docs.docker.com/go/dockerfile/rule/undefined-var/
ARG TFSEC_VERSION=${TFSEC_VERSION:-false}

Check warning on line 43 in Dockerfile

View workflow job for this annotation

GitHub Actions / Ubuntu x64

Variables should be defined before their use

UndefinedVar: Usage of undefined variable '$TFSEC_VERSION' More info: https://docs.docker.com/go/dockerfile/rule/undefined-var/
ARG TFUPDATE_VERSION=${TFUPDATE_VERSION:-false}

Check warning on line 44 in Dockerfile

View workflow job for this annotation

GitHub Actions / Ubuntu ARM

Variables should be defined before their use

UndefinedVar: Usage of undefined variable '$TFUPDATE_VERSION' More info: https://docs.docker.com/go/dockerfile/rule/undefined-var/

Check warning on line 44 in Dockerfile

View workflow job for this annotation

GitHub Actions / Ubuntu x64

Variables should be defined before their use

UndefinedVar: Usage of undefined variable '$TFUPDATE_VERSION' More info: https://docs.docker.com/go/dockerfile/rule/undefined-var/

Check warning on line 44 in Dockerfile

View workflow job for this annotation

GitHub Actions / Ubuntu x64

Variables should be defined before their use

UndefinedVar: Usage of undefined variable '$TFUPDATE_VERSION' More info: https://docs.docker.com/go/dockerfile/rule/undefined-var/
ARG TRIVY_VERSION=${TRIVY_VERSION:-false}

Check warning on line 45 in Dockerfile

View workflow job for this annotation

GitHub Actions / Ubuntu x64

Variables should be defined before their use

UndefinedVar: Usage of undefined variable '$TRIVY_VERSION' More info: https://docs.docker.com/go/dockerfile/rule/undefined-var/


# Tricky thing to install all tools by set only one arg.
Expand Down Expand Up @@ -84,8 +84,9 @@
RUN . /.env && \
F=tools_versions_info && \
pre-commit --version >> $F && \
(if [ "$OPENTOFU_VERSION" != "false" ]; then echo "./tofu --version | head -n 1" >> $F; else echo "opentofu SKIPPED" >> $F ; fi) && \
(if [ "$TERRAFORM_VERSION" != "false" ]; then echo "./terraform --version | head -n 1" >> $F; else echo "terraform SKIPPED" >> $F ; fi) && \
(if [ "$OPENTOFU_VERSION" != "false" ]; then ./tofu --version | head -n 1 >> $F; else echo "opentofu SKIPPED" >> $F ; fi) && \
(if [ "$TERRAFORM_VERSION" != "false" ]; then ./terraform --version | head -n 1 >> $F; else echo "terraform SKIPPED" >> $F ; fi) && \

\
(if [ "$CHECKOV_VERSION" != "false" ]; then echo "checkov $(checkov --version)" >> $F; else echo "checkov SKIPPED" >> $F ; fi) && \
(if [ "$HCLEDIT_VERSION" != "false" ]; then echo "hcledit $(./hcledit version)" >> $F; else echo "hcledit SKIPPED" >> $F ; fi) && \
Expand Down Expand Up @@ -142,9 +143,9 @@

COPY tools/entrypoint.sh /entrypoint.sh

ENV PRE_COMMIT_COLOR=${PRE_COMMIT_COLOR:-always}

Check warning on line 146 in Dockerfile

View workflow job for this annotation

GitHub Actions / Ubuntu ARM

Variables should be defined before their use

UndefinedVar: Usage of undefined variable '$PRE_COMMIT_COLOR' More info: https://docs.docker.com/go/dockerfile/rule/undefined-var/

Check warning on line 146 in Dockerfile

View workflow job for this annotation

GitHub Actions / Ubuntu x64

Variables should be defined before their use

UndefinedVar: Usage of undefined variable '$PRE_COMMIT_COLOR' More info: https://docs.docker.com/go/dockerfile/rule/undefined-var/

ENV INFRACOST_API_KEY=${INFRACOST_API_KEY:-}

Check warning on line 148 in Dockerfile

View workflow job for this annotation

GitHub Actions / Ubuntu ARM

Sensitive data should not be used in the ARG or ENV commands

SecretsUsedInArgOrEnv: Do not use ARG or ENV instructions for sensitive data (ENV "INFRACOST_API_KEY") More info: https://docs.docker.com/go/dockerfile/rule/secrets-used-in-arg-or-env/

Check warning on line 148 in Dockerfile

View workflow job for this annotation

GitHub Actions / Ubuntu x64

Sensitive data should not be used in the ARG or ENV commands

SecretsUsedInArgOrEnv: Do not use ARG or ENV instructions for sensitive data (ENV "INFRACOST_API_KEY") More info: https://docs.docker.com/go/dockerfile/rule/secrets-used-in-arg-or-env/

Check warning on line 148 in Dockerfile

View workflow job for this annotation

GitHub Actions / Ubuntu x64

Variables should be defined before their use

UndefinedVar: Usage of undefined variable '$INFRACOST_API_KEY' More info: https://docs.docker.com/go/dockerfile/rule/undefined-var/
ENV INFRACOST_SKIP_UPDATE_CHECK=${INFRACOST_SKIP_UPDATE_CHECK:-false}

Check warning on line 149 in Dockerfile

View workflow job for this annotation

GitHub Actions / Ubuntu x64

Variables should be defined before their use

UndefinedVar: Usage of undefined variable '$INFRACOST_SKIP_UPDATE_CHECK' More info: https://docs.docker.com/go/dockerfile/rule/undefined-var/

ENTRYPOINT [ "/entrypoint.sh" ]
Loading