Fix Ruby security audit dependencies and preserve image processing

Merged
SU
2d ago
+43-25

Summary

Repair the scan_ruby failure on main in run 47265188485. bundler-audit reports five advisories across three locked dependencies; this is not a flaky application test.

  • Update image_processing 1.14.0 → 2.2.2, oauth2 2.0.22 → 2.1.0, and webauthn 3.4.3 → 3.5.2, with the required dependency resolution.
  • Require the hardened ImageProcessing line and explicitly declare ruby-vips: ImageProcessing 2 no longer installs image backends transitively. Preserve Active Storage's Vips image processing.
  • Add an integration regression that attaches a real profile PNG and processes the configured 72×72 small variant through the installed backend.
  • Keep the scanner and advisory checks unchanged; no ignores or bypasses.

Security/compatibility

The audit matches GHSA-jm85-wxjw-3vv5, GHSA-v99p-m5vm-fqqc, GHSA-h4fh-g8xf-8255, GHSA-97v8-p42x-qfhv, and GHSA-g35w-vq7x-8qcv. A dependency match does not establish that every exploit path is reachable in Sure. OAuth2 2.1 blocks cross-origin redirects by default; legitimate integrations should use the final endpoint rather than relying on credential-bearing redirects.

Validation

  • bundle exec bundler-audit check --update: no vulnerabilities found, advisory DB 254155b09d7c1257dea60a9b4e7dbc108a95e732.
  • Focused passkey, OAuth registration and attachment validation: 68 tests passed after building the new worktree's missing CSS assets.
  • Real profile-image variant regression: 1 test, 2 assertions, passed.
  • Full Rails suite and repository lint/security checklist: still running locally; publishing early at maintainer request so GitHub CI can start. These checks are not claimed as passed.
  • No browser-system suite run locally; passkey/OAuth behavior is covered by controller tests and the image-processing integration regression.

Summary by cubic

Fixes the bundler-audit security scan failures on main by upgrading three locked dependencies with known advisories. Preserves Active Storage's Vips image processing, which the image_processing 2.x upgrade would otherwise drop.

Security and compatibility

  • Updated image_processing to 2.2.2, oauth2 to 2.1.0, and webauthn to 3.5.2.
  • oauth2 2.1 blocks cross-origin redirects by default; integrations should use the final endpoint rather than credential-bearing redirects.
  • Added ruby-vips explicitly since ImageProcessing 2 makes image backends optional.
  • Added a regression test that processes a real profile PNG through the Vips backend.
  • The audit check stays unchanged with no ignores or bypasses.

Summary by CodeRabbit

  • Improvements
    • Improved profile image processing; small image variants are generated at 72 × 72 pixels.