build(server): keep the Go symbol table in image builds (drop -s, keep -w) - #152
Merged
Conversation
…p -w) Companion to #151, which does the same for the CLI. Both server images still build with `-ldflags "-s -w"`, so the shipped cix-server binary has no symbol table and any binary-mode vulnerability scan of the published image degrades to module-level reporting — flagging advisories for packages that are not linked at all. Measured on this binary, the same false positive #151 removes from the CLI is present here: -s -w : 24.0 MB, 143 symbols -> "affected by 1 vulnerability from 1 module" -w : 25.7 MB, 26 377 symbols -> "No vulnerabilities found" Cost is +6.8% on the binary (~1.7 MB) inside images of ~172 MB (CPU) and ~1.5 GB (CUDA), so it is noise at the image level. `-w` still drops DWARF. 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.
Companion to #151. That PR fixes the CLI; the server has the identical problem
and is not covered by it.
Why
Both
server/Dockerfileandserver/Dockerfile.cudabuild with-ldflags "-s -w".-sstrips the Go symbol table, so a binary-modevulnerability scan of the published image cannot see which packages are
actually linked and falls back to module-level reporting — flagging advisories
for code that is not in the binary. This is exactly the effect that made
GO-2026-5932 (
x/crypto/openpgp) look like a real finding on the CLI.Measured on the server binary
govulncheck -mode=binary-s -w(today)-w(this PR)Cost: +6.8% on the binary (~1.7 MB), inside images of ~172 MB (CPU) and
~1.5 GB (CUDA) — noise at the image level.
-wstill strips DWARF, so debuginfo is not shipped.
Notes
-X main.version=stamping is untouched.otherwise the CLI reports clean while the server keeps producing the same
misleading module-level hits.
🤖 Generated with Claude Code