Skip to content

Commit

Permalink
chore: Upgrade Go dependencies to address CVEs (#76)
Browse files Browse the repository at this point in the history
- 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]>
  • Loading branch information
spolti authored Dec 12, 2023
1 parent 0ba2f47 commit 014856c
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 107 deletions.
33 changes: 21 additions & 12 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@ require (
github.com/golang/mock v1.6.0
github.com/joho/godotenv v1.4.0
github.com/stretchr/testify v1.8.4
go.uber.org/zap v1.23.0
go.uber.org/zap v1.24.0
golang.org/x/sync v0.1.0
google.golang.org/api v0.114.0
google.golang.org/grpc v1.56.3
google.golang.org/protobuf v1.30.0
// controller-runtime dependency is only used for logging
sigs.k8s.io/controller-runtime v0.11.2
sigs.k8s.io/controller-runtime v0.14.6
)

require (
Expand All @@ -42,11 +42,13 @@ require (
github.com/googleapis/gax-go/v2 v2.7.1 // indirect
github.com/jmespath/go-jmespath v0.4.0 // indirect
github.com/json-iterator/go v1.1.12 // indirect
github.com/kr/text v0.2.0 // indirect
github.com/kylelemons/godebug v1.1.0 // indirect
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
github.com/modern-go/reflect2 v1.0.2 // indirect
github.com/pkg/browser v0.0.0-20210115035449-ce105d075bb4 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/rogpeppe/go-internal v1.11.0 // indirect
go.opencensus.io v0.24.0 // indirect
go.uber.org/atomic v1.7.0 // indirect
go.uber.org/multierr v1.6.0 // indirect
Expand All @@ -61,15 +63,22 @@ require (
gopkg.in/inf.v0 v0.9.1 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
k8s.io/apimachinery v0.23.5 // indirect
k8s.io/klog/v2 v2.30.0 // indirect
k8s.io/utils v0.0.0-20211116205334-6203023598ed // indirect
sigs.k8s.io/json v0.0.0-20211020170558-c049b76a60c6 // indirect
sigs.k8s.io/structured-merge-diff/v4 v4.2.1 // indirect
k8s.io/apimachinery v0.26.1 // indirect
k8s.io/klog/v2 v2.90.1 // indirect
k8s.io/utils v0.0.0-20230209194617-a36077c30491 // indirect
sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect
sigs.k8s.io/structured-merge-diff/v4 v4.2.3 // indirect
)

// Update to avoid CVE-2022-27191, CVE-2021-43565, CVE-2020-29652
replace golang.org/x/crypto => golang.org/x/crypto v0.14.0

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

0 comments on commit 014856c

Please sign in to comment.