fix: CI broken on main (lint + scan_ruby failing on every push)#25
Merged
Conversation
Main was failing the `lint` CI check on every push/PR because these pre-existing offenses violated the omakase style's Layout/SpaceInsideArrayLiteralBrackets rule. Applied via `bin/rubocop -A`. Co-Authored-By: Claude <noreply@anthropic.com>
Brakeman flagged a Command Injection warning in lib/engageny/page_comparator.rb — interpolated strings were shelled out to `unzip`/`grep` via backticks and `system`, failing the `scan_ruby` CI check on main. Replaced with the rubyzip gem (already a transitive dependency) to list and extract entries without invoking a shell. Co-Authored-By: Claude <noreply@anthropic.com>
Main was failing scan_ruby's bundler-audit step (masked behind the brakeman failure fixed in a prior commit) with advisories against action_text-trix, addressable, msgpack, net-imap, puma, and websocket-driver. A plain `bundle update` for these gems fails to resolve because Bundler re-verifies the whole graph, including plurimath's git source — and plurimath's pinned revision requires an old mml/ lutaml-model API that newer releases of those gems removed. Pinned mml and lutaml-model to their current working versions in the Gemfile so they hold steady while the actually-vulnerable gems update. Co-Authored-By: Claude <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.
Summary
CI has been failing on main since before the current run of dependabot PRs — every open dependabot PR (including trivial
actions/*version bumps) fails thelintandscan_rubychecks, because those checks were already broken against main itself, not against anything the bumps touched.Three independent, pre-existing issues, each masking the next:
lint(RuboCop) — 71 pre-existingLayout/SpaceInsideArrayLiteralBrackets/Style/TrailingCommaInHashLiteraloffenses across 12 files. Fixed withbin/rubocop -A.scan_ruby/ Brakeman — a real Command Injection warning (medium confidence) inlib/engageny/page_comparator.rb: unsanitized string interpolation shelled out via backticks/grep/unzip. Rewrote the ZIP-entry lookup using therubyzipgem (already a transitive dependency) instead of shelling out.scan_ruby/ bundler-audit — this step never even ran in CI, because the brakeman step failed first in the same job. Once brakeman was fixed, bundler-audit surfaced real CVEs inaction_text-trix,addressable,msgpack,net-imap,puma, andwebsocket-driver. A plainbundle updatefor these fails because Bundler re-verifies the whole dependency graph, including theplurimathgit source, whose pinned revision requires an oldmml/lutaml-modelAPI that newer releases of those gems no longer expose (confirmed viamml/configurationLoadErroron boot). Pinnedmmlandlutaml-modelto their current working versions so they hold steady while the actually-vulnerable gems update.Verification
Ran locally against this branch (matches what CI's
lint/scan_rubyjobs run):bin/rubocop→ no offensesbin/brakeman --no-pager→ no warningsbin/bundler-audit→ no vulnerabilitiesbin/importmap audit(also bootsconfig/application.rb, i.e. confirms the app still loads with the pinned/updated gems) → no vulnerable packages, no errorsTest plan
bin/rubocopcleanbin/brakeman --no-pagercleanbin/bundler-auditcleanlint,scan_ruby,scan_js)🤖 Generated with Claude Code