Skip to content

build(server): keep the Go symbol table in image builds (drop -s, keep -w) - #152

Merged
dvcdsys merged 1 commit into
mainfrom
chore/server-keep-symtab
Jul 19, 2026
Merged

build(server): keep the Go symbol table in image builds (drop -s, keep -w)#152
dvcdsys merged 1 commit into
mainfrom
chore/server-keep-symtab

Conversation

@dvcdsys

@dvcdsys dvcdsys commented Jul 19, 2026

Copy link
Copy Markdown
Owner

Companion to #151. That PR fixes the CLI; the server has the identical problem
and is not covered by it.

Why

Both server/Dockerfile and server/Dockerfile.cuda build with
-ldflags "-s -w". -s strips the Go symbol table, so a binary-mode
vulnerability 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

build size symbols govulncheck -mode=binary
-s -w (today) 24.0 MB 143 affected by 1 vulnerability from 1 module
-w (this PR) 25.7 MB 26 377 No vulnerabilities found

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. -w still strips DWARF, so debug
info is not shipped.

Notes

🤖 Generated with Claude Code

…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>
@dvcdsys
dvcdsys merged commit 28cf97f into main Jul 19, 2026
8 checks passed
@dvcdsys
dvcdsys deleted the chore/server-keep-symtab branch July 19, 2026 19:52
dvcdsys added a commit that referenced this pull request Jul 19, 2026
chore: carry symbol-table build fixes to develop (#151, #152)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant