Skip to content

Require a digest on every content-addressed row of a checksummed lockfile - #10122

Merged
hsbt merged 3 commits into
masterfrom
claude/ca-checksum-missing-b63f6c
Nov 24, 2026
Merged

hsbt merged 3 commits into
masterfrom
claude/ca-checksum-missing-b63f6c

Conversation

@hsbt

@hsbt hsbt commented Nov 24, 2026

Copy link
Copy Markdown
Member

When a lockfile has a CHECKSUMS section, the check for a content-addressed gem passed as soon as one of its CONTENT ADDRESSES rows had a digest, or whenever the platform gem's CHECKSUMS line had one, so a frozen bundle install could 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 offline Bundler.setup resolved again on every run for it.

This treats a content-addressed row without a digest like an empty CHECKSUMS entry. 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-abi wrote 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

hsbt and others added 2 commits November 24, 2026 13:06
…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>
@hsbt hsbt added bundler: bug fix skip old stable Leave out of releases on the old stable line labels Nov 24, 2026
…ksum-missing-b63f6c

| Conflicts:
|	spec/install/gemfile/content_addressable_spec.rb
|	spec/support/content_addressable.rb
@hsbt
hsbt merged commit f91319e into master Nov 24, 2026
133 of 135 checks passed
@hsbt
hsbt deleted the claude/ca-checksum-missing-b63f6c branch November 24, 2026 06:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bundler: bug fix skip old stable Leave out of releases on the old stable line

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant