Skip to content

Release linux/amd64 binary is dynamically linked, contradicting the "single static binary" claim #46

Closed

Description

@TMHSDigital

Why it matters

The repo description, README and site all promise a "single static Go binary". The v0.8.0 subenum-linux-amd64 release asset is actually dynamically linked against glibc (file reports dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2 ... not stripped). It will not run on Alpine/musl, in scratch/distroless images, or on older glibc hosts, which are common pentest/CI environments. Oddly the cross-compiled linux-arm64 asset is static, so behaviour differs by arch.

Evidence

  • .github/workflows/go.yml:192 — the release matrix builds with
    go build -v -buildvcs=false -ldflags "-X main.Version=..." and no CGO_ENABLED=0. The linux/amd64 leg compiles natively on ubuntu-latest, so cgo is on and net links the cgo resolver.
  • No -trimpath and no -s -w, so binaries embed local paths and debug info (larger, not reproducible).
  • -buildvcs=false strips VCS info, so go version -m subenum shows nothing useful for provenance.

Suggested approach

  • Set CGO_ENABLED: 0 in the build step env for all legs.
  • Build with -trimpath -ldflags "-s -w -X main.Version=..."; drop -buildvcs=false in CI (keep it only where .git is absent, e.g. Docker).
  • Add a CI assertion on Linux legs: file subenum-linux-* | grep -q 'statically linked'.
  • (Covered more broadly by the GoReleaser issue, but this one-line fix should ship as a patch release now.)

Done when

  • All Linux release assets report statically linked, are stripped, and CI fails if that regresses.
  • A v0.8.1 patch release replaces the dynamic binary.

Activity

  1. added
    bug
    priority: high
    ci
    area: release
    on Oct 4, 2026
  2. TMHSDigital commented on Oct 6, 2026

    @TMHSDigital
    OwnerAuthor

    Fixed in v0.9.0: the release job's "Assert static Linux binaries" step checked every linux build with file and passed (https://github.com/TMHSDigital/subenum/releases/tag/v0.9.0).

  3. added a commit that references this issue on Nov 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: releasebugcipriority: high

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions