Skip to content

deps: patch Go toolchain and x/net CVEs; add govulncheck to CI - #12

Merged
atmask merged 1 commit into
mainfrom
deps/go-toolchain-security
Nov 23, 2026
Merged

atmask merged 1 commit into
mainfrom
deps/go-toolchain-security

Conversation

@atmask

@atmask atmask commented Nov 23, 2026

Copy link
Copy Markdown
Owner

Why

govulncheck found vulnerabilities reachable from the shim on main and in the released containix/v0.1.0:

  • the Go 1.26.3 standard library: net/http, crypto/x509, crypto/tls, net/textproto
  • golang.org/x/net v0.58.0

v0.1.0 is also affected by the containerd issues GO-2026-6796 and GO-2026-6791, which main already fixes after the recent Dependabot merges.

Changes

  • nixpkgs → 2026-11-21, building and developing with go_1_26 (1.26.11).
    • I didn't use the new default go (1.27.3). It still has GO-2026-6859, which is fixed in 1.27.4 and not yet in nixpkgs.
    • go.mod already targets 1.26.
  • golang.org/x/net → v0.60.0, plus the related x/sync, x/sys and x/text bumps.
  • Drop x86_64-darwin from the flake, because nixpkgs 26.11 removed support for it.
  • Fix a deprecation: stdenv.isLinux → stdenv.hostPlatform.isLinux.
  • CI: a new govulncheck job and a weekly scheduled run, so newly published vulnerabilities show up between PRs.
  • vendorHash workflow: fixes a pipefail bug. When vendoring failed for a reason other than a hash mismatch, the job exited 1 silently instead of printing the error. That happened on Bump containerd to 2.4.2 (requires containerd 2.3+ daemons) #11.

Verified locally

  • govulncheck ./... (linux/amd64): 0 vulnerabilities
  • go build for linux/amd64 and linux/arm64, plus go vet
  • The vendorHash was recomputed with Go 1.26.11 and matches.
  • nixpkgs-fmt and actionlint pass.
  • The full pre-commit suite passes. It now uses golangci-lint 2.15.

go test -race and the Nix build only run on Linux, so CI covers those.

Follow-ups

  • After this merges, cut containix/v0.1.1 so the released binary picks up these fixes and the containerd ones.
  • Bump containerd to 2.4.2 (requires containerd 2.3+ daemons) #11 (containerd 2.4) needs code changes, because the shim Manager API changed. Its vendoring failure is the Go-version requirement, which this PR fixes.

govulncheck found reachable vulnerabilities on main from the Go 1.26.3
standard library (net/http, crypto/x509, crypto/tls, net/textproto) and
golang.org/x/net v0.58.0.

- flake.lock: bump nixpkgs to 2026-11-21.
- flake.nix: build and develop with go_1_26 (1.26.11), which fixes all
  reported stdlib issues. Default `go` is now 1.27.3, which still has
  GO-2026-6859 (fixed in 1.27.4), and go.mod targets 1.26 anyway.
- flake.nix: drop x86_64-darwin; nixpkgs 26.11 no longer supports it.
- flake.nix/docs: stdenv.isLinux -> stdenv.hostPlatform.isLinux
  (deprecated).
- go.mod: golang.org/x/net v0.60.0 (+ x/sync, x/sys, x/text).
- CI: add a govulncheck job and a weekly scheduled run.
- dependabot-vendor-hash.yml: don't let the `got:` grep abort the script
  under pipefail when the build fails for another reason, so the actual
  error is printed instead of a silent exit 1.

govulncheck now reports 0 vulnerabilities.
@atmask
atmask merged commit ffb0545 into main Nov 23, 2026
8 checks passed
@atmask
atmask deleted the deps/go-toolchain-security branch November 23, 2026 01:29
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.

1 participant