Skip to content

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

Merged
DecIntercom merged 2 commits into
masterfrom
socket-firewall-registry-rubygems
Aug 5, 2026
Merged

Route CI gem installs through a scanning registry mirror#625
DecIntercom merged 2 commits 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

DecIntercom and others added 2 commits August 5, 2026 14:38
`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>
Bumping to 2.1 to share the mirror step across the three jobs errored the
pipeline: 2.1 validates job names against ^[A-Za-z][A-Za-z\s\d_-]*$ and the
existing names contain dots ("Test against Ruby 2.4").

Renaming them would change the status check names, so the step is repeated
per job on version 2 instead. Slightly more duplication, no behaviour change.
@DecIntercom
DecIntercom enabled auto-merge (squash) August 5, 2026 14:47
@DecIntercom
DecIntercom merged commit acb7deb into master Aug 5, 2026
6 checks passed
@DecIntercom
DecIntercom deleted the socket-firewall-registry-rubygems branch August 5, 2026 14:47
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