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

Solve issues found by trivy #42

Merged
merged 2 commits into from
May 14, 2024
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
18 changes: 13 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
ARG GOLANG_IMAGE_TAG=1.20
FROM mcr.microsoft.com/oss/go/microsoft/golang:${GOLANG_IMAGE_TAG} as build
ARG TERRAFORM_DOCS_VERSION=v0.16.0
ARG TERRAGRUNT_VERSION=v0.43.0
ARG TFMOD_TEST_HELPER_VERSION=v0.0.22
ARG TFLINT_VERSION=v0.41.0
ARG GOLANGCI_LINT_VERSION=v1.49.0
ARG HCLEDIT_VERSION=v0.2.6
ARG GOSEC_VERSION=v2.14.0
Expand Down Expand Up @@ -31,7 +31,8 @@ RUN cd /src && \
cd /src && \
go install github.com/lonegunmanb/previousTag@latest && \
go install github.com/magodo/hclgrep@latest && \
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH || $GOPATH)/bin $GOLANGCI_LINT_VERSION && \
# curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH || $GOPATH)/bin $GOLANGCI_LINT_VERSION && \
go install github.com/golangci/golangci-lint/cmd/golangci-lint@$GOLANGCI_LINT_VERSION && \
go install github.com/lonegunmanb/avmfix@$AVMFIX_VERSION && \
go install github.com/lonegunmanb/yorbox@$YORBOX_VERSION && \
go install github.com/Azure/grept@$GREPT_VERSION && \
Expand All @@ -48,6 +49,14 @@ RUN cd /src && \
cd yor && git checkout main && \
go install && \
cd /src && \
git clone https://github.com/gruntwork-io/terragrunt.git && \
cd terragrunt && git checkout $TERRAGRUNT_VERSION && \
go install && \
cd /src && \
git clone https://github.com/lonegunmanb/tflintenv.git && \
cd tflintenv && cd tflintenv && go install && \
cd ../tflint && go install && \
cd /src && \
git clone https://github.com/lonegunmanb/terrafmt.git && \
cd terrafmt && \
go install && \
Expand All @@ -65,14 +74,15 @@ RUN cd /src && \
FROM mcr.microsoft.com/cbl-mariner/base/core:2.0 as runner
ARG GOLANG_IMAGE_TAG=1.19
ARG TERRAFORM_VERSION=1.3.3
ARG TERRAGRUNT_VERSION=v0.43.0
ARG TARGETARCH
ARG PACKER_VERSION=1.9.4
ARG TFSEC_VERSION=v1.28.4
ARG TFLINT_VERSION=v0.41.0
ENV TFLINT_PLUGIN_DIR /home/runtimeuser/tflint
ENV GOROOT=/usr/local/go
ENV GOPATH=/home/runtimeuser/go
ENV PATH=$PATH:/home/runtimeuser/tfenv/bin:/pkenv/bin:$GOROOT/bin:$GOPATH/bin
ENV TFLINTENV_DEFAULT_VERSION=$TFLINT_VERSION
ENV TFENV_AUTO_INSTALL=true
ENV TFENV_TERRAFORM_VERSION=$TERRAFORM_VERSION
ENV TF_CLI_CONFIG_FILE=/home/runtimeuser/.terraformrc
Expand All @@ -93,8 +103,6 @@ COPY .terraformrc /home/runtimeuser/.terraformrc
COPY --from=build /go/bin /usr/local/go/bin
COPY --from=build /src/tfenv /home/runtimeuser/tfenv
RUN chmod 777 /home/runtimeuser/tfenv && \
curl '-#' -fL -o /bin/terragrunt https://github.com/gruntwork-io/terragrunt/releases/download/${TERRAGRUNT_VERSION}/terragrunt_linux_${TARGETARCH} && \
chmod +x /bin/terragrunt && \
git clone https://github.com/iamhsa/pkenv.git /pkenv && \
cd /pkenv && rm -rf .git && \
rm -r /tmp/* && \
Expand Down
10 changes: 5 additions & 5 deletions version.env
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
AVMFIX_VERSION=9c158444b055e845c0cc9afc7cdc88d0ab19e5eb
GOLANG_IMAGE_TAG=1.22.1
GOLANGCI_LINT_VERSION=v1.57.1
GOLANG_IMAGE_TAG=1.22.3
GOLANGCI_LINT_VERSION=v1.58.1
GOSEC_VERSION=v2.19.0
GREPT_VERSION=v0.1.1
HCLEDIT_VERSION=v0.2.10.1
Expand All @@ -9,10 +9,10 @@ NEWRES_VERSION=a535fe92925845dfa033a3db71adf7d65511cbf3
PACKER_VERSION=1.10.2
TERRAFORM_DOCS_VERSION=v0.17.2
TERRAFORM_VERSION=1.8.2
TERRAGRUNT_VERSION=v0.55.20
TERRAGRUNT_VERSION=v0.58.4
TFENV=v3.0.0
TFLINT_VERSION=v0.50.4
TFMOD_TEST_HELPER_VERSION=v0.20.0
TFLINT_VERSION=v0.50.3
TFMOD_TEST_HELPER_VERSION=v0.21.0
TFSEC_VERSION=v1.28.4
YOR_VERSION=0.1.171
YORBOX_VERSION=348c3e0ca945c71ee295dd055e5b97614eb93e87
Loading