fix: [FL-30189] Pin grpc v1.82.1 and otel v1.44.0 via replace directives - #104
Conversation
Clears the two remaining Snyk High "Incorrect Authorization" findings (SNYK-GOLANG-GOOGLEGOLANGORGGRPCINTERNALTRANSPORT-18172578 and ...XDSRBAC-18172577) against _examples/go.mod. grpc is a module-graph ghost dependency here (not imported by any _examples package), so the fix uses the same replace-pin pattern as the existing x/crypto, x/net, x/sys, and goldmark pins from earlier ghost-vuln patches (#98, #100, #101), matching the v1.82.1 the root module moved to in #103.
✅ Snyk checks have passed. No issues have been found so far.
💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse. |
There was a problem hiding this comment.
Pull request overview
This pull request updates the _examples module’s dependency graph to ensure google.golang.org/grpc resolves to a patched version (v1.82.1) during example builds/tests, addressing Snyk findings for a transitive “ghost” dependency.
Changes:
- Add a
replacedirective in_examples/go.modto pingoogle.golang.org/grpcto v1.82.1. - Refresh
_examples/go.sumto reflect the pinned grpc version and its resolved transitive module versions. - Update the indirect
google.golang.org/genproto/googleapis/rpcversion in_examples/go.modconsistent with the new resolution.
Reviewed changes
Copilot reviewed 1 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
_examples/go.mod |
Pins grpc via replace and updates an indirect genproto version to match the resolved graph. |
_examples/go.sum |
Updates checksum entries to reflect grpc v1.82.1 (and related resolved versions). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Clears the two Snyk Medium "Memory Allocation with Excessive Size Value" findings (CVE-2026-41178; SNYK-GOLANG-GOOPENTELEMETRYIOOTELBAGGAGE-17054906, ...OTELPROPAGATION-17054905) against go.mod. otel is a module-graph ghost that arrives solely through grpc v1.82.1's requirements — it is not in go.sum and nothing imports it — so Snyk's "not upgradeable" verdict only means auto-upgrade can't reach it; the established replace-pin pattern can. Pinned in _examples/go.mod as well, since the grpc pin there would surface the same finding on the next scan. Root build, unit tests, and the full _examples integration suite all pass.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 2 out of 3 changed files in this pull request and generated no new comments.
Comments suppressed due to low confidence (2)
_examples/go.mod:63
replace go.opentelemetry.io/otel => ... v1.44.0does not appear to take effect for_examplesas-is:_examples/go.sumcontains nogo.opentelemetry.io/otelentries at all. If this pin is meant to address Snyk findings via grpc’s transitive requirements, please confirm otel is actually present in the module graph for_examples(and updatego.sum), or drop/adjust the pin to the module path that’s actually being pulled in.
replace go.opentelemetry.io/otel => go.opentelemetry.io/otel v1.44.0
go.mod:58
- The new
replace go.opentelemetry.io/otel => ... v1.44.0appears to be a no-op in the current module graph: there are nogo.opentelemetry.io/otelentries ingo.sum. If the intent is to pin a transitive/ghost otel dependency (per PR description), please ensure it actually resolves in the build list (e.g.,go list -m allshows otel) and thatgo.sumis updated accordingly; otherwise this replace directive is misleading and should be removed or adjusted to the correct otel submodule(s).
replace go.opentelemetry.io/otel => go.opentelemetry.io/otel v1.44.0
|
Re: the two low-confidence review notes ("the otel replace may be a no-op — go.sum has no otel entries"): The premise conflates go.sum with the module graph. go.sum records verification hashes for build-relevant modules, not dependency edges — under Go module graph pruning, a module that nothing imports contributes no go.sum entries even while sitting in the module graph. otel is exactly that: The pin provably takes effect — If otel weren't in the module graph, that command would error instead. Exact in-repo precedent: the Skipping the "update go.sum" suggestion deliberately: |
andrecastillo
left a comment
There was a problem hiding this comment.
Review — 2 finding(s).
The go.opentelemetry.io/otel replace in _examples/go.mod was a no-op: otel is not in the _examples module graph (`GOWORK=off go list -m go.opentelemetry.io/otel` -> "not a known dependency"; absent from `go list -m all`). The v1.43->v1.44 selection was only observable in workspace mode, where go.work leaks the root module's graph. The real _examples pin is the grpc v1.82.1 replace two lines up (present in _examples/go.sum). The root go.mod otel replace is kept — it governs the workspace build and is what makes enthistory's own Snyk scan green. Addresses review feedback on PR #104.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 2 out of 3 changed files in this pull request and generated no new comments.
Comments suppressed due to low confidence (1)
_examples/go.mod:61
- PR description says OpenTelemetry is pinned to v1.44.0 in both the root module and
_examples, but_examples/go.modonly adds a grpc replace. If Snyk scans_examples/go.modseparately, the otel findings may still appear there when grpc pulls it into the module graph. Add the same otel replace directive here to match the stated intent.
replace google.golang.org/grpc => google.golang.org/grpc v1.82.1
Description
Adds
replace google.golang.org/grpc => google.golang.org/grpc v1.82.1to_examples/go.modand updates_examples/go.sumaccordingly. grpc is a module-graph ghost dependency of the examples module (nothing in_examplesimports it — it arrives viaentgo.io/contrib), so the replace-pin pattern already used for x/crypto, x/net, x/sys, and goldmark (ghost-vuln patches #98/#100/#101) is applied here, matching the v1.82.1 the root module adopted in #103.Motivation and Context
Clears the last two open Snyk High findings in the org attributed to this repo — "Incorrect Authorization" in
google.golang.org/grpcinternal/transport and internal/xds/rbac (SNYK-GOLANG-GOOGLEGOLANGORGGRPCINTERNALTRANSPORT-18172578, SNYK-GOLANG-GOOGLEGOLANGORGGRPCINTERNALXDSRBAC-18172577), both against_examples/go.modat grpc v1.81.1. Part of the FL-30189 vulnerability patch sweep (FL-30189).How Has This Been Tested?
go mod tidyin_examples— go.sum now resolves grpc v1.82.1 (v1.81.1 gone)go list -m google.golang.org/grpc→v1.82.1 => v1.82.1go build ./...andgo vet ./...in_examples— cleanmake test(full_examplesintegration suite) — passing locallyScreenshots (if appropriate):
N/A — dependency pin only.
Types of changes
Checklist:
Addition (same day): otel v1.44.0 pin
Second commit
c92bc59clears the two Snyk Medium CVE-2026-41178 findings (otel baggage + propagation) the FL-30126 report had written off as "not upgradeable" — otel is another module-graph ghost arriving via grpc v1.82.1's requirements, so the same replace-pin pattern applies. Pinned in bothgo.modand_examples/go.mod(the grpc pin would otherwise surface the finding in _examples on the next scan). Effective selection verified:v1.43.0 => v1.44.0in both modules; root build + unit tests + full integration suite green.