Skip to content

Fix Security CI: golang.org/x/net v0.60.0 and Go toolchain 1.26.9 - #886

Merged
jeremy merged 1 commit into
mainfrom
fix-security-ci
Oct 12, 2026
Merged

jeremy merged 1 commit into
mainfrom
fix-security-ci

Conversation

@jeremy

@jeremy jeremy commented Oct 12, 2026 •

Copy link
Copy Markdown
Member

The Security (govulncheck, in test.yml) and Trivy Security Scan checks fail on main (b80505e, and 40e4757 since the 06:46 UTC scheduled run on 2026-10-12) and on every PR branch. Nothing in the repo changed: the Go vulnerability database published new HTTP/2 and stdlib advisories, and the findings are real.

Findings and fixes

Finding Module Found Fixed Reported by
CVE-2026-78669 (HIGH), HTTP/2 SETTINGS DoS golang.org/x/net v0.59.0 v0.60.0 Trivy
GO-2026-6617, -6612, -6611, -6610, -6603 golang.org/x/net and net/http v0.59.0 / go1.26.7 v0.60.0 / go1.26.9 govulncheck
GO-2026-6613, -6605 net/http go1.26.7 go1.26.9 govulncheck
GO-2026-6608 net/textproto go1.26.7 go1.26.9 govulncheck
GO-2026-6607 crypto/tls go1.26.7 go1.26.9 govulncheck
GO-2026-6600, -6599 html/template go1.26.7 go1.26.9 govulncheck
  • golang.org/x/net v0.59.0 -> v0.60.0 (no other module moved)
  • toolchain go1.26.9 added to go.mod; the go 1.26.7 line stays as it is
  • nix/package.nix vendorHash recomputed for the changed go.sum (make update-nix-hash, verified build)

Why toolchain and not go 1.26.9

