Skip to content

Commit d227b89

Browse files
authored
fix vul (#49)
* fix vul * Update go.mod * Update Dockerfile * Update go.mod * Update Dockerfile * update go mod tidy
1 parent b18a74b commit d227b89

File tree

4 files changed

+9
-9
lines changed

4 files changed

+9
-9
lines changed

controller/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Build the manager binary
2-
FROM docker.io/library/golang:1.23.8-alpine3.20 as builder
2+
FROM docker.io/library/golang:1.24.4-alpine3.22 as builder
33
ARG TARGETOS
44
ARG TARGETARCH
55

@@ -23,7 +23,7 @@ COPY . .
2323
# was called. For example, if we call make docker-build in a local env which has the Apple Silicon M1 SO
2424
# the docker BUILDPLATFORM arg will be linux/arm64 when for Apple x86 it will be linux/amd64. Therefore,
2525
# by leaving it empty we can ensure that the container and binary shipped on it will have the same platform.
26-
RUN cd controller && CGO_ENABLED=0 GOOS=${TARGETOS:-linux} GOARCH=${TARGETARCH} go build -v -a -o manager cmd/main.go
26+
RUN cd controller && go mod tidy && CGO_ENABLED=0 GOOS=${TARGETOS:-linux} GOARCH=${TARGETARCH} go build -v -a -o manager cmd/main.go
2727

2828
# Use distroless as minimal base image to package the manager binary
2929
# Refer to https://github.com/GoogleContainerTools/distroless for more details

controller/go.mod

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module github.com/cisco-open/synthetic-heart/controller
22

3-
go 1.22
3+
go 1.24.4
44

55
require (
66
github.com/cisco-open/synthetic-heart/common v0.0.0-00010101000000-000000000000
@@ -63,8 +63,8 @@ require (
6363
go.uber.org/multierr v1.11.0 // indirect
6464
go.uber.org/zap v1.26.0 // indirect
6565
golang.org/x/exp v0.0.0-20220722155223-a9213eeb770e // indirect
66-
golang.org/x/net v0.25.0 // indirect
67-
golang.org/x/oauth2 v0.20.0 // indirect
66+
golang.org/x/net v0.38.0 // indirect
67+
golang.org/x/oauth2 v0.27.0 // indirect
6868
golang.org/x/sys v0.20.0 // indirect
6969
golang.org/x/term v0.20.0 // indirect
7070
golang.org/x/text v0.15.0 // indirect

restapi/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
############################
22
# STEP 1 build the image for creating the executable
33
############################
4-
FROM docker.io/library/golang:1.23.8-alpine3.20 as builder
4+
FROM docker.io/library/golang:1.24.4-alpine3.22 as builder
55

66
# Install git + SSL ca certificates + make
77
# Git is required for fetching the dependencies.
@@ -16,7 +16,7 @@ WORKDIR /app
1616
COPY . .
1717

1818
# Compile the binary
19-
RUN cd restapi && make build-restapi
19+
RUN cd restapi && go mod tidy && make build-restapi
2020

2121
############################
2222
# STEP 2 build a small image with only the executable

restapi/go.mod

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module github.com/cisco-open/synthetic-heart/restapi
22

3-
go 1.23.1
3+
go 1.24.4
44

55
require (
66
github.com/cisco-open/synthetic-heart/common v0.0.0-00010101000000-000000000000
@@ -28,7 +28,7 @@ require (
2828
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
2929
github.com/modern-go/reflect2 v1.0.2 // indirect
3030
github.com/oklog/run v1.0.0 // indirect
31-
golang.org/x/net v0.25.0 // indirect
31+
golang.org/x/net v0.38.0 // indirect
3232
golang.org/x/sys v0.20.0 // indirect
3333
golang.org/x/text v0.15.0 // indirect
3434
google.golang.org/genproto v0.0.0-20210402141018-6c239bbf2bb1 // indirect

0 commit comments

Comments
 (0)