fix(deps): patch goldmark xss and x/mod sumdb advisories - #455
Merged
Conversation
Clears the three fixable Go advisories GitHub code scanning flags:
- GO-2026-5320 (error): XSS in github.com/yuin/goldmark. The only one
where our code actually reaches the vulnerable symbols - goldmark's
html renderer arrives via tuikit/views -> glamour. Fixed in 1.7.17;
we were on 1.7.13.
- GO-2026-6179 / GO-2026-6180 (note): tlog tile verification bypass
and unauthenticated hash handling in golang.org/x/mod/sumdb. Fixed
in 0.40.0; we were on 0.37.0. Not called by our code.
x/crypto, x/net, x/text, and x/tools move as a consequence of the
x/mod bump.
Verified with govulncheck: goldmark, x/mod, and x/crypto no longer
appear in the called or required sets. Lint reports 0 issues; unit and
e2e suites pass.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012mnVfKRbSbYV43gdjcdxdX
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
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
GitHub flags 7 open security alerts across Dependabot and code scanning. This PR fixes the three that are genuinely fixable. The other four are covered below with reasoning — two are false positives, one has no fix path, and one has no fix at all.
Fixed
github.com/yuin/goldmarkgolang.org/x/modgolang.org/x/modGO-2026-5320 is the one that matters. It's the only alert where our code actually reaches the vulnerable symbols —
Renderer.renderAutoLink,renderImage,renderLinkingoldmark/renderer/html. The path iscmd/internal → tuikit/views → glamour → goldmark, so it's transitive through our own TUI stack rather than something we import directly.The two
x/modadvisories are sumdb integrity issues (tlog tile verification bypass; unauthenticated hash handling inLookup). Not called by our code.x/crypto,x/net,x/text, andx/toolsmove as a consequence of thex/modbump.Not fixed, with reasons
GO-2026-5932 —
golang.org/x/crypto/openpgpunmaintained (note). This advisory hasintroduced: 0and no fixed version — it announces that the package is unmaintained and unsafe by design. No bump can ever clear it; the only resolution is dropping the openpgp dependency, which arrives transitively. Our code doesn't call it. Bumping x/crypto to 0.55.0 here does not and cannot close this alert.Dependabot #116 —
viteserver.fs.denybypass on Windows (high). No supported fix path exists today:vitepress@1.6.4is the latest stable and hard-requiresvite ^5.4.14.2.0.0-alpha.19).Forcing vite 6 via
overrideswould pair vitepress 1.x with a vite major it doesn't support. I'd rather not do that silently one PR after the docs redesign (#453). Actual exposure is also low: it's a dev-server path-traversal on Windows, and the docs ship as a static build to Cloudflare Pages — the dev server never runs in production.Code scanning #99 and #100 —
go/allocation-size-overflow(high). Both are false positives:These are
len()of an in-memory map sized from the process's own environment and log fields. Overflowing would need a map with more thanmaxInt/2entries. Adding bounds checks here would be defensive noise against an unreachable condition, so I've left the code alone. These are better resolved by dismissing the alerts as false positives — happy to do that if you agree, but it changes repo security state so I didn't do it unilaterally.Testing
govulncheck—goldmark,x/mod, andx/cryptono longer appear anywhere in the called or required sets. (Rebuilt govulncheck first; the installed one was compiled with go1.24 and couldn't parse the tree.)flow lint— 0 issues.flow test unit— pass.flow test e2e— pass.go build ./...clean.The remaining 20 govulncheck findings are all standard library, from my local go1.26.0 toolchain and fixed in go1.26.1. They aren't repo issues and aren't what GitHub flagged — CI builds on
1.25.x.Note on the go directive
go.moddeclaresgo 1.25.8. GO-2026-6179/6180 also list the toolchain as affected, fixed in 1.25.13. Raising the directive would guarantee contributors build with a patched sumdb verifier, but it raises the minimum toolchain for everyone, so I've left it as a separate call for you.🤖 Generated with Claude Code
https://claude.ai/code/session_012mnVfKRbSbYV43gdjcdxdX