Skip to content

Drop -s from the documented source build example - #42

Merged
LouisLotter merged 1 commit into
mainfrom
cve-readme-unstripped-build-example
Sep 8, 2026
Merged

Drop -s from the documented source build example#42
LouisLotter merged 1 commit into
mainfrom
cve-readme-unstripped-build-example

Conversation

@ai-collaboration-app

Copy link
Copy Markdown

Summary

The x/crypto remediation tracked by cve-reporter#57 needs no source changemain already carries golang.org/x/crypto v0.56.0, at or above the fixed version of all three reported HIGH advisories. This pull request therefore does not bump anything; it closes the one residual source inconsistency left by #37, which was raised as a review suggestion on the previous cycle.

.goreleaser.yml deliberately passes -w without -s so govulncheck -mode=binary can see which packages a published artifact actually links, and scripts/assert-go-symbols.sh fails the build when the Go symbol table is missing. README.md still demonstrated -s -w, which contradicts that policy and tells a reader to reproduce exactly the unassessable binary the guard exists to reject.

This is not hypothetical: the published v0.8.4 Windows asset embeds -ldflags="-s -w ...", so it predates the -s removal and is itself unassessable.

The -s -w uses in scripts/assert-go-symbols-test.sh are intentional negative-test fixtures and are left alone.

Context: why no dependency change is in this diff

Advisory Fixed in main (v0.56.0)
CVE-2026-56854 0.55.0 covered
CVE-2026-56855 0.56.0 covered
CVE-2026-78662 0.56.0 covered

All four scanner rows are reported against installed: v0.53.0, which is what the published v0.8.4 assets carry — not what main builds. Clearing them at the scanner requires a release above v0.8.4, which is a human decision and is tracked on the issue.

Test plan

  • go mod verify — all modules verified; go mod tidy -diff empty
  • All five .goreleaser.yml targets cross-built with release ldflags; each binary reports go1.26.6 and embeds golang.org/x/crypto v0.56.0
  • go tool nm finds runtime.main in every rebuilt artifact (documented flags now match what the guard accepts)
  • Required CI green on this head

The release pipeline deliberately keeps -w and omits -s so
govulncheck -mode=binary can see which packages a published artifact
actually links, and scripts/assert-go-symbols.sh fails the build when the
Go symbol table is missing. The README still demonstrated -s -w, which
contradicts that policy and reproduces the unassessable binaries the
guard exists to prevent.
@LouisLotter
LouisLotter merged commit 7bc3fe9 into main Sep 8, 2026
6 checks passed
@LouisLotter
LouisLotter deleted the cve-readme-unstripped-build-example branch September 8, 2026 18:38
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.

2 participants