Repository navigation
Patch gems with published security advisories - #33
Closed
raghubetina wants to merge 1 commit into
Closed
raghubetina wants to merge 1 commit into
raghubetina wants to merge 1 commit into
Conversation
bundle-audit reported more than 30 advisories against the template's lockfile, the worst a critical Active Storage file-access issue through ImageMagick fixed in Rails 8.1.4.1. The template's CI is disabled, so nothing caught them, and every student repository generated from it inherits the vulnerable versions. Take patch releases only: Rails 8.1.4.1, Puma 7.2.2, Rack 3.2.8, Nokogiri 1.19.7, msgpack 1.8.7, ransack 4.4.4, and the Loofah, rails-html-sanitizer, addressable, crass, and json fixes. oj stays at 3.13.23: grade_runner 0.0.16, the newest release, pins ~> 3.13.12. It is a development/test gem, so the production image never loads oj.
Contributor
|
I'll take this over. Needs to apply to projects and targets too, and the |
Contributor
|
This update belongs with I'm going to use this update here as a test case on project-syncing for a more intelligent syncing workflow. Closing this PR now, but using the description and diff as reference for the updates applied at a higher level, which will filter down to this repo. |
1 task done
bpurinton
added a commit
to firstdraft/grade_runner
that referenced
this pull request
Nov 19, 2026
bundle-audit flagged eleven advisories against oj 3.13.23 in every Rails 8 project lock, one of them high severity: CVE-2026-54592 (GHSA-3m6q-jj5j-38c9) The rest are heap/stack overflows and use-after-frees in Oj.dump, Oj.load, Oj::Doc and Oj::Parser. All eleven list the same fix, "update to '>= 3.17.3'", but grade_runner pinned oj to "~> 3.13.12", so none of the 103 project repos could take it while they depended on grade_runner 0.0.16. This was the last blocker in the fleet-wide gem security patch (appdev-projects/rails-8-template#33, firstdraft/project-syncing#58). Move the pin to "~> 3.17", ">= 3.17.3" and release as 0.0.17. The floor is the exact fixed version; the ~> keeps us off a future oj 4. Project Gemfiles already say "~> 0.0.16", so they pick this up with no Gemfile change. grade_runner only touches oj in two places: Oj.dump writes the RSpec results in JsonOutputFormatter, and Oj.load reads that file back and parses Grades responses. To check nothing changed: - bundle lock --conservative --update grade_runner oj on the rails8-phase1 image Gemfile moves only oj (3.13.23 -> 3.17.8, plus bigdecimal, already present); bundle-audit then reports nothing. - A sample suite (pass, fail, pending, error, points, hints, unicode) produces identical formatter output under both oj versions, ignoring timings; so do the Runner POST body and response parsing. - grade in a getting-started-with-scaffolds Codespace on Ruby 4.0.5, before and after: Grades builds #13 and #14 both read "16 tests, 16 failures, 0/16 points, 0.0%" with the same examples. Gemfile.lock is left alone, as in #93: its bundler ~> 2.1.4 dev dependency no longer resolves on Bundler 4, and consumers resolve from the gemspec anyway.
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.
Why
bundle-auditreports 30+ advisories against this template's lockfile. The worst is a critical Active Storage arbitrary-file-access issue through ImageMagick (fixed in Rails 8.1.4.1); others include high-severity Action Pack, Active Support, Rack, msgpack, and ransack issues. CI is disabled here, so nothing caught them, and every repo generated from the template inherits them.Change (patch releases only)
Rails 8.1.3 → 8.1.4.1, Puma 7.2.1 → 7.2.2, Rack 3.2.6 → 3.2.8, Nokogiri 1.19.4 → 1.19.7, msgpack 1.8.3 → 1.8.7, ransack 4.4.1 → 4.4.4, Loofah 2.25.1 → 2.25.3, rails-html-sanitizer 1.7.0 → 1.7.2, addressable 2.9.0 → 2.9.2, crass 1.0.7 → 1.0.8, json 2.21.1 → 2.21.2.
Not fixed: oj 3.13.23 (fix needs ≥ 3.17.3).
grade_runner0.0.16, its newest release, pinsoj ~> 3.13.12. It's in the development/test group, so the production image never loads oj; fixing it needs agrade_runnerrelease that relaxes the pin.Verification
bundle-audit check: only the oj advisories remain.bundle exec rspec: 1 example, 0 failures (the template's placeholder).Existing student repos keep their own lockfiles; this fixes only new repos generated from the template.