Repository navigation
build(deps): Bump golang.org/x/sync from 0.22.0 to 0.23.0 - #1444
Conversation
🔒 Dependency Security Audit —
|
| Package | golang.org/x/sync (direct, production) |
| Versions | v0.22.0 → v0.23.0 (semver-minor) |
| Files touched | go.mod, go.sum only — no source, no vendor/ |
| Upstream commits | 2 |
The go.mod diff reports 329 changed lines, which is alarming at a glance and is exactly where a second, unannounced change would be smuggled in. I did not trust the textual diff. I extracted and sorted the full module@version set from both revisions and compared them:
346c346
< golang.org/x/sync v0.22.0
---
> golang.org/x/sync v0.23.0
One line. 362 modules before, 362 after. // indirect markers: identical. replace directives: identical. go directive: unchanged at 1.27.1. go.sum: exactly 4 lines, all golang.org/x/sync. The remaining churn is a pure go mod tidy require-block reshuffle with zero semantic content.
Why the churn appeared at all (verified against history, since an unexplained diff shape is itself a finding): the previous bump of this very package, c4063ef0b (x/sync 0.21.0→0.22.0), was go.mod | 2 +-, go.sum | 4 ++-- — 3 insertions, 3 deletions. This PR is the first Dependabot run after 4cc364e6a (chore(deps): bump Go to 1.27.1, #1438), and the newer toolchain recomputes the module graph and re-partitions the require blocks on go mod tidy. The churn is a one-off toolchain artifact, not authored content — consistent with, and fully explained by, the one-line module-set delta above.
CONTRIBUTING.md:78-81 asks contributors to "only update the particular dependencies you need", while explicitly permitting a go mod tidy fallback — so this is not a policy violation, but it does bury a one-line change in ~330 lines of noise. Worth knowing for the next reviewer who sees a 329-line "dependency bump" and has to decide whether to trust it.
2. Supply-chain integrity — verified, not assumed
| Check | Result |
|---|---|
go.sum hashes vs. signed sum.golang.org transparency log |
✅ Exact match, both h1: and /go.mod |
| Module origin | go.googlesource.com/sync, refs/tags/v0.23.0 → f75267d8412fc1dfd12b343644a7ea46e4d9c85d |
| Tag integrity (moved-tag attack) | ✅ Independently cloned upstream; v0.23.0 resolves to f75267d…, identical to the hash the proxy recorded at publish time |
| Publish date | 2026-08-31 |
A moved or re-pointed tag is the standard shape of a tampered release. It is not present here.
3. Diff integrity — the actual upstream change
Two commits, and the full diff is 3 files:
go.mod | 2 +- (go directive 1.25.0 → 1.26.0)
semaphore/semaphore.go | 9 +++---
semaphore/semaphore_test.go | 22 ++++++-
The only functional change, in its entirety:
func NewWeighted(n int64) *Weighted {
- w := &Weighted{size: n}
- return w
+ if n < 0 {
+ panic("semaphore: size < 0")
+ }
+ return &Weighted{size: n}
}semaphore: panic on negative capacity (upstream golang/go#80183) — rejects a nonsensical construction that previously produced a semaphore no acquisition could ever satisfy.
- No install/build/lifecycle hooks — not applicable to Go modules, and none introduced.
- No new network calls, no new env/credential reads, no obfuscated or encoded content.
- Diff shape matches the stated change type. Nothing undocumented.
- Provenance: authored by an outside contributor (
racequite), but landed through Gerrit withReviewed-byfrom two Go team maintainers (Alan Donovan, David Chase) and green LUCI TryBot results. The change is four lines and I read every one of them.
4. Known vulnerabilities
| Source | Result |
|---|---|
OSV.dev (golang.org/x/sync, Go ecosystem) |
{} — no advisories, any version |
| GitHub Advisory Database | None |
govulncheck (CI check on this PR) |
✅ SUCCESS |
golang.org/x/sync has no CVE history. Nothing to cross-reference.
5. Impact on this codebase — the part that actually matters
The concern worth raising for a consensus-critical node is not a CVE; it is a behavioural regression in goroutine coordination causing a deadlock or liveness fault. I checked it directly, and the answer is conclusive:
tenderdashimports onlygolang.org/x/sync/errgroup, in three files:internal/inspect/inspect.go:103—errgroup.WithContextinternal/mempool/mempool.go:789—errgroup.Group+SetLimit(2 * runtime.NumCPU())scripts/keymigrate/migrate.go:637—errgroup.Group
errgroup/andsingleflight/are byte-identical between v0.22.0 and v0.23.0 (git diff --name-only v0.22.0..v0.23.0 -- errgroup/ singleflight/→ empty).errgroupdoes not importsemaphore; it coordinates via achan token. Its only imports arecontext,fmt,sync.golang.org/x/sync/semaphore— the sole package that changed — is not imported anywhere in this repository.
Therefore the x/sync machine code linked into a tenderdash binary is unchanged by this PR. There is no consensus, mempool, or inspect-server behaviour that this bump can alter. The new panic is unreachable: it lives in a package this project does not compile in, and it fires only on a negative constant capacity, which no call site here supplies.
6. The failing check — e2e-test (dashcore)
15 of 16 checks pass, including govulncheck, golangci-lint, Build, and all six unit-test shards. The one failure:
ERROR chain stalled at height 1006 [3 of 4 nodes map[validator01:1006 validator02:1006 validator04:1006]]
(e2e-test (rotate) is CANCELLED — confirmed collateral: .github/workflows/e2e.yml:17 sets fail-fast: true over matrix.testnet: ["dashcore", "rotate"], so it was killed by the dashcore failure, not by one of its own.)
Assessment: environmental/flaky, not caused by this bump. Reasoning, in order of strength:
- Structural — decisive. Per §5, this PR changes no code that ends up in the binary under test. A bump that alters zero linked instructions cannot cause a consensus stall.
- The stall signature matches the harness's own deliberate chaos injection.
test/e2e/networks/dashcore.tomlperturbs the network on purpose:validator03hasperturb = ["kill"],validator04["pause"],validator01["disconnect"],validator02andseed01["restart"], and one node carries all three. The failure reportsvalidator03absent from the height map at 1006 — precisely the killed node. With only four active validators at that point (validator_update.0), a killedvalidator03overlapping a pausedvalidator04transiently drops the active set below the ⅔ threshold and halts the chain. That is a timing race in perturbation scheduling. - The e2e job is demonstrably fragile on unrelated Dependabot PRs. The concurrent
golang.org/x/sys 0.47.0→0.48.0bump also failse2e-test (dashcore)— though with a different signature (Go module-proxyconnection reset by peer), so I am citing this as evidence of job fragility, not as an identical fault.
validator_update.1010 rotation — under a survivable perturbation is worth its own investigation. Recommend tracking it separately; do not let a green rebase quietly retire the question.
7. Risk assessment
Overall rating: 🟢 Safe.
| Concern | Status |
|---|---|
| Malicious/tampered release | ❌ None — sumdb + tag/commit hash independently verified |
| Known CVEs/advisories | ❌ None in any version |
| Undocumented changes in diff | ❌ None |
| Behavioural risk to consensus paths | ❌ None — changed package not imported; errgroup byte-identical |
| Breaking change for this repo | ❌ None |
ℹ️ Informational only: upstream raised its go directive to 1.26.0, so x/sync v0.23.0 no longer builds on Go < 1.26. This repo is on go 1.27.1 with GOTOOLCHAIN=local on 1.27.1 in CI, so there is no impact — noted for anyone maintaining an older build environment.
8. Recommendations
- Do not merge while
e2e-test (dashcore)is red. I have requested@dependabot rebaseto re-run against current base and clear the flake. - If the rebase comes back green, this is a clean merge on the security axis.
- If it fails again with the same
chain stalledsignature, stop treating it as flake and open an issue for the perturbation/liveness race — the bump is still exonerated by §5, but the harness would be telling you something real. - Consider grouping
golang.org/x/*Dependabot bumps..github/dependabot.ymlhas nogroups:key on thegomodecosystem, sox/net,x/crypto,x/sys,x/syncandx/termeach open a separate PR and each pays the full e2e chaos-suite lottery independently — which is precisely how flakes come to look like signal. Agroups: golang-x-deps: patterns: ["golang.org/x/*"]entry would collapse them into one PR per cycle.
Findings tally: 🍬 0 vulnerabilities · 0 supply-chain anomalies · 2 informational (Go toolchain floor; go.mod churn provenance) · 2 pre-existing items flagged for separate tracking (e2e liveness stall; Dependabot x/* grouping).
Verified twice. The dependency is clean; the red check is the harness, not the code.
🤖 Co-authored by Claudius the Magnificent AI Agent
Appendix — independent execution-level verification
The above was re-verified by a second reviewer executing against the same head, rather than reasoning from the diff. Two results worth recording:
A. go mod why golang.org/x/sync/semaphore reports a path — and it is a false alarm. The path runs github.com/dashpay/tenderdash/tools → bufbuild/buf → … , but tools/tools.go is gated behind //go:build tools (the standard dev-tool-pinning idiom that blank-imports buf, golangci-lint, mockery). It is never compiled into a shipped binary. Under default build tags, go list -deps ./... enumerates 855 packages with zero matches for sync/semaphore. Anyone re-auditing this should use go list -deps, not go mod why, or they will chase a ghost.
B. The committed manifests are exactly reproducible. go mod tidy at this head produces zero diff against the committed go.mod/go.sum, and go mod verify reports "all modules verified" (module cache fetched fresh this session, not stale). This independently confirms §1: the 329-line reshuffle is precisely what Go 1.27.1's tidy emits — there is nothing hand-authored hiding in it.
Also executed clean at this head: go build ./..., go vet on all three errgroup consumers, and go test ./internal/mempool/... ./scripts/keymigrate/... (both ok). Additionally confirmed that errgroup.SetLimit does not panic on negative input in any case (negative means "unlimited"), and that runtime.NumCPU() is spec-guaranteed ≥ 1 — so the call sites could not reach a negative-capacity path even if semaphore were linked in.
Conclusion unchanged: 🟢 Safe. The red check is the chaos harness, not this dependency.
|
@dependabot rebase |
|
Sorry, only users with push access can use that command. |
de1f801 to
9d1a7da
Compare
Bumps [golang.org/x/sync](https://github.com/golang/sync) from 0.22.0 to 0.23.0. - [Commits](golang/sync@v0.22.0...v0.23.0) --- updated-dependencies: - dependency-name: golang.org/x/sync dependency-version: 0.23.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]>
9d1a7da to
00bce1d
Compare
Bumps golang.org/x/sync from 0.22.0 to 0.23.0.
Commits
f75267dsemaphore: panic on negative capacity3ffd83call: upgrade go directive to at least 1.26.0 [generated]