Skip to content

Commit

Permalink
Fix vulns for various Go images
Browse files Browse the repository at this point in the history
Signed-off-by: Jauder Ho <jauderho@users.noreply.github.com>
  • Loading branch information
jauderho committed Apr 8, 2024
1 parent 878e9ae commit 48f1680
Show file tree
Hide file tree
Showing 9 changed files with 17 additions and 2 deletions.
2 changes: 2 additions & 0 deletions amass/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ RUN test -n "${BUILD_VERSION}" \
&& update-ca-certificates \
&& curl -L "${ARCHIVE_URL}${BUILD_VERSION}.tar.gz" -o /tmp/amass.tar.gz \
&& tar xzf /tmp/amass.tar.gz --strip 1 -C /go/src/github.com/owasp/amass \
&& go get -u github.com/jackc/pgx/v5 google.golang.org/protobuf \
&& go mod tidy \
&& go build -v -trimpath -ldflags="-s -w" ./cmd/amass

WORKDIR /config
Expand Down
2 changes: 2 additions & 0 deletions headscale/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ RUN test -n "${BUILD_VERSION}" \
&& update-ca-certificates \
&& curl -L "${ARCHIVE_URL}${BUILD_VERSION}.tar.gz" -o /tmp/headscale.tar.gz \
&& tar xzf /tmp/headscale.tar.gz --strip 1 -C /go/src/github.com/juanfont/headscale \
&& go get -u github.com/jackc/pgx/v5 github.com/go-jose/go-jose/v3 google.golang.org/grpc google.golang.org/protobuf \
&& go mod tidy \
&& go build -o ./headscale -v -trimpath -ldflags="-s -w -X github.com/juanfont/headscale/cmd/headscale/cli.Version=${BUILD_VERSION}" ./cmd/headscale

WORKDIR /config
Expand Down
2 changes: 2 additions & 0 deletions httpx/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ RUN test -n "${BUILD_VERSION}" \
&& apk add --no-cache curl gcc musl-dev \
&& curl -L "${ARCHIVE_URL}${BUILD_VERSION}.tar.gz" -o /tmp/httpx.tar.gz \
&& tar xzf /tmp/httpx.tar.gz --strip 1 -C /go/src/github.com/projectdiscovery/httpx \
&& go get -u github.com/quic-go/quic-go \
&& go mod tidy \
&& go build -o httpx -v -trimpath -ldflags="-s -w" cmd/httpx/httpx.go

WORKDIR /config
Expand Down
2 changes: 2 additions & 0 deletions lego/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ RUN test -n "${BUILD_VERSION}" \
&& update-ca-certificates \
&& curl -L "${ARCHIVE_URL}${BUILD_VERSION}.tar.gz" -o /tmp/lego.tar.gz \
&& tar xzf /tmp/lego.tar.gz --strip 1 -C /go/src/github.com/go-acme/lego \
&& go get -u google.golang.org/grpc google.golang.org/protobuf \
&& go mod tidy \
&& make build \
&& strip /go/src/github.com/go-acme/lego/dist/lego \
&& cp /go/src/github.com/go-acme/lego/dist/lego /go/src/github.com/go-acme/lego-bin \
Expand Down
2 changes: 1 addition & 1 deletion octosql/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ RUN test -n "${BUILD_VERSION}" \
&& update-ca-certificates \
&& curl -L "${ARCHIVE_URL}${BUILD_VERSION}.tar.gz" -o /tmp/octosql.tar.gz \
&& tar xzf /tmp/octosql.tar.gz --strip 1 -C /go/src/github.com/cube2222/octosql \
&& go get -u golang.org/x/net golang.org/x/crypto gopkg.in/yaml.v3 github.com/jackc/pgx \
&& go get -u golang.org/x/net golang.org/x/crypto gopkg.in/yaml.v3 github.com/jackc/pgx google.golang.org/grpc \
&& go mod tidy \
&& go build -o octosql -v -trimpath -ldflags="-s -w -X github.com/cube2222/octosql/cmd.VERSION=${BUILD_VERSION}" .

Expand Down
2 changes: 2 additions & 0 deletions opentofu/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ RUN test -n "${BUILD_VERSION}" \
&& git clone --depth 1 ${GIT_URL} --branch ${BUILD_VERSION} /go/src/github.com/opentofu/opentofu \
#&& git clone --depth 1 ${GIT_URL} /go/src/github.com/opentofu/opentofu \
&& cd /go/src/github.com/opentofu/opentofu \
&& go get -u github.com/cloudflare/circl google.golang.org/protobuf \
&& go mod tidy \
&& go generate ./... \
&& go run ./tools/protobuf-compile . \
&& go build -v -trimpath -ldflags="-s -w -X github.com/opentofu/opentofu/version.dev=no -X main.experimentsAllowed=yes" ./cmd/tofu \
Expand Down
2 changes: 2 additions & 0 deletions subfinder/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ RUN test -n "${BUILD_VERSION}" \
&& curl -L "${ARCHIVE_URL}${BUILD_VERSION}.tar.gz" -o /tmp/subfinder.tar.gz \
&& tar xzf /tmp/subfinder.tar.gz --strip 1 -C /go/src/github.com/projectdiscovery/subfinder \
&& cd v2 \
&& go get -u github.com/quic-go/quic-go \
&& go mod tidy \
&& go build -o subfinder -v -trimpath -ldflags="-s -w" cmd/subfinder/main.go

WORKDIR /config
Expand Down
2 changes: 2 additions & 0 deletions terraform/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ RUN test -n "${BUILD_VERSION}" \
&& update-ca-certificates \
&& curl -L "${ARCHIVE_URL}${BUILD_VERSION}.tar.gz" -o /tmp/terraform.tar.gz \
&& tar xzf /tmp/terraform.tar.gz --strip 1 -C /go/src/github.com/hashicorp/terraform \
&& go get -u github.com/cloudflare/circl google.golang.org/protobuf \
&& go mod tidy \
&& go build -v -trimpath -ldflags="-s -w" \
&& cp terraform /go/bin/terraform \
&& go clean && go clean -cache && go clean -modcache
Expand Down
3 changes: 2 additions & 1 deletion yggdrasil-go/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ RUN test -n "${BUILD_VERSION}" \
&& update-ca-certificates \
&& curl -L "${ARCHIVE_URL}${BUILD_VERSION}.tar.gz" -o /tmp/yggdrasil-go.tar.gz \
&& tar xzf /tmp/yggdrasil-go.tar.gz --strip 1 -C /go/src/github.com/yggdrasil-network/yggdrasil-go \
&& go get -u golang.org/x/net \
&& go get -u golang.org/x/tools github.com/quic-go/quic-go \
#&& go get -u all \
&& go mod tidy \
&& go build -o ./yggdrasil -v -trimpath -ldflags="-s -w -X ${PKGSRC}.buildName=yggdrasil -X ${PKGSRC}.buildVersion=${BUILD_VERSION}" ./cmd/yggdrasil \
&& go build -o ./yggdrasilctl -v -trimpath -ldflags="-s -w -X ${PKGSRC}.buildName=yggdrasil -X ${PKGSRC}.buildVersion=${BUILD_VERSION}" ./cmd/yggdrasilctl \
Expand Down

0 comments on commit 48f1680

Please sign in to comment.