ci(govulncheck): build with module toolchain; bump go1.26.3; harden wrapper#370
Merged
Conversation
…rapper govulncheck type-checks targets with the go/types of the toolchain it was built with. `go install govulncheck@latest` built it with an older Go than the `go 1.26` directive, so it emitted "requires newer Go version" and scanned nothing — which the JSON wrapper silently passed as "no vulnerabilities found". - Install govulncheck with the module's own toolchain (read from go.mod) and pin to @v1.3.0 for reproducibility. - Bump toolchain go1.26.2 -> go1.26.3: fixes reachable stdlib vulns GO-2026-4971 (net Dial/LookupPort panic) and GO-2026-4918 (HTTP/2 loop). - Harden the wrapper to fail loudly when govulncheck cannot analyze (non-zero exit, missing config message, or load-error output) instead of silently passing as no vulnerabilities. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
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
govulnchecktype-checks targets with thego/typesof the toolchain it was built with. CI'sgo install govulncheck@latestbuilt it with an older Go than thego 1.26directive, so it reportedrequires newer Go versionand analyzed nothing — and the JSON wrapper silently exited 0 ("no vulnerabilities found"), masking it.Fix
GOTOOLCHAINread from go.mod, self-syncing) and pin@v1.3.0.toolchain go1.26.2 → go1.26.3— resolves genuine reachable stdlib vulns GO-2026-4971 (net Dial/LookupPort panic) and GO-2026-4918 (HTTP/2 transport infinite loop).configmessage, or load-error output) instead of false-greening.Verification
Ran the exact CI wrapper at go1.26.3:
govulncheck: suppressed 2 daemon false-positive(s): ['GO-2026-4883', 'GO-2026-4887'], exit 0. Hardened wrapper tested against clean / real-vuln / broken / benign-toolchain-download cases.🤖 Generated with Claude Code