Repository navigation
refactor: Bump json from 2.19.3 to 2.19.9 - #1942
Conversation
|
🚀 Thanks for opening this pull request! We appreciate your effort in improving the project. Please let us know once your pull request is ready for review. Tip
Note Please respond to review comments from AI agents just like you would to comments from a human reviewer. Let the reviewer resolve their own comments, unless they have reviewed and accepted your commit, or agreed with your explanation for why the feedback was incorrect. Caution Pull requests must be written using an AI agent with human supervision. Pull requests written entirely by a human will likely be rejected, because of lower code quality, higher review effort and the higher risk of introducing bugs. Please note that AI review comments on this pull request alone do not satisfy this requirement. Our CI and AI review are safeguards, not development tools. If many issues are flagged, rethink your development approach. Invest more effort in planning and design rather than using review cycles to fix low-quality code. |
|
Important Review skippedReview was skipped due to path filters ⛔ Files ignored due to path filters: 1
CodeRabbit blocks several paths by default. You can override this behavior by explicitly including those paths in the path filters. For example, including
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #1942 +/- ##
===========================================
+ Coverage 64.24% 85.73% +21.48%
===========================================
Files 201 282 +81
Lines 23233 31241 +8008
===========================================
+ Hits 14926 26784 +11858
+ Misses 8307 4457 -3850 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
🎉 This change has been released in version 7.1.0 |
Closes #1904
Security update of a development-only, transitive Ruby gem. Resolves Dependabot alert 118, low severity:
>= 2.9.0, < 2.19.9, fixed in 2.19.9jsonis only part of the Ruby tooling in theGemfile:jazzyandcgifor the API docs, andxcpretty,rakeandplistfor building, testing and the release version bump. None of it ships with the SDK. Dependabot reports the alert with runtime scope because theGemfiledoes not use groups. In the lock file,jsonis a transitive dependency (jazzy→cocoapods→cocoapods-core→algoliasearch→json (>= 1.5.1)).jazzyitself also uses it at runtime.Changes
0.0orInf)depthgenerator arguments are handled cleanly; added a missing write barrier inParserConfigJSON.parsecan no longer be mutated during parsing; added missing write barriers inState#dup; further validation of the generatordepthconfigmax_nestingoption are now handled, and non-numeric values raise aTypeError(see below)JSON.generate(object, io)(CVE-2026-54696)2.19.3 was released from a backport branch, 2.19.4 and later from the main branch. The newer releases therefore also contain main-branch changes without changelog entries: embeddable TypedData objects, a GC marking fix for the parser value stack, Ruby 4.1.0dev compatibility, encoding check performance improvements, and TruffleRuby-only fixes. The 2.19.3 fix (unescaped control characters preceded by a backslash) is part of 2.19.9 as well.
json2.20.x and 2.21.x have been released since, but are not taken here. This PR stays at 2.19.9, the Dependabot target and first patched version, because the lock file cannot be regenerated locally (see Lock file).Breaking Changes
None
The stricter option checks in 2.19.6–2.19.8 only reject invalid values (non-numeric
max_nesting, negative or out-of-rangedepth). In 2.19.8 (ruby/json@be8d068), the C generator readsmax_nestingwithNUM2LONGinstead ofFIX2LONG, so a non-numeric value now raises aTypeErrorinstead of being silently misread. The TruffleRuby generator now raises aTypeErrorfor any non-Integer value.This affects one parent API path.
cocoapods-core1.16.2 implementsSpecification#to_json(*a)asJSON.dump(to_hash, *a). When a spec is serialized as part of another object, the generator callsspec.to_json(state), andJSON.dumptreats theJSON::Stateas itslimitargument and passesmax_nesting: <State>. Up to 2.19.7 this was silently accepted; since 2.19.8 it raises aTypeError. This repository cannot reach that path:Scripts/jazzy.shrunsjazzy --objcwithout--podspec, the repository has no*.podspec, and jazzy only loads CocoaPods inPodspecDocumenter.create_podspec. Sococoapods,cocoapods-coreandalgoliasearchare not loaded in docs, CI or release.The other uses pass default or valid options:
algoliasearch(to_json,JSON.parse),jazzy(JSON.parse,to_json,JSON.pretty_generate) andactivesupport(JSON.generatewithmax_nesting: false, which behaves as before).Code Changes Required
None — the upgrade is a drop-in replacement.
Lock file
The
Gemfile.lockchange reproduces the diff of #1904: thejsonspec entry and itsCHECKSUMSentry. The lock file isBUNDLED WITHBundler 4.0.10, which the local Bundler cannot handle, so the lock file was not regenerated. The new checksum was verified against the published gem:sha256=9b9025b7cdddafa38d316eca0b2358488e42d417045c1b90d216a9fefe46b79amatches both the rubygems.org versions API forjson2.19.9 (platformruby) and the SHA-256 of the downloadedjson-2.19.9.gem.json2.19.9 requires Ruby >= 2.7, like 2.19.3.ci.yml,release-automated.ymlandrelease-manual-docs.ymlinstall the bundle withruby/setup-ruby(bundler-cache: true, Ruby 4.0.0 from.ruby-version), which runsbundle installagainst this lock file. PR CI passes with this lock file, including thedocsjob, which installs the bundle and runs jazzy.