Every workflow uses actions/setup-go with go-version-file: go.mod, and setup-go honors the toolchain directive, so CI, govulncheck and release binaries build with 1.26.9 (the CI log shows Setup go version spec 1.26.9). The directive also applies to builds from a checkout. It does not apply to go install github.com/basecamp/basecamp-cli/cmd/basecamp@latest, because a versioned install has no main module and only switches toolchains when the go line requires it. Someone who installs that way with Go 1.26.7 or 1.26.8 still gets the vulnerable stdlib (raised by both reviewers; a correction to this description's first version). Raising the go line would also raise the minimum Go needed to build, past what nixpkgs-unstable carries today (go_1_26 = 1.26.8), and the Nix flake build would fail. With this change Nix keeps building with GOTOOLCHAIN=local against the unchanged 1.26.7 minimum; its binaries carry whatever Go nixpkgs pins. Closing the go install gap needs go 1.26.9, and today that means either a red Nix flake build or overriding nixpkgs' Go with 1.26.9 built from source in nix/package.nix until nixpkgs ships it. 1.26.9 isn't on nixpkgs master, nixos-unstable or nixpkgs-unstable yet (all at 1.26.8). Human decision, see the open review threads: merge this as is and raise the go line in a follow-up when nixpkgs catches up, or add the Nix override here.

Nothing is silenced: no ignore files, and no workflow files changed.

Verification (local, macOS)

  • govulncheck -tags dev ./...: 11 reachable before, 0 after. One unreachable module finding remains, GO-2026-5932 (x/crypto/openpgp, unmaintained, no fix). It was already there before this change and doesn't fail the check.
  • trivy fs --severity HIGH,CRITICAL --ignore-unfixed --exit-code 1 .: 1 HIGH before, 0 after, exit 0
  • make update-nix-hash: Nix build passes in Docker with the new vendorHash
  • make check ran on macOS because the Linux build host was unreachable (Tailscale re-auth needed). Results: GOOS=linux golangci-lint found 0 issues. Every other target passed except test, where the TTY-detection tests fail in this sandboxed shell. The macOS lint flags two issues in proctime_darwin.go; that file is Darwin-only, isn't touched here, and CI lints on Linux. All PR CI is green on Linux, including Tests, Race Detection, Nix flake builds, Security and Trivy Security Scan.

Summary by cubic

Fixes the failing Security (govulncheck) and Trivy Security Scan workflows by updating golang.org/x/net from v0.59.0 to v0.60.0 and adding toolchain go1.26.9 to go.mod. The failures came from new HTTP/2 and stdlib advisories published in the Go vulnerability database; nothing in the repo changed.

  • The go 1.26.7 line stays unchanged; the toolchain directive raises the version used by setup-go and go install without raising the build floor, so the Nix flake still builds with nixpkgs' 1.26.7 Go.
  • vendorHash in nix/package.nix recomputed for the updated go.sum.
  • Nothing silenced: no ignore files or workflow changes were added.

Written for commit 49ffc1e. Summary will update on new commits.

View guided diff Turn on auto-fix

govulncheck and Trivy began failing on main and every PR when the Go
vulnerability database published the October HTTP/2 and stdlib advisories.
No code or dependency changed; the findings are real:

- golang.org/x/net v0.59.0 -> v0.60.0 (Trivy CVE-2026-78669, HIGH;
  govulncheck GO-2026-6617, -6612, -6611, -6610, -6603)
- Go stdlib 1.26.7 -> 1.26.9 (govulncheck GO-2026-6617, -6613, -6612,
  -6611, -6610, -6608, -6607, -6605, -6603, -6600, -6599 in net/http,
  net/textproto, crypto/tls, html/template)

The stdlib fix goes in a toolchain directive rather than the go line.
setup-go reads it, so CI and release binaries build with 1.26.9, as does
go install under the default GOTOOLCHAIN=auto. Raising the go line would
also raise the build floor past what nixpkgs-unstable carries (1.26.8),
breaking the Nix flake build, which keeps building with GOTOOLCHAIN=local
against the unchanged 1.26.7 floor.

vendorHash recomputed for the changed go.sum via make update-nix-hash.
Copilot AI balanced review requested due to automatic review settings October 12, 2026 18:13
@jeremy
jeremy requested a review from a team as a code owner October 12, 2026 18:13
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 12, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-12T18:16:21.445775Z 49ffc1e PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@cubic-dev-ai cubic-dev-ai Bot 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.

No issues found across 3 files

You’re at about 93% of the monthly reviewed-line limit. You may want to disable incremental reviews to conserve quota. Reviews will continue until that limit is exceeded. If you need help avoiding interruptions, please contact contact@cubic.dev.

View guided diff | Turn on auto-fix | Re-trigger cubic

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 49ffc1e1d9

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread go.mod Resolved

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.

🟡 Changes recommended

The toolchain directive does not secure documented version-suffixed go install builds using Go 1.26.7 or 1.26.8.

1 open finding
What changed in this PR

Updates Go dependencies and CI-selected toolchain to address newly reported security vulnerabilities.

Changes:

  • Upgrades golang.org/x/net to v0.60.0.
  • Selects Go 1.26.9 and refreshes dependency checksums.
  • Recomputes the Nix vendor hash.

[!TIP]
If you aren't ready for review, convert to a draft PR.
Click "Convert to draft" or run gh pr ready --undo.
Click "Ready for review" or run gh pr ready to reengage.

File Description
go.mod Updates x/net and adds the toolchain directive.
go.sum Updates x/net checksums.
nix/​package.nix Refreshes the Nix vendor hash.

🧠 Review effort: Balanced


💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread go.mod Resolved
@jeremy

jeremy commented Oct 12, 2026

Copy link
Copy Markdown
Member Author

🤖 Review summary for head 49ffc1e

CI is green on this head, including Security (govulncheck: Setup go version spec 1.26.9, 0 reachable vulnerabilities), Trivy Security Scan and Nix flake builds. Codex, Copilot and cubic each reviewed 49ffc1e. cubic found no issues.

Open threads (2), both awaiting a human decision, and both the same finding:

  • Codex, P1 and Copilot, high: toolchain go1.26.9 doesn't reach go install …@latest. The finding is correct, and I've fixed the PR description's claim that it did. The choice is between raising go to 1.26.9 now, which turns the Nix flake build red unless nix/package.nix builds Go 1.26.9 from source (nixpkgs is still at 1.26.8), and merging as is, then raising the go line once nixpkgs ships 1.26.9.

No findings declined; nothing resolved.

@jeremy
jeremy merged commit f238b79 into main Oct 12, 2026
41 checks passed
@jeremy
jeremy deleted the fix-security-ci branch October 12, 2026 21:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants