Bump x/crypto to v0.56.0 and adopt go 1.26.0 - #6494
Open
tgrunnagle wants to merge 1 commit into
Open
Conversation
tgrunnagle
force-pushed
the
bump-x-crypto-ssh-dos
branch
from
September 2, 2026 21:12
3c49d48 to
b23cc25
Compare
Two advisories were published against golang.org/x/crypto/ssh — GO-2026-6354 and GO-2026-6355, both channel-deadlock DoS bugs a malicious SSH peer can trigger — failing the govulncheck gate on every PR and on main's next scheduled scan. These are production-reachable, not test-only: govulncheck traces the vulnerable ssh.NewClientConn from pkg/git.Clone -> go-git CloneContext -> go-git's SSH transport (registered by default), i.e. any clone over SSH. So x/crypto/ssh cannot simply be dropped — it backs go-git's SSH support. The fix is x/crypto v0.56.0, but that release declares `go 1.26.0` in its own go.mod, so any consumer must also declare `go 1.26.0`. That collides with lint.yml's "go.mod must pin Go to minor version" check, which is why every go step in CI rewrote the directive to a patch version and lint then rejected it. The two cannot both hold, so this adopts the patch directive: - Bump golang.org/x/crypto v0.55.0 -> v0.56.0 - Set the go directive to go 1.26.0 (required transitively by x/crypto) - Remove lint.yml's minor-version go.mod check, which the new floor makes untenable Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
tgrunnagle
force-pushed
the
bump-x-crypto-ssh-dos
branch
from
September 2, 2026 21:18
b23cc25 to
5ae8258
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #6494 +/- ##
==========================================
+ Coverage 78.18% 78.22% +0.03%
==========================================
Files 769 769
Lines 75049 75049
==========================================
+ Hits 58680 58708 +28
+ Misses 16364 16336 -28
Partials 5 5 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
ChrisJBurns
approved these changes
Sep 2, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Why: two advisories were published against
golang.org/x/crypto/ssh— GO-2026-6354 and GO-2026-6355, both channel-deadlock DoS bugs a malicious SSH peer can trigger. They fail thegovulnchecksecurity gate on every open PR and will failmain's next scheduled scan.What:
golang.org/x/cryptov0.55.0 → v0.56.0 (the release that fixes both advisories).godirectivego 1.26→go 1.26.0..github/workflows/lint.yml.Reachability (severity context)
These are production-reachable, not test-only.
govulnchecktraces the vulnerablessh.NewClientConnfrom our own code:pkg/git.Clonecallsgit.CloneContext, and go-git registers its SSH transport by default, so the vulnerable path is linked in and reachable whenever a repository is cloned over SSH (pkg/gitexposesWithAuth(transport.AuthMethod), which accepts SSH auth). The dependency therefore cannot be removed without dropping go-git's SSH transport support — bumping to the patched release is the correct fix.Why the go directive has to change (and the lint rule has to go)
x/crypto v0.56.0declaresgo 1.26.0in its owngo.mod. Go's module rules require a consumer to declare agoversion >= the maximum of its dependencies'godirectives, so pulling v0.56.0 forces this module'sgo.modtogo 1.26.0(patch-level).That directly collides with
lint.yml's guard:The two constraints cannot both hold: any
gostep (build,go mod tidy, codegen verify) rewrites the directive to1.26.0, and the lint check then rejects it. Adoptinggo 1.26.0and dropping the minor-version guard is the only way to consume the patched dependency.go mod tidywas re-run sogo.sumis consistent under the new floor.Type of change
Test plan
govulncheck ./...locally: GO-2026-6354 and GO-2026-6355 no longer appear after the bump.go build ./...passes;go mod tidyleaves the tree clean undergo 1.26.0.GO-2026-5932, already inIGNORED_VULNS.Does this introduce a user-facing change?
No.
Special notes for reviewers — please confirm the approach
This PR makes a repo-wide policy change (the
godirective floor and the removal of the minor-version lint guard), which is broader than a routine dependency bump. Please confirm you're comfortable with:godirective togo 1.26.0. This sets a patch-level minimum for the whole module. It's transitively required byx/crypto v0.56.0— there's no way to take the fix ongo 1.26.GOTOOLCHAIN; with a dependency now pinning a patch floor, the guard can no longer pass.An ignore-list entry was considered and rejected: the vuln is reachable from production git-over-SSH (see Reachability above), so suppressing it would leave a real DoS path unaddressed. Removing the dependency was also investigated and isn't viable — it backs go-git's SSH transport.
Generated with Claude Code