Skip to content

Route CI gem installs through a scanning registry mirror - #378

Merged
DecIntercom merged 1 commit into
masterfrom
socket-firewall-registry-rubygems
Aug 5, 2026
Merged

Route CI gem installs through a scanning registry mirror#378
DecIntercom merged 1 commit into
masterfrom
socket-firewall-registry-rubygems

Conversation

@DecIntercom

Copy link
Copy Markdown
Contributor

Why?

CI installed gems over plaintext HTTP with no install-time scanning of build dependencies. This gem is published publicly, so an unscanned build dependency would sit upstream of a package others consume.

How?

Routes Bundler through a scanning registry mirror, with the credential supplied by CI rather than committed, and switches the Gemfile source to HTTPS. The build fails if the mirror is not active.

Notes for reviewers

The HTTPS change is load-bearing, not cosmetic. Bundler matches mirrors by exact source URI including scheme, so a mirror for https://rubygems.org would never apply to a Gemfile declaring http://rubygems.org.

Forked pull requests do not receive CI credentials, so those builds log that they are unrouted and continue rather than failing an outside contributor.

Generated with Claude Code

`bundle install` resolved straight from rubygems.org over plaintext HTTP,
with no install-time scanning of build dependencies.

Two changes are needed, not one:

- Point Bundler's rubygems.org mirror at the scanning registry, with the
  credential supplied by CI rather than committed.
- Switch the Gemfile source to https. Bundler matches mirrors by exact
  source URI including scheme, so a `mirror.https://rubygems.org` setting
  does not apply to a Gemfile declaring `http://rubygems.org` — the mirror
  would have been configured but never used.

The step fails the build if the mirror is not active. Forked pull requests
are the exception: CI does not share credentials with forks, so those builds
log that they are unrouted and continue rather than failing a contributor.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@DecIntercom
DecIntercom enabled auto-merge (squash) August 5, 2026 14:01
@DecIntercom
DecIntercom merged commit 6b0e38b into master Aug 5, 2026
4 checks passed
@DecIntercom
DecIntercom deleted the socket-firewall-registry-rubygems branch August 5, 2026 14:02
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.

2 participants