You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What was the end-user or developer problem that led to this PR?
Credential helpers avoid storing long-lived registry credentials, but the implementation in #8501 allowed commands from .bundle/config to run during bundle install. A malicious cloned repository could therefore execute arbitrary commands.
What is your fix for the problem, implemented in this PR?
This keeps host-specific credential helpers while requiring explicit user trust. Bundler records the host, resolved absolute path, and SHA-256 in the user's Bundler home, then verifies all three before executing the helper without a shell.
Untrusted, changed, invalid, empty, or failed helpers fall back to existing credential settings.
Thank you for working on this, but I do not plan to add a credential helper protocol to Bundler core.
#9671 made the credential store pluggable exactly so this kind of integration can live outside core. A helper becomes a small gem that registers a backend via Gem::CredentialStore.register_backend, runs its command lazily in get, and delegates hosts it does not handle to Gem::CredentialStore.default_backend. Installing that gem is the explicit trust decision, so the trust file, digest pinning, and the new bundle credential subcommand become unnecessary, and none of that verification machinery has to be maintained in core.
I would be happy to see the CodeArtifact use case shipped as such a backend gem, and I will take API feedback on the backend interface in #9671.
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
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.
What was the end-user or developer problem that led to this PR?
Credential helpers avoid storing long-lived registry credentials, but the implementation in #8501 allowed commands from
.bundle/configto run duringbundle install. A malicious cloned repository could therefore execute arbitrary commands.What is your fix for the problem, implemented in this PR?
This keeps host-specific credential helpers while requiring explicit user trust. Bundler records the host, resolved absolute path, and SHA-256 in the user's Bundler home, then verifies all three before executing the helper without a shell.
Untrusted, changed, invalid, empty, or failed helpers fall back to existing credential settings.
Make sure the following tasks are checked