Skip to content

fix: CI broken on main (lint + scan_ruby failing on every push) - #25

Merged
jcasimir merged 3 commits into
mainfrom
fix/ci-broken-on-main
Jul 23, 2026
Merged

fix: CI broken on main (lint + scan_ruby failing on every push)#25
jcasimir merged 3 commits into
mainfrom
fix/ci-broken-on-main

Conversation

@jcasimir

Copy link
Copy Markdown
Member

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 the lint and scan_ruby checks, because those checks were already broken against main itself, not against anything the bumps touched.

Three independent, pre-existing issues, each masking the next:

  1. lint (RuboCop) — 71 pre-existing Layout/SpaceInsideArrayLiteralBrackets / Style/TrailingCommaInHashLiteral offenses across 12 files. Fixed with bin/rubocop -A.
  2. scan_ruby / Brakeman — a real Command Injection warning (medium confidence) in lib/engageny/page_comparator.rb: unsanitized string interpolation shelled out via backticks/grep/unzip. Rewrote the ZIP-entry lookup using the rubyzip gem (already a transitive dependency) instead of shelling out.
  3. 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 in action_text-trix, addressable, msgpack, net-imap, puma, and websocket-driver. A plain bundle update for these fails because Bundler re-verifies the whole dependency graph, including the plurimath git source, whose pinned revision requires an old mml/lutaml-model API that newer releases of those gems no longer expose (confirmed via mml/configuration LoadError on boot). Pinned mml and lutaml-model to 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_ruby jobs run):

  • bin/rubocop → no offenses
  • bin/brakeman --no-pager → no warnings
  • bin/bundler-audit → no vulnerabilities
  • bin/importmap audit (also boots config/application.rb, i.e. confirms the app still loads with the pinned/updated gems) → no vulnerable packages, no errors

Test plan

  • bin/rubocop clean
  • bin/brakeman --no-pager clean
  • bin/bundler-audit clean
  • App boots successfully with the updated/pinned Gemfile.lock
  • CI green on this PR (lint, scan_ruby, scan_js)

🤖 Generated with Claude Code

jcasimir and others added 3 commits July 22, 2026 22:51
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>
@jcasimir
jcasimir merged commit 1164188 into main Jul 23, 2026
3 checks passed
@jcasimir
jcasimir deleted the fix/ci-broken-on-main branch July 23, 2026 04:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

1 participant