Skip to content

Commit 014856c

Browse files
authored
chore: Upgrade Go dependencies to address CVEs (#76)
- elazarl/goproxy [CVE-2023-37788] Denial of Service (DoS) - emicklei/go-restful [CVE-2022-1996] Authorization Bypass Through User-Controlled Key - prometheus/client_golang [CWE-400] Denial of Service (DoS) ----- Signed-off-by: Spolti <[email protected]>
1 parent 0ba2f47 commit 014856c

File tree

2 files changed

+45
-107
lines changed

2 files changed

+45
-107
lines changed

go.mod

Lines changed: 21 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,13 @@ require (
1313
github.com/golang/mock v1.6.0
1414
github.com/joho/godotenv v1.4.0
1515
github.com/stretchr/testify v1.8.4
16-
go.uber.org/zap v1.23.0
16+
go.uber.org/zap v1.24.0
1717
golang.org/x/sync v0.1.0
1818
google.golang.org/api v0.114.0
1919
google.golang.org/grpc v1.56.3
2020
google.golang.org/protobuf v1.30.0
2121
// controller-runtime dependency is only used for logging
22-
sigs.k8s.io/controller-runtime v0.11.2
22+
sigs.k8s.io/controller-runtime v0.14.6
2323
)
2424

2525
require (
@@ -42,11 +42,13 @@ require (
4242
github.com/googleapis/gax-go/v2 v2.7.1 // indirect
4343
github.com/jmespath/go-jmespath v0.4.0 // indirect
4444
github.com/json-iterator/go v1.1.12 // indirect
45+
github.com/kr/text v0.2.0 // indirect
4546
github.com/kylelemons/godebug v1.1.0 // indirect
4647
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
4748
github.com/modern-go/reflect2 v1.0.2 // indirect
4849
github.com/pkg/browser v0.0.0-20210115035449-ce105d075bb4 // indirect
4950
github.com/pmezard/go-difflib v1.0.0 // indirect
51+
github.com/rogpeppe/go-internal v1.11.0 // indirect
5052
go.opencensus.io v0.24.0 // indirect
5153
go.uber.org/atomic v1.7.0 // indirect
5254
go.uber.org/multierr v1.6.0 // indirect
@@ -61,15 +63,22 @@ require (
6163
gopkg.in/inf.v0 v0.9.1 // indirect
6264
gopkg.in/yaml.v2 v2.4.0 // indirect
6365
gopkg.in/yaml.v3 v3.0.1 // indirect
64-
k8s.io/apimachinery v0.23.5 // indirect
65-
k8s.io/klog/v2 v2.30.0 // indirect
66-
k8s.io/utils v0.0.0-20211116205334-6203023598ed // indirect
67-
sigs.k8s.io/json v0.0.0-20211020170558-c049b76a60c6 // indirect
68-
sigs.k8s.io/structured-merge-diff/v4 v4.2.1 // indirect
66+
k8s.io/apimachinery v0.26.1 // indirect
67+
k8s.io/klog/v2 v2.90.1 // indirect
68+
k8s.io/utils v0.0.0-20230209194617-a36077c30491 // indirect
69+
sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect
70+
sigs.k8s.io/structured-merge-diff/v4 v4.2.3 // indirect
6971
)
7072

71-
// Update to avoid CVE-2022-27191, CVE-2021-43565, CVE-2020-29652
72-
replace golang.org/x/crypto => golang.org/x/crypto v0.14.0
73-
74-
// Update to avoid CVE-2023-3978, CVE-2023-39325, CVE-2023-44487
75-
replace golang.org/x/net => golang.org/x/net v0.17.0
73+
replace (
74+
// Update to avoid CVE-2022-27191, CVE-2021-43565, CVE-2020-29652
75+
golang.org/x/crypto => golang.org/x/crypto v0.14.0
76+
// Update to avoid CVE-2023-3978, CVE-2023-39325, CVE-2023-44487
77+
golang.org/x/net => golang.org/x/net v0.17.0
78+
// remove when upgrade to controller-runtime 0.15.x or apimachinery to 0.27.x
79+
// Fixes github.com/elazarl/goproxy Denial of Service (DoS)
80+
// This dependency was removed from apimachinery 0.27.0
81+
// Even the controller-runtime being used only for logging, the version 0.15.0 brings
82+
// apimachinery 0.27.0 that brings a lot more of indirect dependencies that we don't want to pull
83+
k8s.io/apimachinery => k8s.io/apimachinery v0.27.0
84+
)

0 commit comments

Comments
 (0)