-
Notifications
You must be signed in to change notification settings - Fork 23
OCPBUGS-79763: Replace google.golang.org/grpc #401
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
base: release-4.12
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -19,12 +19,12 @@ require ( | |
| github.com/spf13/cobra v1.4.0 | ||
| github.com/spf13/pflag v1.0.5 | ||
| github.com/spf13/viper v1.12.0 | ||
| github.com/stretchr/testify v1.8.0 | ||
| golang.org/x/net v0.17.0 | ||
| golang.org/x/sys v0.13.0 | ||
| golang.org/x/term v0.13.0 | ||
| google.golang.org/grpc v1.48.0 | ||
| google.golang.org/protobuf v1.28.0 | ||
| github.com/stretchr/testify v1.8.4 | ||
| golang.org/x/net v0.26.0 | ||
| golang.org/x/sys v0.21.0 | ||
| golang.org/x/term v0.21.0 | ||
| google.golang.org/grpc v1.62.1 | ||
| google.golang.org/protobuf v1.33.0 | ||
| gopkg.in/gcfg.v1 v1.2.3 | ||
| gopkg.in/godo.v2 v2.0.9 | ||
| gopkg.in/yaml.v2 v2.4.0 | ||
|
|
@@ -50,26 +50,26 @@ require ( | |
| github.com/aws/aws-sdk-go v1.38.49 // indirect | ||
| github.com/beorn7/perks v1.0.1 // indirect | ||
| github.com/blang/semver/v4 v4.0.0 // indirect | ||
| github.com/cespare/xxhash/v2 v2.1.2 // indirect | ||
| github.com/cespare/xxhash/v2 v2.2.0 // indirect | ||
| github.com/coreos/go-semver v0.3.0 // indirect | ||
| github.com/coreos/go-systemd/v22 v22.3.2 // indirect | ||
| github.com/davecgh/go-spew v1.1.1 // indirect | ||
| github.com/docker/distribution v2.8.1+incompatible // indirect | ||
| github.com/emicklei/go-restful/v3 v3.8.0 // indirect | ||
| github.com/evanphx/json-patch v4.12.0+incompatible // indirect | ||
| github.com/felixge/httpsnoop v1.0.1 // indirect | ||
| github.com/felixge/httpsnoop v1.0.4 // indirect | ||
| github.com/fsnotify/fsnotify v1.5.4 // indirect | ||
| github.com/go-logr/logr v1.2.3 // indirect | ||
| github.com/go-logr/logr v1.4.1 // indirect | ||
| github.com/go-openapi/jsonpointer v0.19.5 // indirect | ||
| github.com/go-openapi/jsonreference v0.19.5 // indirect | ||
| github.com/go-openapi/swag v0.19.14 // indirect | ||
| github.com/gogo/protobuf v1.3.2 // indirect | ||
| github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect | ||
| github.com/golang/protobuf v1.5.2 // indirect | ||
| github.com/golang/protobuf v1.5.4 // indirect | ||
| github.com/google/gnostic v0.5.7-v3refs // indirect | ||
| github.com/google/go-cmp v0.5.8 // indirect | ||
| github.com/google/go-cmp v0.6.0 // indirect | ||
| github.com/google/gofuzz v1.1.0 // indirect | ||
| github.com/google/uuid v1.3.0 // indirect | ||
| github.com/google/uuid v1.6.0 // indirect | ||
| github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0 // indirect | ||
| github.com/grpc-ecosystem/grpc-gateway v1.16.0 // indirect | ||
| github.com/hashicorp/hcl v1.0.0 // indirect | ||
|
|
@@ -95,38 +95,40 @@ require ( | |
| github.com/pkg/errors v0.9.1 // indirect | ||
| github.com/pmezard/go-difflib v1.0.0 // indirect | ||
| github.com/prometheus/client_golang v1.12.1 // indirect | ||
| github.com/prometheus/client_model v0.2.0 // indirect | ||
| github.com/prometheus/client_model v0.5.0 // indirect | ||
| github.com/prometheus/common v0.32.1 // indirect | ||
| github.com/prometheus/procfs v0.7.3 // indirect | ||
| github.com/spf13/afero v1.8.2 // indirect | ||
| github.com/spf13/afero v1.10.0 // indirect | ||
| github.com/spf13/cast v1.5.0 // indirect | ||
| github.com/spf13/jwalterweatherman v1.1.0 // indirect | ||
| github.com/stretchr/objx v0.4.0 // indirect | ||
| github.com/stretchr/objx v0.5.0 // indirect | ||
| github.com/subosito/gotenv v1.3.0 // indirect | ||
| go.etcd.io/etcd/api/v3 v3.5.4 // indirect | ||
| go.etcd.io/etcd/client/pkg/v3 v3.5.4 // indirect | ||
| go.etcd.io/etcd/client/v3 v3.5.4 // indirect | ||
| go.opentelemetry.io/contrib v0.20.0 // indirect | ||
| go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.20.0 // indirect | ||
| go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.20.0 // indirect | ||
| go.opentelemetry.io/otel v0.20.0 // indirect | ||
| go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.49.0 // indirect | ||
| go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0 // indirect | ||
| go.opentelemetry.io/otel v1.24.0 // indirect | ||
| go.opentelemetry.io/otel/exporters/otlp v0.20.0 // indirect | ||
| go.opentelemetry.io/otel/metric v0.20.0 // indirect | ||
| go.opentelemetry.io/otel/sdk v0.20.0 // indirect | ||
| go.opentelemetry.io/otel/metric v1.24.0 // indirect | ||
| go.opentelemetry.io/otel/sdk v1.22.0 // indirect | ||
| go.opentelemetry.io/otel/sdk/export/metric v0.20.0 // indirect | ||
| go.opentelemetry.io/otel/sdk/metric v0.20.0 // indirect | ||
| go.opentelemetry.io/otel/trace v0.20.0 // indirect | ||
| go.opentelemetry.io/proto/otlp v0.7.0 // indirect | ||
| go.opentelemetry.io/otel/trace v1.24.0 // indirect | ||
| go.opentelemetry.io/proto/otlp v1.0.0 // indirect | ||
| go.uber.org/atomic v1.7.0 // indirect | ||
| go.uber.org/multierr v1.6.0 // indirect | ||
| go.uber.org/zap v1.19.0 // indirect | ||
| golang.org/x/crypto v0.14.0 // indirect | ||
| golang.org/x/oauth2 v0.0.0-20220411215720-9780585627b5 // indirect | ||
| golang.org/x/sync v0.1.0 // indirect | ||
| golang.org/x/text v0.13.0 // indirect | ||
| golang.org/x/time v0.0.0-20220210224613-90d013bbcef8 // indirect | ||
| google.golang.org/appengine v1.6.7 // indirect | ||
| google.golang.org/genproto v0.0.0-20220519153652-3a47de7e79bd // indirect | ||
| golang.org/x/crypto v0.24.0 // indirect | ||
| golang.org/x/oauth2 v0.18.0 // indirect | ||
| golang.org/x/sync v0.7.0 // indirect | ||
| golang.org/x/text v0.16.0 // indirect | ||
| golang.org/x/time v0.5.0 // indirect | ||
| google.golang.org/appengine v1.6.8 // indirect | ||
| google.golang.org/genproto v0.0.0-20240213162025-012b6fc9bca9 // indirect | ||
| google.golang.org/genproto/googleapis/api v0.0.0-20240318140521-94a12d6c2237 // indirect | ||
| google.golang.org/genproto/googleapis/rpc v0.0.0-20240318140521-94a12d6c2237 // indirect | ||
| gopkg.in/inf.v0 v0.9.1 // indirect | ||
| gopkg.in/ini.v1 v1.66.4 // indirect | ||
| gopkg.in/natefinch/lumberjack.v2 v2.0.0 // indirect | ||
|
|
@@ -148,7 +150,7 @@ require ( | |
|
|
||
| replace ( | ||
| github.com/docker/distribution => github.com/docker/distribution v2.8.2+incompatible | ||
| google.golang.org/grpc v1.34.0 => google.golang.org/grpc v1.29.0 | ||
| google.golang.org/grpc => github.com/openshift-sustaining/grpc-go v1.64.1-sec.1 | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧩 Analysis chain🏁 Script executed: #!/bin/bash
# Check module version metadata and availability
set -euo pipefail
go env GOPROXY >/dev/null 2>&1 || true
echo "Querying module proxy for tagged version..."
curl -sS "https://proxy.golang.org/github.com/openshift-sustaining/grpc-go/@v/list" | tail -n 20
curl -sS "https://proxy.golang.org/github.com/openshift-sustaining/grpc-go/@v/v1.64.1-sec.1.info"Repository: openshift/cloud-provider-openstack Length of output: 524 🏁 Script executed: #!/bin/bash
set -euo pipefail
base="https://proxy.golang.org/github.com/openshift-sustaining/grpc-go/@v/v1.64.1-sec.1"
for ext in info mod zip; do
code=$(curl -sS -o /dev/null -w "%{http_code}" "${base}.${ext}")
echo "${ext}: ${code}"
doneRepository: openshift/cloud-provider-openstack Length of output: 106 🌐 Web query:
💡 Result: The tag v1.64.1-sec.1 in the openshift-sustaining/grpc-go repository is a specialized security patch version of the gRPC-Go library maintained by the OpenShift team [1][2][3]. This version was created to address CVE-2026-33186 while allowing OpenShift components (such as csi-driver-nfs) to remain compatible with older Go versions (specifically Go 1.22) [1][4]. Upgrading to the standard upstream gRPC-Go versions containing this fix would have required a mandatory Go toolchain version bump, which was undesirable for certain OpenShift release branches [4]. By using the openshift-sustaining/grpc-go repository, OpenShift developers can apply necessary security patches as a replacement for the standard google.golang.org/grpc dependency [1][4]. The replacement is typically managed in Go projects using the following command in the go.mod file: go mod edit -replace google.golang.org/grpc=github.com/openshift-sustaining/grpc-go@v1.64.1-sec.1 [1][4] Citations:
🌐 Web query:
💡 Result: The module github.com/openshift-sustaining/grpc-go v1.64.1-sec.1 is a specialized, downstream fork of the standard google.golang.org/grpc library maintained by OpenShift [1][2]. This specific release was created to address CVE-2026-33186, a critical authorization bypass vulnerability [1][3]. The primary purpose of this version is to provide a patched gRPC implementation for OpenShift components (such as the csi-driver-nfs) without requiring a broader Go version bump or a forced update to newer upstream gRPC versions that might introduce breaking changes or require significant refactoring in existing OpenShift infrastructure [1][2]. In summary: - Purpose: Provides a security backport of the fix for CVE-2026-33186 [1][2]. - Reason for existence: Allows Red Hat/OpenShift engineers to remediate the vulnerability in stable components while maintaining compatibility with existing build environments [1][2]. - Usage: It is used as a direct replacement for the standard google.golang.org/grpc in OpenShift-related projects where patching the upstream dependency directly is not feasible or desired due to dependencies on older Go environments [1][4]. Citations:
Clarify that
Minor follow-up: align with the project’s “no pre-release” policy definition by documenting/confirming that 🤖 Prompt for AI Agents |
||
| k8s.io/api => k8s.io/api v0.25.10 | ||
| k8s.io/apiextensions-apiserver => k8s.io/apiextensions-apiserver v0.25.15 | ||
| k8s.io/apimachinery => k8s.io/apimachinery v0.25.15 | ||
|
|
@@ -177,3 +179,21 @@ replace ( | |
| k8s.io/sample-cli-plugin => k8s.io/sample-cli-plugin v0.25.10 | ||
| k8s.io/sample-controller => k8s.io/sample-controller v0.25.10 | ||
| ) | ||
|
|
||
| replace go.opentelemetry.io/contrib => go.opentelemetry.io/contrib v0.20.0 | ||
|
|
||
| replace go.opentelemetry.io/contrib/instrumentation/github.com/emicklei/go-restful/otelrestful => go.opentelemetry.io/contrib/instrumentation/github.com/emicklei/go-restful/otelrestful v0.20.0 | ||
|
|
||
| replace go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc => go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.20.0 | ||
|
|
||
| replace go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp => go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.20.0 | ||
|
|
||
| replace go.opentelemetry.io/otel => go.opentelemetry.io/otel v0.20.0 | ||
|
|
||
| replace go.opentelemetry.io/otel/metric => go.opentelemetry.io/otel/metric v0.20.0 | ||
|
|
||
| replace go.opentelemetry.io/otel/sdk => go.opentelemetry.io/otel/sdk v0.20.0 | ||
|
|
||
| replace go.opentelemetry.io/otel/trace => go.opentelemetry.io/otel/trace v0.20.0 | ||
|
|
||
| replace go.opentelemetry.io/proto/otlp => go.opentelemetry.io/proto/otlp v0.7.0 | ||
|
Comment on lines
+183
to
+199
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧩 Analysis chain🏁 Script executed: #!/bin/bash
# Verify which OTel versions are actually selected after replace directives
set -euo pipefail
rg -n '^\s*go\.opentelemetry\.io/' go.mod -n
echo "---- advisories for otelhttp v0.20.0 ----"
cat <<'JSON' > /tmp/osv-otel.json
{"package":{"ecosystem":"Go","name":"go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp"},"version":"v0.20.0"}
JSON
curl -sS https://api.osv.dev/v1/query -H 'Content-Type: application/json' --data-binary `@/tmp/osv-otel.json` | jq .Repository: openshift/cloud-provider-openstack Length of output: 21569 🏁 Script executed: #!/bin/bash
set -euo pipefail
echo "---- go.mod replace directives for go.opentelemetry.io ----"
rg -n '^\s*replace\s+go\.opentelemetry\.io/' go.mod || true
echo
echo "---- go.mod lines 160-220 ----"
nl -ba go.mod | sed -n '160,220p'
echo
echo "---- go.mod require lines for go.opentelemetry.io ----"
rg -n '^\s*go\.opentelemetry\.io/' go.mod || trueRepository: openshift/cloud-provider-openstack Length of output: 1239 🏁 Script executed: #!/bin/bash
set -euo pipefail
mods=(
"go.opentelemetry.io/contrib v0.20.0"
"go.opentelemetry.io/contrib/instrumentation/github.com/emicklei/go-restful/otelrestful v0.20.0"
"go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.20.0"
"go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.20.0"
"go.opentelemetry.io/otel v0.20.0"
"go.opentelemetry.io/otel/metric v0.20.0"
"go.opentelemetry.io/otel/sdk v0.20.0"
"go.opentelemetry.io/otel/trace v0.20.0"
"go.opentelemetry.io/proto/otlp v0.7.0"
)
for m in "${mods[@]}"; do
name="$(echo "$m" | awk '{print $1}')"
ver="$(echo "$m" | awk '{print $2}')"
echo "---- osv advisories for $name $ver ----"
cat <<JSON > /tmp/osv-query.json
{"package":{"ecosystem":"Go","name":"$name"},"version":"$ver"}
JSON
curl -sS https://api.osv.dev/v1/query \
-H 'Content-Type: application/json' \
--data-binary `@/tmp/osv-query.json` \
| jq '{vulns: [.vulns[]? | {id, summary, severity: (.database_specific.severity // empty)}], result_count: (.vulns|length)}'
echo
doneRepository: openshift/cloud-provider-openstack Length of output: 1569 OpenTelemetry In
OSV flags Move the 🤖 Prompt for AI Agents |
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
🏁 Script executed:
Repository: openshift/cloud-provider-openstack
Length of output: 2729
Upgrade
golang.org/x/crypto v0.24.0andgolang.org/x/oauth2 v0.18.0ingo.mod(OSV lists advisories for both).File:
go.mod(lines 123-124)OSV reports multiple vulnerabilities affecting
golang.org/x/crypto@v0.24.0, andgolang.org/x/oauth2@v0.18.0is also affected (e.g.,GHSA-6v2p-p543-phr9,GO-2025-3488). Upgrade both to the latest patched versions and keep versions pinned ingo.mod.🧰 Tools
🪛 OSV Scanner (2.3.8)
[CRITICAL] 123-123: golang.org/x/crypto 0.24.0: Misuse of connection.serverAuthenticate may cause authorization bypass in golang.org/x/crypto
(GO-2024-3321)
[CRITICAL] 123-123: golang.org/x/crypto 0.24.0: Potential denial of service in golang.org/x/crypto
(GO-2025-3487)
[CRITICAL] 123-123: golang.org/x/crypto 0.24.0: Potential denial of service in golang.org/x/crypto/ssh/agent
(GO-2025-4116)
[CRITICAL] 123-123: golang.org/x/crypto 0.24.0: Unbounded memory consumption in golang.org/x/crypto/ssh
(GO-2025-4134)
[CRITICAL] 123-123: golang.org/x/crypto 0.24.0: Malformed constraint may cause denial of service in golang.org/x/crypto/ssh/agent
(GO-2025-4135)
[CRITICAL] 123-123: golang.org/x/crypto 0.24.0: Invoking key constraints not enforced in golang.org/x/crypto/ssh/agent
(GO-2026-5005)
[CRITICAL] 123-123: golang.org/x/crypto 0.24.0: Invoking agent constraints dropped when forwarding keys in golang.org/x/crypto/ssh/agent
(GO-2026-5006)
[CRITICAL] 123-123: golang.org/x/crypto 0.24.0: Invoking byte arithmetic causes underflow and panic in golang.org/x/crypto/ssh
(GO-2026-5013)
[CRITICAL] 123-123: golang.org/x/crypto 0.24.0: Invoking bypass of certificate restrictions in golang.org/x/crypto/ssh
(GO-2026-5014)
[CRITICAL] 123-123: golang.org/x/crypto 0.24.0: Invoking server panic during CheckHostKey/Authenticate in golang.org/x/crypto/ssh
(GO-2026-5015)
[CRITICAL] 123-123: golang.org/x/crypto 0.24.0: Invoking memory leak when rejecting channels can lead to DoS in golang.org/x/crypto/ssh
(GO-2026-5016)
[CRITICAL] 123-123: golang.org/x/crypto 0.24.0: Invoking client can cause server deadlock on unexpected responses in golang.org/x/crypto/ssh
(GO-2026-5017)
[CRITICAL] 123-123: golang.org/x/crypto 0.24.0: Invoking pathological RSA/DSA parameters may cause DoS in golang.org/x/crypto/ssh
(GO-2026-5018)
[CRITICAL] 123-123: golang.org/x/crypto 0.24.0: Invoking bypass of FIDO/U2F security keys physical interaction in golang.org/x/crypto/ssh
(GO-2026-5019)
[CRITICAL] 123-123: golang.org/x/crypto 0.24.0: Invoking infinite loop on large channel writes in golang.org/x/crypto/ssh
(GO-2026-5020)
[CRITICAL] 123-123: golang.org/x/crypto 0.24.0: Invoking auth bypass via unenforced
@revokedstatus in golang.org/x/crypto/ssh/knownhosts(GO-2026-5021)
[CRITICAL] 123-123: golang.org/x/crypto 0.24.0: Invoking VerifiedPublicKeyCallback permissions skip enforcement in golang.org/x/crypto/ssh
(GO-2026-5023)
[CRITICAL] 123-123: golang.org/x/crypto 0.24.0: Invoking pathological inputs can lead to client panic in golang.org/x/crypto/ssh/agent
(GO-2026-5033)
[CRITICAL] 123-123: golang.org/x/crypto 0.24.0: golang.org/x/crypto/ssh/agent vulnerable to panic if message is malformed due to out of bounds read
(GHSA-f6x5-jh6r-wrfv)
[CRITICAL] 123-123: golang.org/x/crypto 0.24.0: golang.org/x/crypto Vulnerable to Denial of Service (DoS) via Slow or Incomplete Key Exchange
(GHSA-hcg3-q754-cr77)
[CRITICAL] 123-123: golang.org/x/crypto 0.24.0: golang.org/x/crypto/ssh allows an attacker to cause unbounded memory consumption
(GHSA-j5w8-q4qc-rx2x)
[CRITICAL] 123-123: golang.org/x/crypto 0.24.0: Misuse of ServerConfig.PublicKeyCallback may cause authorization bypass in golang.org/x/crypto
(GHSA-v778-237x-gjrc)
[HIGH] 124-124: golang.org/x/oauth2 0.18.0: Unexpected memory consumption during token parsing in golang.org/x/oauth2
(GO-2025-3488)
[HIGH] 124-124: golang.org/x/oauth2 0.18.0: golang.org/x/oauth2 Improper Validation of Syntactic Correctness of Input vulnerability
(GHSA-6v2p-p543-phr9)
🤖 Prompt for AI Agents