Repository navigation
Sync with upstream ruby/setup-ruby v1.342.0 (Ruby security fix) - #20
Merged
Merged
Conversation
* To have a single target for "required checks" in GitHub for auto-merge. * Same shape as the result jobs in ruby/ruby workflows.
ubuntu-26.04 only has builds of the latest patch release of each series, so use 3.4.12 and 3.1.7 instead of 3.4.0 and 3.1.0. Ruby 2.0 does not compile on ubuntu-26.04, so drop that test. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
The mswin builds are downloaded from cache.ruby-lang.org, which does not take the token. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The mswin build of ruby-loco has not been updated since 2026-10-14. cache.ruby-lang.org publishes the newest daily build for x64 and arm64 as ruby-head-<platform>.zip. Their OpenSSL looks for certificates in a directory that does not exist on runners, so SSL_CERT_FILE points at the bundle of Git for Windows. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
DevKit Rubies got it only from the DevKit setup, so `windows-toolchain: none` left them without CA certificates while mswin had them. It is their OpenSSL that needs the certificates, not the toolchain. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Using setup-ruby twice in the same job (e.g. for multiple Gemfiles in a monorepo) was not tested, which let ruby#444 slip through: BUNDLER_VERSION exported by a first setup-ruby step using Bundler 1 leaked into a second step, whose `bundle install` then failed with "You must use Bundler 2 or greater with this lockfile". The new job reproduces that scenario: a first step uses Bundler 1 via gemfiles/bundler1.gemfile, then a second step on the root Gemfile must use Bundler 2.4 (the latest Bundler for Ruby 2.7), both for the action's own `bundle install` and for later steps. It runs on ubuntu-24.04 since Ruby 2.7 is not available on ubuntu-26.04, which ubuntu-latest is moving to. Closes ruby#445
Use Ruby 3.4 for the second setup-ruby step, so the test also covers switching Ruby versions within a job, and check with `ruby --version` after each step that the expected Ruby is picked. Ruby 3.4 ships with Bundler 2.6, so expect that instead of Bundler 2.4. Co-Authored-By: Claude <noreply@anthropic.com>
bundle install was always invoked with an explicit `--jobs N` (the number of available processors, capped at 8). Since Bundler stores command-line options as temporary settings, which take precedence over every other configuration source, this silently overrode any `BUNDLE_JOBS` set by the user, making it impossible to e.g. disable parallel installation. Only pass `--jobs` when `BUNDLE_JOBS` is not set, so that the `BUNDLE_*` environment variables recommended in the README for configuring Bundler also work for the number of jobs. Fixes ruby#673
The mswin builds from cache.ruby-lang.org keep the build machine's paths out of configure_args, so extconf.rb no longer finds the vcpkg headers and libraries that ruby-loco located through --with-opt-dir. Their RbConfig also has an empty PKG_CONFIG, so mkmf ran the MSYS2 pkg-config on PATH, which pointed fiddle at the MinGW libffi headers and broke the MSVC build. ruby-loco meant to set PKG_CONFIG to the vcpkg pkgconf, but its path missed a variable and pointed nowhere. ruby#976 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
json builds without any external library, so it did not catch mkmf losing track of vcpkg. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
mkmf skips an absolute PKG_CONFIG that File.expand_path would rewrite, so the backslashed path never ran pkgconf and extensions built only through their header and library fallbacks. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The mswin Ruby ships z.dll, not the libz.dll that vcpkg's libz.lib imports, so a zlib extension built against vcpkg failed to load and then broke RubyGems in that gem home. The other vcpkg DLLs still resolve to the copies in Ruby's own bin first. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Building fiddle succeeded even while a zlib extension linked to libz.dll could not be loaded. The step activates the installed zlib explicitly, because Ruby also ships a default zlib built against its own z.dll. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Adds ruby 3.3.14, 3.4.13 and 4.0.10, which fix CVE-2026-132825. Keeps the Warp runner list in generate-test-matrix.rb and the ubuntu-24.04 pins in test.yml. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
RubyInstaller published them after upstream tagged v1.342.0. Generated with generate-windows-versions.rb. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The new Ruby builds are made on macOS 15 and fail to load OpenSSL on macOS 14. Upstream dropped macos-14 for the same reason. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
janakiram7755
approved these changes
Nov 20, 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.
Issue
Ruby has a critical security bug, CVE-2026-132825 ("ruby2shell"). It can let an attacker run code, and Rails apps can hit it by default. It's fixed in Ruby 3.3.14, 3.4.13 and 4.0.10. Upstream setup-ruby added those versions in v1.342.0. Our fork is still on v1.335.0, so it can't install them. Brightside asked for this (Plain T-1427).
What
Syncs the fork with upstream ruby/setup-ruby v1.342.0, up from v1.335.0.
generate-windows-versions.rb, the same way upstream does it.$BUNDLE_JOBSforbundle install, and the download token now only sent to github.com.Decisions
ruby-version: 3.3,3.4or4.0get the fixed Ruby on their next run. Users who pin an exact older version, such as3.4.12, must change it themselves.Could not load OpenSSL. Sowarp-macos-14-arm64-6xis removed from the test matrix. Only one customer uses Ruby on macOS 14, and we'll tell them.generate-test-matrix.rbotherwise keeps our Warp runner list. Upstream addedubuntu-26.04, but we don't add runners in a sync.test.ymlkeeps ourubuntu-24.04pins and adds upstream's newresultjob.dist/index.jsis rebuilt withyarn run package. It matches the merged file and keeps the warp-cache code.Tested
yarn run packagegives no diff.generate-test-matrix.rblocally (the local Ruby is too old), so CI checks it.Checklist
v1.342.0and fast-forward thev1branch to it🤖 Generated with Claude Code