Skip to content

Refresh vulnerable Ruby dependencies - #386

Open
ryanduguid wants to merge 2 commits into
XeroAPI:masterfrom
ryanduguid:agent/update-ruby-dependencies
Open

Refresh vulnerable Ruby dependencies#386
ryanduguid wants to merge 2 commits into
XeroAPI:masterfrom
ryanduguid:agent/update-ruby-dependencies

Conversation

@ryanduguid

Copy link
Copy Markdown

Summary

  • refresh the committed bundle with Bundler 2.5.11
  • move Faraday to 2.14.3, concurrent-ruby to 1.3.8, Active Support to 8.1.3.1 and URI to 1.1.1
  • clear the patched ranges behind all 11 current Dependabot alerts once merged

Validation

  • Bundler 2.5.11 resolved and wrote the lockfile successfully
  • static lock inspection confirms all four packages are above their current patched-version floors
  • git diff --check

The full bundle and RSpec suite could not run locally because this portable Windows Ruby lacks MSYS2/native gem build support. The PR remains draft pending hosted dependency installation, bundle exec bundler-audit check and RSpec.

@ryanduguid
ryanduguid marked this pull request as ready for review August 18, 2026 15:07
The refresh cleared the advisories only in Gemfile.lock. The lock is not packaged
(s.files is lib/**/* plus README.md) and does not bind consumers, so the shipped
constraints still admitted every vulnerable version.

faraday '>= 2.0' -> '>= 2.14.3'
  GHSA-98m9-hrrm-r99r (high, uncontrolled recursion in NestedParamsEncoder,
  stack exhaustion DoS) affects >= 2.0.0, <= 2.14.2, patched 2.14.3.
  GHSA-5rv5-xj5j-3484 (low, incomplete fix for the SSRF below) affects
  >= 2.0.0, <= 2.14.1, patched 2.14.2.
  GHSA-33mh-2634-fwr2 (medium, SSRF via protocol-relative host override in
  build_exclusive_url) affects >= 2.0.0, <= 2.14.0, patched 2.14.1.

json '>= 2.1.0' -> '>= 2.21.2'
  A 2.3.0 floor would clear GHSA-jphg-qwrw-7w9g (high, unsafe object creation)
  but leave four later advisories reachable: GHSA-9m3q-rhmv-5q44 (high, OOB
  read, patched 2.10.2), GHSA-3m6g-2423-7cp3 (high, format string injection,
  patched 2.19.2 on the 2.18+ line), GHSA-x2f5-4prf-w687 (low, generator heap
  overflow, patched 2.19.9) and GHSA-9hj4-r449-hfvc (low, freed buffer deref,
  patched 2.21.2). 2.21.2 clears all five and matches the lock.

json-jwt '>= 1.16.3' -> '>= 1.16.6'
  GHSA-c8v6-786g-vjx6 (medium, sign/encryption confusion allowing bypass of
  identity checks) affects >= 1.16.0, < 1.16.6, patched 1.16.6. This SDK
  verifies OAuth2 id_tokens and access_tokens through json-jwt.

Also removed x64-mingw-ucrt from PLATFORMS. It was a side effect of regenerating
the lock on Windows, unrelated to the refresh, and forces future `bundle lock`
runs to satisfy a platform the project neither tests nor supports.

Recorded the Ruby floor contradiction in the Gemfile: activesupport 8.1.3.1,
connection_pool 3.0.2 and minitest 6.0.6 each require Ruby >= 3.2 and faraday
2.14.3 requires >= 3.0, so the lock cannot install on Ruby 3.1.x while the
gemspec still declares ">= 2.3". PR XeroAPI#387 raises that floor and must land with or
before this.

Advisory ranges verified with `gh api /advisories?ecosystem=rubygems&affects=<gem>`;
versions and required_ruby_version verified against the RubyGems API. Nothing was
executed: no Ruby toolchain is installed on this machine.
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.

1 participant