Skip to content

fix(security): bump vendored x/net to v0.57.0 and x/text to v0.41.0 - #4

Merged
kycheng merged 2 commits into
AlaudaDevops:alauda-v2.8.3from
kycheng:fix/vuln-20260907-goharbor
Sep 8, 2026
Merged

kycheng merged 2 commits into
AlaudaDevops:alauda-v2.8.3from
kycheng:fix/vuln-20260907-goharbor

Conversation

@kycheng

@kycheng kycheng commented Sep 7, 2026

Copy link
Copy Markdown
Collaborator

Scanned with the 2026-09-07 trivy DB. The vendored golang.org/x/net was still v0.17.0 and golang.org/x/text v0.13.0; registry vendors x/net/http2 and x/net/idna, so these are compiled into the shipped binary.

CVE Severity Package Fixed in
CVE-2023-45288 HIGH golang.org/x/net (http2 CONTINUATION flood) v0.23.0
CVE-2024-45338 HIGH golang.org/x/net v0.33.0
CVE-2026-33814 HIGH golang.org/x/net v0.53.0
CVE-2026-25681 HIGH golang.org/x/net v0.55.0
CVE-2026-27136 HIGH golang.org/x/net v0.55.0
CVE-2026-39821 HIGH golang.org/x/net v0.55.0
CVE-2026-46600 HIGH golang.org/x/net v0.56.0
CVE-2026-56852 HIGH golang.org/x/text v0.39.0

plus 7 MEDIUM in x/net (CVE-2025-22870, CVE-2025-22872, CVE-2025-47911, CVE-2025-58190, CVE-2026-25680, CVE-2026-42502, CVE-2026-42506).

vendor.conf now pins x/net v0.57.0 and x/text v0.41.0, re-vendored with the exact command CI verifies against (vndr -whitelist golang.org/x/net/publicsuffix/data), so script/validate/vendor stays clean. The diff touches only vendor/golang.org/x/{net,text} - no other dependency moved.

Test plan

  • go build ./... passes with Go 1.26.7 and with Go 1.20.10 (the version ci.yml pins), so no CI Go bump is needed.
  • go1.20.10 test -short ./registry/... ./notifications/...: the only two failures (TestGracefulShutdown, TestRegistrySupportedCipherSuite) fail identically on an unmodified checkout of the base branch, so they are pre-existing and unrelated.

Opened from a fork because my account only has pull on this repo. Both AlaudaDevops repos share the distribution/distribution fork network, and GitHub allows only one fork per network per account, so the sibling PR comes from a second branch on the same fork.

🤖 Generated with Claude Code

https://claude.ai/code/session_01WiJtA4jxhaQsff6f7wsjqR

Scanned with the 2026-09-07 trivy DB. The vendored golang.org/x/net was
still v0.17.0 and golang.org/x/text v0.13.0:

| CVE | Severity | Package | Fixed in |
| --- | --- | --- | --- |
| CVE-2023-45288 | HIGH | golang.org/x/net (http2 CONTINUATION flood) | v0.23.0 |
| CVE-2024-45338 | HIGH | golang.org/x/net | v0.33.0 |
| CVE-2026-33814 | HIGH | golang.org/x/net | v0.53.0 |
| CVE-2026-25681 | HIGH | golang.org/x/net | v0.55.0 |
| CVE-2026-27136 | HIGH | golang.org/x/net | v0.55.0 |
| CVE-2026-39821 | HIGH | golang.org/x/net | v0.55.0 |
| CVE-2026-46600 | HIGH | golang.org/x/net | v0.56.0 |
| CVE-2026-56852 | HIGH | golang.org/x/text | v0.39.0 |

plus 7 MEDIUM in x/net (CVE-2025-22870, CVE-2025-22872, CVE-2025-47911,
CVE-2025-58190, CVE-2026-25680, CVE-2026-42502, CVE-2026-42506).
registry vendors x/net/http2 and x/net/idna, so these are compiled in.

Re-vendored with the same command CI verifies against
(vndr -whitelist golang.org/x/net/publicsuffix/data), so
script/validate/vendor stays clean. The diff touches only
vendor/golang.org/x/{net,text}; no other dependency moved.

Verified:
- go build ./... passes with Go 1.26.7 and with Go 1.20.10, the version
  ci.yml pins, so no CI Go bump is needed.
- go1.20.10 test -short ./registry/... ./notifications/...: the only two
  failures (TestGracefulShutdown, TestRegistrySupportedCipherSuite) fail
  identically on an unmodified checkout of alauda-v2.8.3, so they are
  pre-existing and unrelated to this change.
golang.org/x/net v0.56+ requires Go 1.24: http2/frame.go imports
internal/httpsfv, which needs "slices" (Go 1.21), and http2/config.go uses
http.HTTP2Config / http.Server.HTTP2 (Go 1.24). The CI build and the
Dockerfile were still on Go 1.20.10, which fails with:

  vendor/golang.org/x/net/internal/httpsfv/httpsfv.go:10:2:
      cannot find package "slices"

Since x/net has to move to at least v0.56.0 to close CVE-2026-46600 (and
v0.23.0 for CVE-2023-45288), Go has to move with it.

- .github/workflows/ci.yml: go-version 1.20.10 -> 1.24.13.
- Dockerfile: GO_VERSION 1.20.10 -> 1.24.13, ALPINE_VERSION 3.18 -> 3.22
  (golang:1.24.13-alpine3.18 does not exist; 3.18 is EOL).
- script/setup/install-dev-tools: golangci-lint v1.54.2 -> v1.62.2.
  v1.54.2 cannot typecheck a Go 1.24 tree ("undefined: metrics",
  "undefined: bugsnag"); v1.62.2 is the newest v1 line that runs clean
  here (v1.64+ ships a gci formatter that errors out in GOPATH mode).
- .golangci.yml, the minimum needed to keep `make check` green on the
  newer linter, no behaviour change intended:
  - drop `golint`: archived upstream and fully inactivated since v1.41,
    which the newer linter reports as an error (making it exit 7).
    `revive`, which replaces it, is already configured here.
  - `vet` -> `govet` (renamed), `run.skip-dirs` -> `issues.exclude-dirs`
    (deprecated key).
  - the existing io/ioutil SA1019 exclusion matched only the old wording
    ("since Go 1.16"); staticcheck now says "since Go 1.19".
- Test files: replace t.Fatalf(err.Error()) / t.Errorf(err.Error()) with
  t.Fatal(err) / t.Error(err), and drop a redundant fmt.Sprintf in
  walk_test.go. This is not cosmetic: `go test` runs a subset of vet, and
  Go 1.24's vet rejects non-constant format strings, so on Go 1.24 the
  old calls fail the build outright:

    registry/handlers/api_test.go:888:12: non-constant format string in
        call to (*testing.common).Fatalf

Verified locally in GOPATH mode (with go1.24.10, the toolchain I had at
hand): build and `go vet` with -tags "include_oss include_gcs" are clean,
test binaries compile, and golangci-lint v1.62.2 exits 0.
@kycheng
kycheng merged commit 66f2198 into AlaudaDevops:alauda-v2.8.3 Sep 8, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants