build(cli): keep the Go symbol table in release binaries (drop -s, keep -w) - #151
Merged
Conversation
…ep -w) Stripped binaries (-s) force govulncheck -mode=binary into module-level fallback: it cannot see which packages are actually linked, so it flags every advisory on every required module — including GO-2026-5932 (x/crypto/openpgp), a package this binary does not contain at all. With the symbol table present govulncheck does real symbol-level analysis. Verified locally on the current cli/ tree: -s -w : 13.5 MB, binary scan reports "affected by 1 vulnerability" -w : 15.0 MB, binary scan reports 0 (openpgp correctly unreachable) none : 20.0 MB, binary scan reports 0 -w (DWARF stripping) stays, so the size cost is ~+11%, not +48%. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This was referenced Jul 19, 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.
Follow-up to the GO-2026-5932 discussion on #150.
Problem
CLI release builds use
-ldflags="-s -w".-sstrips the Go symbol table,which forces
govulncheck -mode=binaryinto module-level fallback: it cannotsee which packages are actually linked, so it flags every advisory on every
required module — including GO-2026-5932 (
x/crypto/openpgp), a package thisbinary does not contain at all (
x/cryptois pulled in solely forsha3viago-playground/validator).Fix
Drop
-s, keep-w(DWARF stripping) inrelease-cli.ymlandprerelease-cli.yml. With the symbol table present, binary-mode govulncheckdoes real symbol-level analysis and the false positive disappears.
Measured on the current
cli/tree (darwin-arm64):govulncheck -mode=binary-s -w(current)-w(this PR)Size cost of the fix: ~+11%.
Notes
mainfirst (release workflows run from the tag ref, and CLI tagsare cut from
main). Needs the usual carry todevelopso the floatingcli/developprerelease builds pick it up too —prerelease-cli.ymlrunswith the workflow file as it exists on
develop.server/Dockerfile*also build with-s -w, deliberately untouched: imagesare scanned by trivy/scout, which read Go buildinfo (module list), not
symbols — dropping
-sthere would buy nothing.🤖 Generated with Claude Code