8000 SLSA3 provenance for release binaries via the SLSA Go builder · Issue #27 · dominikzorgnotti/esx-hcl-check · GitHub
[go: up one dir, main page]

Skip to content

SLSA3 provenance for release binaries via the SLSA Go builder #27

Closed

Description

@dominikzorgnotti

Summary

Release binaries are currently built in a plain GitHub Actions job with no provenance — a consumer cannot cryptographically tie a downloaded binary back to this repo and the exact commit/tag it was built from. Switch the release build to the SLSA3 Go builder so every artifact ships with signed, verifiable build provenance.

Prerequisite (repo convention change)

The SLSA Go builder compiles inside a trusted, isolated builder and cannot run our current go mod init && go mod tidy step. Therefore commit go.mod and go.sum (also required for reproducible builds). The CI workflow is updated to stop generating them.

Plan

  • Commit go.mod / go.sum (module esx-hcl-check, govmomi v0.55.0); relax the go directive to go 1.26.
  • Add per-target .slsa-goreleaser/<os>-<arch>.yml config files (linux/amd64, windows/amd64, darwin/arm64) with -trimpath, CGO_ENABLED=0, and version ldflags via {{ .Env.VERSION/COMMIT/DATE }}.
  • Rewrite .github/workflows/goreleaser.yml to call slsa-framework/slsa-github-generator/.github/workflows/builder_go_slsa3.yml@v2.1.0 from a matrix, passing evaluated-envs and upload-tag-name; grant id-token: write, contents: write, actions: read.
  • Update .github/workflows/go.yml to use go-version-file: go.mod and drop the go mod init/tidy step.
  • README: document verifying artifacts with slsa-verifier, and simplify the build instructions (no more go mod init).

Acceptance criteria

  • A release produces, per platform, the stamped binary and a signed provenance attestation (*.intoto.jsonl).
  • The binary still reports the tag via -version.
  • CI (build + -race tests) still passes off the committed go.mod.
  • Provenance verifies with slsa-verifier verify-artifact --source-uri github.com/dominikzorgnotti/esx-hcl-check.

Risk

  • Reusable-workflow wiring can't be dry-run locally; the first v0.4.1 release exercises it. Config path / evaluated-envs format / permissions are the likely first-run failure points — mitigated by following the official v2.1.0 reference.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      0