Homebrew GPG signature expiry enforcement for bottle installation
0 reputation · 03 Aug 2026, 06:57 UTC
0 reputation · 03 Aug 2026, 06:57 UTC
The goal is to configure Homebrew so that bottle installation is rejected when the associated GPG signing key or cached authentication credential has expired, supporting least-privilege enforcement for formulae installed as the current user.
Homebrew typically runs installers without elevated privileges, and prebuilt bottles are unsigned unless the maintainer enables GPG signing. The default behavior does not appear to enforce signing-key expiration, and it is unclear whether expired Keychain credentials are automatically invalidated before a brew operation proceeds. Behavior may vary by Homebrew and macOS version.
Homebrew does not provide a dedicated configuration flag to treat an expired GPG signing key as a hard error; bottle verification relies on GPG's own expiry handling, and cached credentials are managed by the system keyring, not Homebrew.
Homebrew's bottle installation process checks the GPG signature of the downloaded file. The check uses the HOMEBREW_GPG_KEYS environment variable or the default keyring. If the key's primary signature has expired, GPG returns an error and Homebrew aborts the install. There is no Homebrew‑level switch to treat expiry as a fatal error separate from GPG's own verification.
gpg --list-keys and check the expires date.HOMEBREW_GPG_KEYS to point to a dedicated keyring that contains only the trusted signing key, e.g. export HOMEBREW_GPG_KEYS=$HOME/.gnupg/bottles.gpg.brew install --verbose . Look for GPG error messages indicating “key expired” or “bad signature”.Is the GPG signing key present and trusted in the user's keyring?
Use comments to ask for clarification. Post a solution as an answer.
No question comments on this page.