Skip to content

chore(deps): bump github.com/gorilla/websocket to v1.5.4-0.20250319132907-e064f32e3674 - #6287

Merged
RongGu merged 1 commit into
masterfrom
cheyang-fluid-1-1-0-release-readiness
Nov 25, 2026
Merged

RongGu merged 1 commit into
masterfrom
cheyang-fluid-1-1-0-release-readiness

Conversation

@cheyang

@cheyang cheyang commented Nov 25, 2026

Copy link
Copy Markdown
Collaborator

Ⅰ. Describe what this PR does

This PR bumps the indirect dependency github.com/gorilla/websocket from v1.5.3 to v1.5.4-0.20250319132907-e064f32e3674. That is the commit Kubernetes 1.33+ and k8s.io/client-go v0.33 pin.

Why. Since the Go vulnerability DB update of 2026-11-23, govulncheck reports GO-2026-6278 for v1.5.3. In that version, newMaskKey draws the client frame mask key from math/rand (vendored conn.go:184-187).

Why this version. The fix, gorilla/websocket@d67f41855da4, is not in any tagged release. This PR therefore pins the commit Kubernetes uses:

  • it contains the fix (compare d67f41855da4...e064f32e3674: 9 ahead, 0 behind);
  • its newMaskKey reads from crypto/rand.

Impact on Fluid: not exploitable.

  • Fluid execs into Pods only through remotecommand.NewSPDYExecutor (pkg/utils/kubeclient/exec.go:211), so it never sends WebSocket frames. govulncheck's call traces come from io.Writer interface dispatch.
  • GitHub's advisory GHSA-w67g-5rqw-f597 lists v1.5.3 as fixed. That is why Dependabot raised no alert.
  • The bump clears the finding from scanners before the v1.1.0 release images are built.

Scope of the change:

  • go.mod: 1 line.
  • go.sum: 2 lines. The hashes match kubernetes/kubernetes master's go.sum.
  • vendor/modules.txt and the vendored package. v1.5.3 had its own copy of the x/net proxy code (x_net_proxy.go); the new version imports golang.org/x/net/proxy instead.
  • No other module moves. The new version requires golang.org/x/net v0.26.0, Fluid already has v0.62.0, and golang.org/x/net/proxy was already vendored.

Ⅱ. Does this pull request fix one issue?

NONE

Ⅲ. List the added test cases (unit test/integration test) if any, please explain if no tests are needed.

No new tests. This is a dependency bump without any Fluid code change, and the existing unit tests and CI cover the affected exec path.

Ⅳ. Describe how to verify it

All commands were run with GOTOOLCHAIN=go1.26.11, the version CI uses:

  • go mod tidy on master: no diff before the bump, so the diff below is limited to websocket.
  • go get github.com/gorilla/websocket@v1.5.4-0.20250319132907-e064f32e3674 && go mod tidy && go mod vendor: running go mod vendor again produces no further change.
  • go mod verify: passed, "all modules verified".
  • go build ./...: passed.
  • make build: passed. All 11 controller, CSI and webhook binaries were built.
  • go vet ./...: passed.
  • go list ./... | grep -v controller | grep -v e2etest | FLUID_UNIT_TEST=true KUBECONFIG=/nonexistent xargs go test -gcflags="all=-N -l" -count=1: passed, 70 ok and 0 FAIL.
  • govulncheck ./... (v1.9.0, vuln DB of 2026-11-24):
    • before: 5 findings from 2 modules, GO-2026-6278 plus 4 k8s.io/kubernetes;
    • after: 4 findings from 1 module, only the k8s.io/kubernetes@v1.29.15 module-level advisories.

Ⅴ. Special notes for reviews

This is part of the v1.1.0 release prep. It should merge before the release images are rebuilt.

The 4 remaining govulncheck findings are module-level advisories for kube-apiserver, kubelet and kube-controller-manager. They are unchanged by this PR and are not reachable in Fluid.

…2907-e064f32e3674

govulncheck reports GO-2026-6278 for the indirect dependency
github.com/gorilla/websocket v1.5.3: newMaskKey draws the client frame
mask key from math/rand. The fix (d67f41855da4) is not in a tagged
release, so pin the commit that Kubernetes 1.33+ and client-go v0.33
use. It contains the fix, and newMaskKey there reads from crypto/rand.

Fluid execs into Pods with remotecommand.NewSPDYExecutor only and never
sends WebSocket frames, so the finding is not exploitable here. The bump
clears it from scanners before the v1.1.0 images are built.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Signed-off-by: cheyang <cheyang@163.com>
@sonarqubecloud

Copy link
Copy Markdown

@codecov

codecov Bot commented Nov 25, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 66.45%. Comparing base (07bdbcd) to head (92a2a21).

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #6287   +/-   ##
=======================================
  Coverage   66.45%   66.45%           
=======================================
  Files         488      488           
  Lines       34905    34905           
=======================================
  Hits        23195    23195           
  Misses       9943     9943           
  Partials     1767     1767           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@cheyang
cheyang requested review from xliuqq and a balanced review from Copilot November 25, 2026 05:51

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

There are no active review issues for the WebSocket dependency update targeting the reported masking-key vulnerability.

No open issues 🎉

What changed in this PR

Updates Fluid’s indirect Gorilla WebSocket dependency to v1.5.4-0.20250319132907-e064f32e3674 to address the reported masking-key vulnerability ahead of the v1.1.0 release. No Fluid application code changes are included.

Changes:

  • Updates the dependency pin, checksums, and vendor metadata.
  • Imports upstream changes, including cryptographically random client masking keys and revised connection handling.
  • Replaces bundled proxy code with golang.org/x/net/proxy and removes legacy TLS helper files.
File Description
vendor/​modules.txt Updates WebSocket version and Go requirement metadata.
vendor/​github.com/​gorilla/​websocket/​x_net_proxy.go Removes the bundled proxy implementation.
vendor/​github.com/​gorilla/​websocket/​tls_handshake.go Removes the TLS helper now incorporated into the client.
vendor/​github.com/​gorilla/​websocket/​tls_handshake_116.go Removes legacy Go TLS compatibility code.
vendor/​github.com/​gorilla/​websocket/​server.go Updates upgrade handling, buffering, and connection cleanup.
vendor/​github.com/​gorilla/​websocket/​README.md Updates upstream example links to the main branch.
vendor/​github.com/​gorilla/​websocket/​proxy.go Uses the shared proxy package and context-aware dialing.
vendor/​github.com/​gorilla/​websocket/​conn.go Uses cryptographic masking keys and updates frame handling.
vendor/​github.com/​gorilla/​websocket/​compression.go Adds fallback handling for decompressor reset errors.
vendor/​github.com/​gorilla/​websocket/​client.go Refactors proxy and TLS dialing and deadline handling.
go.sum Records checksums for the updated dependency.
go.mod Pins the selected WebSocket pseudo-version.

Review effort: Balanced

@RongGu RongGu left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm
/approve

@RongGu
RongGu merged commit b8ff60e into master Nov 25, 2026
25 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants