Skip to content

Conversation

@MikeMcQuaid
Copy link
Member

This is handy if you're creating a brew bundle environment that makes use of Homebrew's environment filtering of secrets/tokents/etc:

/(cookie|key|token|password|passphrase)/i

While we're here, let's also add HOMEBREW_BUNDLE_CHECK and HOMEBREW_BUNDLE_NO_SECRETS environment variables.

Copilot AI review requested due to automatic review settings November 27, 2025 13:15
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds a --no-secrets switch to the brew bundle command that removes sensitive environment variables (matching /(cookie|key|token|password|passphrase)/i) before running exec, sh, or env subcommands. The PR also adds environment variable support for HOMEBREW_BUNDLE_CHECK and HOMEBREW_BUNDLE_NO_SECRETS, allowing these options to be set via environment variables instead of command-line flags.

Key changes:

  • Added --no-secrets switch with HOMEBREW_BUNDLE_NO_SECRETS environment variable support
  • Added HOMEBREW_BUNDLE_CHECK environment variable support to existing --check switch
  • Auto-generated Sorbet type signatures updated to include no_secrets? method

Reviewed changes

Copilot reviewed 1 out of 2 changed files in this pull request and generated 3 comments.

File Description
Library/Homebrew/cmd/bundle.rb Added --no-secrets and --check switch definitions with environment variable mappings, and implementation to clear sensitive environment variables when executing commands
Library/Homebrew/sorbet/rbi/dsl/homebrew/cmd/bundle.rbi Auto-generated Sorbet type signatures updated to include no_secrets? method and remove obsolete flatpak_remotes? methods
Files not reviewed (1)
  • Library/Homebrew/sorbet/rbi/dsl/homebrew/cmd/bundle.rbi: Language not supported

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

This is handy if you're creating a `brew bundle` environment that makes
use of Homebrew's environment filtering of secrets/tokents/etc:

`/(cookie|key|token|password|passphrase)/i`

While we're here, let's also add `HOMEBREW_BUNDLE_CHECK` and
`HOMEBREW_BUNDLE_NO_SECRETS` environment variables.
@MikeMcQuaid MikeMcQuaid added this pull request to the merge queue Nov 27, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Nov 27, 2025
@MikeMcQuaid MikeMcQuaid added this pull request to the merge queue Nov 27, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Nov 27, 2025
@MikeMcQuaid MikeMcQuaid added this pull request to the merge queue Nov 27, 2025
Merged via the queue into main with commit 6debce2 Nov 27, 2025
35 checks passed
@MikeMcQuaid MikeMcQuaid deleted the bundle_no_secrets branch November 27, 2025 20:00
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.

3 participants