Skip to content

feat(release): add supply chain verification to Homebrew formula#342

Merged
lockwobr merged 1 commit intomainfrom
feat/brew-attestation-install
Mar 11, 2026
Merged

feat(release): add supply chain verification to Homebrew formula#342
lockwobr merged 1 commit intomainfrom
feat/brew-attestation-install

Conversation

@lockwobr
Copy link
Copy Markdown
Contributor

Summary

  • Homebrew formula now installs from tar archives (not bare binaries), placing the Sigstore attestation bundle next to the binary in bin/ so aicr can find it at <binary>-attestation.sigstore.json
  • Optional cosign verification on install — if cosign is present, the formula verifies binary provenance against the SLSA attestation bundle before completing
  • Runs aicr trust update post-install to fetch the latest Sigstore trusted root (fails gracefully with a warning if sandboxed or offline)
  • Added syft to dev tooling.settings.yaml, setup-tools, and check-tools now include syft (SBOM generator required by goreleaser)
  • Bumped tilt from 0.36.3 to 0.37.0

Changed Files

File Change
.goreleaser.yaml Added install and post_install blocks to brews section
.settings.yaml Added syft: v1.42.2, bumped tilt: 0.37.0
tools/setup-tools Added syft install (brew on macOS, binary on Linux)
tools/check-tools Added syft version detection metadata

How It Works

# 1. Install binary and attestation bundle next to it
bin.install "aicr"
bin.install "aicr-attestation.sigstore.json"

# 2. Verify provenance if cosign is available
if File.exist?(bin/"aicr-attestation.sigstore.json") && which("cosign")
  system "cosign", "verify-blob-attestation", ...
end

# 3. Update Sigstore trusted root (graceful fallback)
system(bin/"aicr", "trust", "update") rescue opoo("...")

Type of Change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update
  • Refactoring (no functional changes)
  • Build/CI/tooling

Testing

Local testing, but might require a some round of testing in CI yet.

  • goreleaser release --snapshot --clean --skip=publish generates correct formula
  • ruby -c dist/homebrew/Formula/aicr.rb passes syntax check
  • Local tap install succeeds (brew install local/aicr/aicr)
  • Post-install trust update fails gracefully in Homebrew sandbox
  • Attestation bundle skipped correctly when not present (snapshot builds)
  • make tools-check shows syft with correct version
  • Verified syft Linux download URLs return 302 (amd64 + arm64)
  • Tested setup-tools on Linux — syft installs correctly with updated .settings.yaml
  • TODO: Full release build verifies cosign attestation path (requires CI tag build)

Risk Assessment

  • Low — Isolated change, well-tested, easy to revert
  • Medium — Touches multiple components or has broader impact
  • High — Breaking change, affects critical paths, or complex rollout

Rollout notes:

Checklist

  • Tests pass locally (make test with -race)
  • Linter passes (make lint)
  • I did not skip/disable tests to make CI green
  • I added/updated tests for new functionality
  • I updated docs if user-facing behavior changed
  • Changes follow existing patterns in the codebase
  • Commits are cryptographically signed (git commit -S) — GPG signing info

@lockwobr lockwobr self-assigned this Mar 11, 2026
@lockwobr lockwobr requested review from a team as code owners March 11, 2026 18:22
@github-actions
Copy link
Copy Markdown

Coverage Report ✅

Metric Value
Coverage 73.2%
Threshold 70%
Status Pass
Coverage Badge
![Coverage](https://img.shields.io/badge/coverage-73.2%25-green)

No Go source files changed in this PR.

@lockwobr lockwobr merged commit 0dd3c29 into main Mar 11, 2026
15 checks passed
@lockwobr lockwobr deleted the feat/brew-attestation-install branch March 11, 2026 18:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants