chore(security): fix stdlib + x/text CVEs (Go 1.26.7, x/text 0.41.0) - #280
Merged
Conversation
The security scans on master report 14 vulnerabilities: 13 in the Go standard library and one in golang.org/x/text. All 13 stdlib findings are fixed by a toolchain no later than go1.26.6 - they cover encoding/asn1, encoding/xml, net/http, net/url, net/textproto, mime, html/template, crypto/tls, crypto/x509 and os. Two of them read as module findings (golang.org/x/net/idna and golang.org/x/net/dns/dnsmessage) but are reported against the copies vendored into the standard library; the x/net module dependency itself is already past both fixes at v0.56.0 and needs no change. Move every Go pin in the CI and release pipelines from 1.26.4 to 1.26.7, and bump golang.org/x/text from v0.38.0 to v0.41.0 (fixed in v0.39.0). Verified with govulncheck: "No vulnerabilities found" under go1.26.7 with this go.mod, against 14 findings before the change. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
dexyk
approved these changes
Aug 31, 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.
Problem
The security checks on
masterare red. The latest daily build reports 14 vulnerabilities across theCheck dependenciesandCheck dockerjobs:encoding/asn1os(os.Rootsymlink traversal)net/http(unencrypted HTTP/2 DoS)html/templateencoding/xmlnet/urlcrypto/tlsgolang.org/x/net/idnagolang.org/x/net/dns/dnsmessagegolang.org/x/textnet/textproto,mime,crypto/x509,crypto/tlsECHCause
Two independent causes:
The Go toolchain. CI and the release pipeline pin
sem-version go 1.26.4.make docker.buildcompiles the agent with that toolchain andDockerfile.self_hostedcopies the binary in, so the scanned image carries1.26.4's standard library. Every stdlib finding above is fixed by a toolchain no later thango1.26.6.golang.org/x/textat v0.38.0, fixed in v0.39.0.Worth noting for review: the two
golang.org/x/netrows are not module findings.golang.org/x/net/idnaandgolang.org/x/net/dns/dnsmessageare vendored into the Go standard library fornet/httpand DNS resolution, and that vendored copy is what is flagged. Thex/netmodule dependency is already past both fixes at v0.56.0 (they landed in v0.55.0 and v0.56.0 respectively), so it needs no change here.Fix
1.26.4to1.26.7— seven in.semaphore/semaphore.yml, one in.semaphore/release.yml.1.26.7is the latest1.26.xpatch and clears every finding with margin (the highest required is1.26.6).golang.org/x/textfrom v0.38.0 to v0.41.0.No source changes.
Verification
govulncheck -scan modulebefore and after, on this branch:go build ./...,go vet, and the unit tests pass.One thing I could not verify locally: that
sem-version go 1.26.7resolves on the agent image —change-go-versionlives in the VM image rather than insemaphoreci/toolbox. CI will confirm this in the first prologue command; if1.26.7is not yet available there,1.26.6is the minimum that still clears every finding.