GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |
GeezerVison is showing github.com — chore: bump Go to 1.26.5 by QuantumExplorer · Pull Request #1395 · dashpay/tenderdash Conversation
Member
Issue being fixed or feature implemented
It is a Go standard library vulnerability, reached from:
It is unrelated to any application code, so it blocks unrelated PRs (#1393 and What was done?Bumped Go from 1.26.4 to 1.26.5 at every pin:
Patch release only — no language or API changes. How Has This Been Tested?Built The two remaining advisories it reports are in imported packages/required CI on this PR exercises the full build, unit and e2e suites on the new toolchain. Breaking ChangesNone. Go patch release; no language or standard library API changes. Checklist:
For repository code-owners and collaborators only
🤖 Generated with Claude Code
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
|
There was an error while loading. Please reload this page.
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
govulncheck fails on v1.6-dev and every PR branch with GO-2026-5856, a vulnerability in the Go standard library's crypto/tls at go1.26.4. It is reached from dash/core/client.go, rpc/jsonrpc/server/http_server.go, rpc/jsonrpc/client/http_json_client.go and internal/libs/autofile/group.go. It is fixed in go1.26.5, so bump every pin: - go.mod - DOCKER/Dockerfile, test/docker/Dockerfile, test/e2e/docker/Dockerfile - go-version in the build, check-generated, e2e, govulncheck, lint, release and tests workflows - go-version in .github/actions/bls, which runs its own setup-go after the caller's. Leaving it at 1.26.4 put the older toolchain back on the path, so every job that installs BLS failed with "go.mod requires go >= 1.26.5 (running go 1.26.4)". - the versions quoted in README.md, test/fuzz/README.md and the two Go tutorials Verified against golang:1.26.5-alpine3.23: the tree builds and govulncheck reports no vulnerabilities. Co-Authored-By: Claude Opus 5 <[email protected]>
a5db838 to
dc6f843
Compare
There was an error while loading. Please reload this page.
govulncheck fails identically on v1.7-dev and every open PR branch (#1412, #1411, #1410) with 6 Go standard-library findings, all "Found in: go1.26.5 / Fixed in: go1.26.6": - GO-2026-6218 (net/url) - GO-2026-6091 (html/template) - GO-2026-6090 (crypto/tls) - GO-2026-6089 (net/http, x2) - GO-2026-5972 (encoding/asn1) Reachable from our TLS/RPC/HTTP server and Dash Core client paths (same call sites as PR #1395). Bumping the pinned toolchain from 1.26.5 to 1.26.6 turns govulncheck green everywhere at once and unblocks #1412, #1411, #1410. Mirrors PR #1395's pattern (1.26.4 -> 1.26.5): pure patch-release toolchain swap, no language/API changes, same 16 files touched (go.mod, CI workflow go-version pins, Dockerfiles, docs). Verified locally with go1.26.6: go build ./... succeeds, and govulncheck ./... reports 0 vulnerabilities (down from 6). Claude-Session: https://claude.ai/code/session_01RoXmbFrVf1BqVW1BHZv6Va Co-authored-by: Claude Sonnet 5 <[email protected]>
* chore(deps): bump Go to 1.26.6 (#1417) govulncheck fails identically on v1.7-dev and every open PR branch (#1412, #1411, #1410) with 6 Go standard-library findings, all "Found in: go1.26.5 / Fixed in: go1.26.6": - GO-2026-6218 (net/url) - GO-2026-6091 (html/template) - GO-2026-6090 (crypto/tls) - GO-2026-6089 (net/http, x2) - GO-2026-5972 (encoding/asn1) Reachable from our TLS/RPC/HTTP server and Dash Core client paths (same call sites as PR #1395). Bumping the pinned toolchain from 1.26.5 to 1.26.6 turns govulncheck green everywhere at once and unblocks #1412, #1411, #1410. Mirrors PR #1395's pattern (1.26.4 -> 1.26.5): pure patch-release toolchain swap, no language/API changes, same 16 files touched (go.mod, CI workflow go-version pins, Dockerfiles, docs). Verified locally with go1.26.6: go build ./... succeeds, and govulncheck ./... reports 0 vulnerabilities (down from 6). Claude-Session: https://claude.ai/code/session_01RoXmbFrVf1BqVW1BHZv6Va Co-authored-by: Claude Sonnet 5 <[email protected]> (cherry picked from commit 0a7a33e) * ci(lint): bump golangci-lint from v2.12 to v2.13 golangci-lint v2.12.2 (the latest v2.12.x, matching the current floating `version: v2.12` selector) panics rather than reporting findings when analyzing this codebase under Go 1.27.1: the bundled staticcheck analyzer (honnef.co/go/[email protected]) crashes its SSA/IR builder with "unexpected expr: *ast.KeyValueExpr" while building IR for the stdlib package internal/poll. Confirmed deterministic (reproduced twice) and not a stale-binary artifact (rebuilt golangci-lint v2.12.2 from source with the go1.27.1 toolchain itself, same panic). Isolating the culprit with --disable=staticcheck makes the panic disappear and returns 0 issues, but disabling staticcheck in CI is rejected as a fix: it is the linter catching the QF1008 class, and turning it off to land a version bump would trade a real gate for a green tick. golangci-lint v2.13.0 shipped 2026-08-19, the same day as Go 1.27.0 — the 2.13 line is Go 1.27-compatible where 2.12 predates Go 1.27 entirely. Measured v2.13.2 (the latest v2.13.x) built fresh with both toolchains: no panic and 0 --new-from-rev findings at go1.26.6 and at go1.27.1. The two changes are independent, so this commit lands ahead of and does not depend on the Go 1.27.1 bump that follows it — every intermediate commit in this branch keeps the lint job runnable. Kept the existing floating-minor pin convention (`v2.13`, not an exact `v2.12.2`-style pin): the crash was caused by the minor version predating Go 1.27, not by floating within a minor, so an exact pin would have failed identically and there is no reason to change the convention in response to a problem it did not cause. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_019gAC8rAzQagn5sgDxUJNjj * chore(mockery): bump to v3.7.4 and regenerate The `check-mocks` CI job pins `mockery=3.7.0` (released 2026-03-06, five months before Go 1.27.0). Under a go1.27.1 toolchain, mockery 3.7.0 fails outright rather than producing a diff: internal error: package "github.com/dashpay/tenderdash/libs/ds" without types was imported from "github.com/dashpay/tenderdash/libs/store" This is mockery's bundled golang.org/x/tools/go/packages loader failing to attach type information to a transitively-imported package when driven by the newer toolchain — not a defect in this repository's source. Reproduced locally under the exact conditions CI runs (GOTOOLCHAIN=local, the go1.27.1 binary setup-go installs, no auto-download); the CI log itself can't show this, since the generation step runs `make mockery 2>/dev/null` and discards stderr — anyone hitting this in CI needs to reproduce it locally to see anything past "exit code 2". mockery v3.7.4 (released 2026-08-23, four days after Go 1.27.0) fixes it: same reproduction conditions, clean exit. Measured it under both go1.26.6 and go1.27.1 and got byte-identical regenerated output either way — the interface{}->any / parameter-naming differences below come entirely from mockery's own codegen version, not from which Go toolchain drives it. That's what makes this commit stand on its own ahead of the Go 1.27.1 bump that follows it in this branch, rather than being a consequence of it. Bumped both pin sites: check-generated.yml's MOCKERY and scripts/mockery_generate.sh's VERSION. The version bump and the regenerated mocks can't be split into separate commits: CI regenerates and diffs in the same step, so a pin bump without regenerated mocks leaves check-mocks red (diff appears), and regenerated mocks without the pin bump leaves it red too (CI regenerates with 3.7.0 and hits the error above again). Regenerated all mocks under mockery v3.7.4 (`make mockery`). The diff is mechanical and cosmetic only, inspected file-by-file rather than trusted from the diffstat: every change is either `interface{}` -> `any` in generated _Expecter method signatures (Go 1.18+ built-in alias, identical type), or a generated parameter name recovering the interface's real source name where 3.7.0 fell back to a generic placeholder (`v`, `vs`, `context1`). No method set changed, no mock behavior changed. Confirmed behaviorally rather than just by reading the diff: `go build ./...` is clean with the regenerated mocks in place, and `go test ./internal/consensus/... -count=1` is green (one run hit the already-known-flaky TestByzantinePrevoteEquivocation from this task's original brief; a second run was clean, consistent with that test's known ~18% flake rate and unrelated to this change). Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_019gAC8rAzQagn5sgDxUJNjj * test(rpc): close idle client connections in TestMaxOpenConnections Go 1.27 changed HTTP/1 Response.Body.Close() to automatically drain any unread content, up to a conservative limit, to allow the underlying connection to be reused (see the "net/http" section of the Go 1.27 release notes). TestMaxOpenConnections never reads its response bodies before closing them, so under Go 1.27 the requests it makes leave healthy, idle keep-alive connections sitting in the client's pool instead of being closed outright as they were under Go 1.26. Those idle connections keep the corresponding server-side handler goroutines parked in a read wait, which the leaktest check registered at the top of the test flags as leaked: leaktest: leaked goroutine: ... [IO wait]: ... net/http.(*conn).serve ... created by net/http.(*Server).Serve This is not a defect in the server's shutdown path, and reading the response body before closing it does not fix it — 1.27 already drains it for you, which is the entire behavior change; an explicit drain reaches the identical end state (healthy, pooled connection, server goroutine still parked). Confirmed by testing it directly: draining the body explicitly still leaks 100% of the time under go1.27.1. Fixed by sharing one Client across the request goroutines (http.Client is safe for concurrent use) and calling its CloseIdleConnections after they've all completed, before the leaktest check fires. This does not change what the test measures: instrumented it locally to confirm peak concurrent open connections still reaches exactly `max` with the shared client, matching the per-goroutine-client version — concurrent in-flight requests still each need their own connection regardless of pooling, since pooling only affects connections after they go idle. Verified at both go1.26.6 and go1.27.1 (5 consecutive runs each, clean at both, plus one run with -race): this fix is a general test correctness improvement, not conditional on either toolchain, which is why it lands ahead of the Go 1.27.1 bump in this branch rather than after it. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_019gAC8rAzQagn5sgDxUJNjj * test(rpc): assert on our own error family, not stdlib phrasing TestRPCParams and TestParseURI/Decode asserted on the stdlib's exact wording for a malformed json.Number ("invalid number literal" / "invalid number"). That wording changed between Go versions — under Go 1.27 it reads "cannot unmarshal string ... into Go value of type json.Number: invalid syntax" instead — which breaks the assertion even though the actual behavior (the malformed input is still rejected, with the same RPC error code) hasn't changed at all. Traced the code path rather than guessing a new substring: RPCFunc.parseParams wraps every parameter-decode failure via invalidParamsError(), which always builds an rpctypes.RPCError with Code: CodeInvalidParams and Message: CodeInvalidParams.String() — our own constant, literally "Invalid params", unconditionally. Only RPCError.Data ever carries the wrapped stdlib error text. Asserting on "Invalid params" instead of the stdlib phrase pins our own contract (this rejection landed in the invalid-params family) rather than a description we don't own and that a future Go release is free to reword again. This is also a stronger assertion than the one it replaces: the old substring match could not distinguish an invalid-params rejection from any other error that happened to contain the same words, whereas the new one names the specific error family. Checked for the same pattern elsewhere before touching only these two sites: types/genesis_test.go:164 pins a different stdlib JSON error string ("cannot unmarshal string into Go struct field ... of type int64"), but that's the struct-field type-mismatch error class, not the json.Number-literal class this Go release changed, and it already passes clean under go1.27.1 (16/16 subtests) — confirmed by running it, not assumed. Two sites, not a repo-wide problem. Verified at both go1.26.6 and go1.27.1 (all TestRPCParams and TestParseURI subtests green at both, full package test suite green at go1.26.6): version-neutral, so this lands ahead of the Go 1.27.1 bump rather than after it. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_019gAC8rAzQagn5sgDxUJNjj * chore(deps): bump Go to 1.27.1 Follow-on to the previous two commits: with golangci-lint on v2.13 (previous commit), it is safe to move the pinned Go toolchain past 1.26.6 to 1.27.1. This is a minor-version bump, not a patch bump — Go 1.26.6 -> 1.27.1 crosses a Go release boundary, so the "no language/API changes" claim that held for the 1.26.5 -> 1.26.6 patch swap does not carry here and was verified fresh rather than assumed. Verified for the full three-commit stack (this commit on top of the golangci-lint v2.13 bump on top of the Go 1.26.6 cherry-pick): - go build ./... clean. - go vet ./... reports the same 4 findings, byte-for-byte, before and after this commit (3x fmt.Errorf %q in test/e2e/pkg/testnet.go, 1x IPv6 address format in dash/quorum/nodeid_resolver.go) — all pre-existing and unrelated to this change. No new vet strictness under Go 1.27. - govulncheck ./... reports the same finding sets before and after: 0 stdlib vulnerabilities affecting our code, and the same 4 dependency-only findings our code doesn't call (GO-2026-6355, GO-2026-6354, GO-2026-6303, GO-2026-5932) on both sides. - golangci-lint v2.13.2 (what the v2.13 selector resolves to) with --new-from-rev=origin/v1.7-dev: 0 issues, no panic. - go test ./internal/consensus/... -count=1, twice: both green (61.1s, 69.0s) on the final three-commit stack. - GOTOOLCHAIN=auto correctly resolves and downloads go1.27.1 from this module's go.mod, confirmed via `go version` run from inside the module. What moved, reported rather than fixed: - golangci-lint's gofmt formatter (.golangci.yml formatters.enable) flags one pre-existing, untouched file — internal/rpc/core/ mempool.go:149 — as differently formatted under Go 1.27.1's bundled gofmt than under 1.26.6's (a multi-value return with a composite literal inside a select/case reindents differently). --new-from-rev correctly excludes it since the affected line isn't part of any diff in this branch, so no CI gate fails on it. It is an active check, not an absent one — it simply isn't triggered against a line this branch touches. Left unformatted: out of scope for a toolchain-pin change. - During earlier measurement (not the two required runs above, both of which were clean), one go1.27.1 run of `go test ./internal/consensus/...` hit a failure in TestPoC_HeightVoteSet_UnboundedRoundAllocation (retained 308 bytes per message against a <149 threshold), not one of the two previously-known flaky tests in this package. Isolated reruns of just this test passed 5/5 under go1.27.1 and 3/3 under go1.26.6. The 1.26.6 baseline never ran this test under equivalent full-package concurrent load, so this is not a like-for-like comparison between Go versions — left unresolved and not claimed to be version-related. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_019gAC8rAzQagn5sgDxUJNjj * style: reformat mempool.go for Go 1.27's gofmt Go 1.27's gofmt reindents a multi-value return containing a composite literal inside a select/case block differently than Go 1.26's gofmt does: the composite literal body and the trailing fmt.Errorf continuation drop one level of indentation. Formatted here with the go1.27.1 toolchain's own gofmt -w -s (`go env GOROOT`'s bin/gofmt under this branch's now-pinned toolchain) — the same flags `make format`'s gofmt step uses; `-s` (simplify) produces an identical diff to plain gofmt here, so it isn't smuggling in any rewrite beyond the reindent. Ran the full-repository gofmt -l -s sweep under go1.27.1 first, using make format's own exclusions (skip *.pb.go, *pb_test.go, .git) rather than fixing only the single file golangci-lint's filtered lint run had named: internal/rpc/core/mempool.go was the only file the sweep flagged, before and after -s. Did not run the rest of `make format` (golines, goimports) since those are separate tools operating on unrelated lines (line-wrapping, import grouping) — out of scope for a pure gofmt-drift fix. This repository has no standalone gofmt gate that this drift was failing: .golangci.yml's `formatters.enable` list does include gofmt (a distinct section from `linters.enable` in golangci-lint v2's config schema — it is an active check, not an absent one), but the one finding it produced was on a line outside any diff in this branch, so `--new-from-rev` filtered it and no CI gate was failing. `make format` itself writes rather than checks, so it enforces nothing on its own either. This commit removes latent formatting drift ahead of it mattering, not a fix for a red gate. Confirmed asymmetric in both directions: after this reformat, `gofmt -l -s` is clean under go1.27.1 (this branch's pinned toolchain) but go1.26.6's gofmt now wants the same lines re-indented back the other way. Anyone building this file with a local Go 1.26.x toolchain and running gofmt/make format against it will see a diff again — expected, since the two Go versions' gofmt disagree on this construct in both directions, and this branch is pinned to 1.27.1. No logic changes: the diff is pure reindentation of already-existing lines, confirmed via `gofmt -d` before applying. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_019gAC8rAzQagn5sgDxUJNjj --------- Co-authored-by: Claude Sonnet 5 <[email protected]>
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.