DashboardopencodeGo buildid reproducibility flag

Go buildid reproducibility flag

Category: gotcha
Confidence: 1.00
ID: 01a07fe2-8eba-7084-af29-7a20b8362672
Project ID: c0425955-02bc-4c17-9af2-b114c00077e7
Cross-project: No
Recalled in other projects: 0
Source session: 0lWzqKvhQ0x7o6ocG
Created: 2026-09-08 07:19:09
Updated: 2026-09-08 07:19:09

Content

Trap: CGO_ENABLED=0 go build -trimpath looks like the recorded reproducible build because go version -m exposes those settings, but it does not reveal that the supplied PTY binaries also omit the Go build ID. Fix: build all three with CGO_ENABLED=0 go build -trimpath -ldflags=-buildid= and record the complete command; two independent builds must match each other and the reviewed artifacts.

Move to: