Repository navigation
Require a digest on every content-addressed row of a checksummed lockfile - #10122
Merged
Merged
Conversation
…file The lockfile check accepted a content-addressed gem as soon as one of its rows had a digest, so a row without one went unchecked, while a gem whose only row lacked a digest counted as missing and was resolved again on every offline run. Treat a content-addressed row without a digest as an empty CHECKSUMS entry, so frozen mode refuses it and only a remote fetch fills it. Reported-by: Mohamed Aly (https://hackerone.com/maaly) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A digest on the platform gem's CHECKSUMS line skipped the content-addressed rows altogether, so the gem installed for the running Ruby could come from a row without one. Reported-by: Mohamed Aly (https://hackerone.com/maaly) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ksum-missing-b63f6c | Conflicts: | spec/install/gemfile/content_addressable_spec.rb | spec/support/content_addressable.rb
This was referenced Nov 24, 2026
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.
When a lockfile has a
CHECKSUMSsection, the check for a content-addressed gem passed as soon as one of itsCONTENT ADDRESSESrows had a digest, or whenever the platform gem'sCHECKSUMSline had one, so a frozenbundle installcould install the gem for the running Ruby from a row without a digest. A gem with a single row and no digest was reported as missing instead, and an offlineBundler.setupresolved again on every run for it.This treats a content-addressed row without a digest like an empty
CHECKSUMSentry. Frozen mode now refuses it, and a non-frozen install fills it only when it can fetch from the remote.As a result, a lockfile that
bundle lock --add-ruby-abiwrote against a source that does not publish checksums now stops the next frozen install, as an ordinary gem from such a source already does.Reported-by: Mohamed Aly (https://hackerone.com/maaly)
Generated with Claude Code