Skip to content

build: strip local file paths from release binaries with -trimpath - #63

Merged
sbldevnet merged 1 commit into
mainfrom
agent/go-dev/c99659186252
Sep 28, 2026
Merged

sbldevnet merged 1 commit into
mainfrom
agent/go-dev/c99659186252

Conversation

@sbldevnet

Copy link
Copy Markdown
Owner

Summary

  • Add -trimpath to the builds[].flags in .goreleaser.yaml so release binaries don't embed the local build machine's filesystem paths.

Test plan

  • go build -trimpath -ldflags '-s -w' . succeeds
  • strings <binary> | grep <local build path> finds no matches with -trimpath (confirmed it does leak without the flag, as a sanity check)

@sbldevnet
sbldevnet merged commit 5635899 into main Sep 28, 2026
4 checks passed
@sbldevnet
sbldevnet deleted the agent/go-dev/c99659186252 branch September 28, 2026 11:20
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