Bump nokogiri to 1.19.3 to patch libxml2 CVEs#29
Merged
Conversation
Addresses GHSA-353f-x4gh-cqq8 (Dependabot alert #44): nokogiri < 1.18.9 ships a vulnerable vendored libxml2 affected by CVE-2025-49794/49795/49796 (critical), CVE-2025-6021 (high), and CVE-2025-6170 (low). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Nokogiri >= 1.18.9 (the minimum version with the libxml2 CVE patches from GHSA-353f-x4gh-cqq8) requires Ruby >= 3.1, so the previous CI matrix (2.7, 3.0.3) cannot install it. Update CI to test 3.1/3.2/3.3, upgrade actions/checkout (v2 -> v4) and replace the deprecated actions/cache@v1 with ruby/setup-ruby's bundler-cache. Bump gemspec required_ruby_version and rubocop TargetRubyVersion to 3.1. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Nokogiri 1.19.3 requires Ruby >= 3.2 (not 3.1 as initially attempted),
so drop 3.1 from the CI matrix and bump gemspec/rubocop accordingly.
Also replace map { ... }.compact with filter_map flagged by RuboCop
after raising TargetRubyVersion.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
RuboCop 1.22.3 (pinned in Gemfile.lock) doesn't recognize TargetRubyVersion 3.2+, so cap it at 3.1 — runtime code still runs on 3.2+. Ruby 3.4 dropped libdecimal/bigdecimal from default gems and json-schema 4.3 fails to load it; keep the matrix at 3.2/3.3 to avoid scope creep into transitive dependency cleanup. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
The cop wants required_ruby_version (>= 3.2, dictated by nokogiri 1.19.3) to match TargetRubyVersion, but RuboCop 1.22.3 doesn't recognize 3.2 as a valid TargetRubyVersion. Disable the cop rather than pinning rubocop or splitting nokogiri across versions. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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.
Addresses GHSA-353f-x4gh-cqq8 (Dependabot alert #44): nokogiri < 1.18.9 ships a vulnerable vendored libxml2 affected by CVE-2025-49794/49795/49796 (critical), CVE-2025-6021 (high), and CVE-2025-6170 (low).