Skip to content

Upgrade to Rails 8.1 - #343

Open
leowilkin wants to merge 2 commits into
mainfrom
chore/rails-8-1
Open

leowilkin wants to merge 2 commits into
mainfrom
chore/rails-8-1

Conversation

@leowilkin

Copy link
Copy Markdown
Member

why

rails 8.0 support ends on 2026-11-07. brakeman 8.1.0 flags it, and because of --ensure-latest that was failing scan_ruby on every PR.

what

  • rails 8.0.5.1 → 8.1.4
  • acts_as_paranoid 0.10.3 → 0.11.0. 0.10 caps activesupport below 8.1. according to the 0.11 changelog, it only changes which Ruby and Rails versions are supported, with no behaviour changes.
  • config.load_defaults stays at 8.0. new_framework_defaults_8_1.rb is the stock template with everything commented out, so the new defaults can be turned on one at a time in follow-ups. action_on_path_relative_redirect = :raise is the one worth looking at first, since this is the auth service.
  • removed the brakeman EOLRails ignore, since this PR makes it unnecessary.

also in this PR

38b5d41 is the CI-fix commit from #342, cherry-picked because main's lint and scan_ruby are red. it covers the backup_code.rb lint offense, the brakeman 8.1.0 bump, and the email typo banner moving to an _html key. whichever of the two PRs merges first, the other one rebases over it. if this one goes first, #342's EOL ignore entry becomes a conflict and should simply be dropped.

checked

  • full suite: 657 examples, 74 failures, exactly the same set as main. most come from the :pending verification factory trait, which builds a persona record with a mismatched inquiry id. that means a lot of the persona and verification specs aren't actually covering anything right now.
  • no deprecation warnings in the test run
  • brakeman: no warnings. rubocop: clean.
  • dev server: /up, /, /login and /.well-known/openid-configuration all respond normally. /oauth/discovery/keys returns 500 in dev on both 8.0 and 8.1 because there's no OIDC_SIGNING_KEY locally, so it's unrelated to the upgrade.

worth checking after deploy

  • OIDC discovery and JWKS on staging/prod, since those need real keys
  • a soft delete or restore path from the backend, which is the acts_as_paranoid bump

both were already failing on main:

- rubocop: missing spaces inside the array brackets in backup_code.rb
- brakeman: bin/brakeman runs --ensure-latest, so 8.1.0 coming out
  failed every PR. bumped to 8.1.0, which raised two new warnings:
  - a weak XSS on the email typo banner. it was already escaped, but
    switching to an _html translation key lets rails do the escaping
    and drops the manual html_escape + html_safe
  - rails 8.0 EOL on 2026-11-07. ignored with a note — the 8.1
    upgrade needs its own PR before then
rails 8.0 support ends 2026-11-07.

- rails 8.0.5.1 → 8.1.4
- acts_as_paranoid 0.10.3 → 0.11.0 (0.10 caps activesupport < 8.1;
  0.11 only changes version support)
- config.load_defaults stays at 8.0. new_framework_defaults_8_1.rb
  is the stock template, all commented out, so the new defaults can be
  flipped one at a time later
- dropped the brakeman EOLRails ignore, which this makes unnecessary
@socket-security

Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Updatedgem/​brakeman@​8.0.6 ⏵ 8.1.075 +110010010070
Updatedgem/​rails@​8.0.5.1 ⏵ 8.1.410010090100100
Updatedgem/​acts_as_paranoid@​0.10.3 ⏵ 0.11.0100100100100100

View full report

@socket-security

Copy link
Copy Markdown

Warning

Review the following alerts detected in dependencies.

According to your organization's Security Policy, it is recommended to resolve "Warn" alerts. Learn more about Socket for GitHub.

Priority Alert  (click "▶" to expand/collapse) Action
Low priority
Low adoption: gem action_text-trix

Location: Package overview

From: Gemfile.lock → gem/rails@8.1.4 → gem/action_text-trix@2.1.19

ℹ Read more on: This package | This alert | What are unpopular packages?

Next steps: Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support@socket.dev.

Suggestion: Unpopular packages may have less maintenance and contain other problems.

Mark the package as acceptable risk. To ignore this alert only in this pull request, reply with the comment @SocketSecurity ignore gem/action_text-trix@2.1.19. You can also ignore all packages with @SocketSecurity ignore-all. To ignore an alert for all future pull requests, use Socket's Dashboard to change the triage state of this alert.

Warn

View full report

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant