Skip to content

Harden Homebrew update workflow - #327

Draft
toku345 wants to merge 2 commits into
mainfrom
agent/harden-homebrew-update-policy
Draft

Harden Homebrew update workflow#327
toku345 wants to merge 2 commits into
mainfrom
agent/harden-homebrew-update-policy

Conversation

@toku345

@toku345 toku345 commented Aug 8, 2026

Copy link
Copy Markdown
Owner

Summary

  • centralize the Homebrew update policy in ~/.homebrew/brew.env
  • keep bootstrap behavior explicit while removing duplicated shell exports
  • add stable-tag and Bottle attestation controls with regression coverage
  • document the named-package update, Cask, tap, recovery, and developer-mode workflows

Why

The existing shell-scoped controls reduced implicit upgrades, but non-interactive Homebrew invocations could bypass them and Homebrew itself was tracking the rolling main branch. This change establishes a single user-level policy and adds a reviewable update runbook.

Impact

Homebrew now loads six managed controls for interactive and non-interactive invocations using the managed home. Routine updates remain named and reviewed, Casks without checksums are rejected, and homebrew/core Bottle attestations are verified through authenticated GitHub CLI access. The bootstrap intentionally defers attestation until the managed environment and authentication are available.

No Formula or Cask upgrades are included in this change.

Validation

  • bats tests/bats/ — 194 tests passed
  • bats tests/bats/test_update_policy_env.bats — 8 tests passed
  • ShellCheck passed (informational SC2016 messages only)
  • Bash, POSIX shell, and Fish syntax checks passed
  • git diff --check origin/main...HEAD passed
  • targeted chezmoi apply and post-apply diff checks passed
  • Homebrew 6.0.15 stable confirmed with developer mode disabled
  • brew verify ripgrep reported a valid attestation

toku345 and others added 2 commits August 8, 2026 18:46
Co-authored-by: Codex <noreply@openai.com>
Co-authored-by: Codex <noreply@openai.com>
@toku345 toku345 self-assigned this Aug 8, 2026
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