Secure brew bundle npm installs#22405
Open
MikeMcQuaid wants to merge 1 commit into
Open
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR hardens brew bundle’s npm package installation path by reusing Homebrew’s existing Node install-argument helper, aligning Bundle’s npm behavior with the more security-focused defaults used elsewhere in the codebase.
Changes:
- Use
Language::Node.local_npm_install_argswhen runningnpm install -gfrom the Bundle npm extension. - Update the Bundle npm spec to reflect the new command argument shape and prevent silent drift.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| Library/Homebrew/bundle/extensions/npm.rb | Switch npm installs to use Language::Node.local_npm_install_args for hardened defaults. |
| Library/Homebrew/test/bundle/npm_spec.rb | Adjust expected npm install invocation to include the shared Node install args. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Share only the npm security args so `brew bundle` gets the cooldown and script blocking that protect formula installs. - Keep formula-only npm defaults out of Bundle because verbose npm output can add unnecessary buffering cost on successful installs. - Cover the concrete Bundle argv so the hardened flags cannot drift behind helper changes without a focused failure.
293a4b1 to
10f5833
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Language::Node.local_npm_install_argssobrew bundlenpm installs get the same cooldown and script blocking used by formulae.brew lgtm(style, typechecking and tests) with your changes locally?OpenAI Codex 5.5 xhigh with local review and testing.