Repository navigation
fix(deps): bump vulnerable Go modules and pin workflow actions to SHAs - #12
Merged
Merged
Conversation
Bump klauspost/compress 1.17.4 -> 1.20.4, andybalholm/brotli 1.0.6 -> 1.2.8, golang.org/x/crypto 0.57.0 -> 0.59.0 and golang.org/x/net 0.60.0 -> 0.62.0 to clear known advisories. go mod tidy also raises x/sync, x/sys and x/text and marks go.etcd.io/bbolt as a direct requirement (it is already imported directly). Pin every GitHub Actions `uses:` to a full commit SHA with a version comment. Replace tj-actions/changed-files in pr-path-guard with a plain git diff step.
…ompress upgrades TestCaptureRequestInfoDoesNotDecodeASingleSegmentBomb relied on the encoder's default window, which klauspost/compress lowered to 8 MiB in 1.20.x. That is exactly the decoder's window cap, so the frame was decoded up to the capture bound instead of being left raw. Set the window to the content size so the encoder emits a single-segment frame on every release. Production code is unchanged.
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
Fixes the vulnerable Go modules reported by osv-scanner on
main, and pins every GitHub Actionsuses:to a full commit SHA. Supersedes dependabot PR #10 (its compress 1.18.7 fixes GO-2026-5841 but not GO-2026-6865, which needs 1.20.2).Advisories fixed
github.com/klauspost/compressgithub.com/andybalholm/brotligolang.org/x/cryptogolang.org/x/netcompress(zstd) andbrotliare imported directly for response decoding, so they stay and are bumped. Each bump is the latest patch in the line that contains the fix;x/cryptouses the tagged release 0.59.0, which is newer than the fixing pseudo-version.Transitive bumps (from
go mod tidy/ MVS)golang.org/x/sync0.23.0 -> 0.25.0golang.org/x/sys0.48.0 -> 0.50.0golang.org/x/text0.42.0 -> 0.44.0go.sum also gains
golang.org/x/term0.46.0 → 0.48.0 (required by x/crypto 0.59.0) and a sum-only entry forgithub.com/xyproto/randomstringv1.0.5 (used only by brotli's own tests; not in go.mod or the binary). No other modules changed.Behavior note (brotli 1.2.x): the decoder now returns
io.ErrUnexpectedEOFfor abrstream that ends before its final block (previously a clean EOF) and is stricter about trailing data. Well-formed responses decode exactly as before; truncated or emptybrbodies now surface as decode errors, matching the existing gzip path.Dependency removal: none removed, all in use
go mod why -mreports every direct require as needed. Single-importer requires were checked for a stdlib replacement and kept:golang.org/x/text/currency:ParseISOvalidates against the full ISO 4217 table.joho/godotenv:.envquoting and expansion rules.skratchdot/open-golang: per-OS browser launchers.pierrec/xxHash: xxHash64 has no stdlib equivalent.natefinch/lumberjack,atotto/clipboard,x/oauth2,pion/ice,jackc/pgx: real functionality with no stdlib equivalent.go.etcd.io/bboltmoves from// indirectto a plain require. This is not a new dependency:internal/kvstorealready imports it directly, andgo mod tidyon currentmainmakes the same change. Real direct imports are unchanged.Workflow actions pinned
All 35
uses:lines across the 6 workflows now use a 40-char SHA with a trailing version comment. The major version of each action is unchanged.actions/checkoutactions/setup-goactions/github-scriptactions/cacheactions/upload-artifactactions/download-artifactdocker/setup-buildx-actiondocker/login-actiondocker/build-push-actiontj-actions/changed-filesis removed rather than pinned (it was compromised in March 2025).pr-path-guard.ymlnow runsgit diff --name-only --no-renames "$BASE...$HEAD" -- internal/translator/and writes the sameany_changedstep output, so the failing step behaves as before. The SHAs are passed throughenv:, not interpolated into the script. I checked the logic on a commit range that touchesinternal/translator(reports changed) and one that does not (reports unchanged).Test fixture fix (second commit)
Running the full test suite locally found one regression caused by the
klauspost/compressbump, which CI does not catch because the PR build only compiles:TestCaptureRequestInfoDoesNotDecodeASingleSegmentBombpasses onmainand failed here withcaptured 33554470 restored 2062.zstd.WithWindowSize(64<<20)so the encoder emits a real single-segment frame (SingleSegment=true) on every release. Checked on both 1.17.4 and 1.20.4, and the test fails again if the window cap is raised above 64 MiB, so it still guards the behavior.Verification
go mod tidy -diff: no diff.go vet ./...: clean.go build ./cmd/server: ok.go test ./...: 106 packages ok, 28 without test files, 1 failing:internal/discoveryTestAdvertiserAndBrowser_Integration(live mDNS multicast discovery). It fails identically on unmodifiedmainin the same environment, so it is not caused by this PR.gofmt -l .lists two files,internal/runtime/executor/claude_thinking_replay_test.goandinternal/runtime/executor/codex_stream_bootstrap_buffering_test.go. Both are byte-identical tomain, which fails the same way; left untouched.scan source -r, 40 manifests including the rootgo.mod): No issues found.