Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🚨 [security] Update rubocop-rails 2.27.0 → 2.30.1 (minor) #560

Closed
wants to merge 1 commit into from

Conversation

depfu[bot]
Copy link
Contributor

@depfu depfu bot commented Feb 18, 2025


🚨 Your current dependencies have known security vulnerabilities 🚨

This dependency update fixes known security vulnerabilities. Please see the details below and assess their impact carefully. We recommend to merge and deploy this as soon as possible!


Here is everything you need to know about this update. Please take a good look at what changed and the test results before merging this pull request.

What changed?

✳️ rubocop-rails (2.27.0 → 2.30.1) · Repo · Changelog

Release Notes

2.30.1

Bug fixes

  • #1442: Fix an incorrect behavior when using AllCops: TargetRailsVersion. (@koic)
  • #1444: Fix an incorrect behavior when using AllCops: MigratedSchemaVersion. (@koic)

2.30.0

New features

Bug fixes

  • #1071: Fix Rails/FilePath cop to correctly handle File.join with variables and ignore leading and multiple slashes in string literal arguments for Rails.root.join and File.join. (@ydakuka)
  • #912: Enhance Rails/Delegate by adding delegation detection for self.class, constants, class variables, global variables, and instance variables. (@ydakuka)

2.29.1

Bug fixes

  • #1423: Fix an error for Rails/StrongParametersExpect when using permit with no arguments. (@koic)
  • #1417: Fix an incorrect autocorrect for Rails/StrongParametersExpect when using a leading dot multiline call to require with permit. (@koic)
  • #1356: Enhance Rails/DuplicateAssociation to handle alias. (@ydakuka)
  • #1389: Handle TypeError caused by passing array literals as arguments to File methods in Rails/FilePath cop. (@ydakuka)
  • #1389: Handle TypeError caused by passing array literals as arguments to File methods in Rails/RootPathnameMethods cop. (@ydakuka)
  • #1228: Enhance Rails/SaveBang to properly handle instance variables. (@ydakuka)

2.29.0

New features

  • #1407: Add new Rails/MultipleRoutePaths cop. (@koic)
  • #1358: Add new Rails/StrongParametersExpect cop. (@koic)

Bug fixes

  • #1409: Fix an error for Rails/ReversibleMigration when calling drop_table without any arguments. (@earlopain)
  • #1397: Fix an incorrect autocorrect for Rails/TimeZone when Time.new has a string argument. (@mterada1228)
  • #1406: Fix autocorrection for Rails/IndexBy and Rails/IndexWith when map { ... }.to_h is enclosed in another block. (@franzliedke, @eugeneius)
  • #1404: Update Rails/IndexBy and Rails/IndexWith to support numbered block parameters. (@eugeneius)
  • #1405: Fix autocorrection for Rails/IndexWith when the value is a hash literal without braces. (@koic, @eugeneius)
  • #1414: Fix Rails/HttpPositionalArguments cop false positives with arguments forwarding. (@viralpraxis)

Changes

  • #1410: Make registered cops aware of AllCops: MigratedSchemaVersion. (@koic)

2.28.0

New features

  • #1383: Introduce AllCops: MigratedSchemaVersion config. (@koic)

Bug fixes

  • #1390: Fix an incorrect autocorrect for Rails/SelectMap when select has no receiver and method chains are used. (@masato-bkn)
  • #1382: Fix false negatives for Rails/RedundantActiveRecordAllMethod when using all method in block. (@masato-bkn)
  • #1397: Fix Rails/FilePath cop error on join method with implicit receiver. (@viralpraxis)
  • #1398: Fix Rails/FilePath cop error in case of extra operations in Rails.root interpolation. (@viralpraxis)
  • #1392: Fix Rails/FilePath cop error with rescued Rails.root. (@viralpraxis)

Changes

  • #1388: Modify Rails/Pluck to ignore map/collect when used inside blocks to prevent potential N+1 queries. (@masato-bkn)

Does any of this look wrong? Please let us know.

Commits

See the full diff on Github. The new version differs by more commits than we can show here.

✳️ rubocop (1.71.1 → 1.72.2) · Repo · Changelog

Release Notes

1.72.2

Bug fixes

  • #13853: Fix exclusion of relative paths in plugin's AllCops: Exclude as expected. (@koic)
  • #13844: Fix an error for Style/RedundantFormat when a template argument is used without keyword arguments. (@koic)
  • #13857: Fix an error for Style/RedundantFormat when numeric placeholders is used in the template argument. (@koic)
  • #13861: Fix ArgumentError related to two deprecated AllowedPattern APIs. (@koic)
  • #13849: Fix an error for Lint/UselessConstantScoping when multiple assigning to constants after private access modifier. (@koic)
  • #13856: Fix false positives for Lint/UselessConstantScoping when a constant is used after private access modifier with arguments. (@koic)

Changes

  • #13846: Mark Style/RedundantFormat as unsafe autocorrect. (@koic)

1.72.1

Bug fixes

  • #13836: Fix an error for Style/RedundantParentheses when a different expression appears before a range literal. (@koic)
  • #13839: Fix false positives for Lint/RedundantTypeConversion when passing block arguments when generating a Hash or a Set. (@koic)

Changes

  • #13839: Extension plugin is loaded automatically with require 'rubocop/rspec/support'. (@koic)

1.72.0

New features

  • #13740: Add new Lint/CopDirectiveSyntax cop. (@kyanagi)
  • #13800: Add new Lint/SuppressedExceptionInNumberConversion cop. (@koic)
  • #13702: Add new Lint/RedundantTypeConversion cop. (@dvandersluis)
  • #13831: Add new Lint/UselessConstantScoping cop. (@koic)
  • #13793: Add new Style/RedundantFormat cop to check for uses of format or sprintf with only a single string argument. (@dvandersluis)
  • #13581: Add new InternalAffairs/LocationExists cop to check for code that can be replaced with Node#loc? or Node#loc_is?. (@dvandersluis)
  • #13661: Make server mode detect local paths in .rubocop.yml under inherit_from and require for automatically restart. (@koic)
  • #13721: Naming/PredicateName: Optionally use Sorbet to detect predicate methods. (@issyl0)
  • #6012: Support RuboCop extension plugin. (@koic)

Bug fixes

  • #13807: Fix false negatives for Style/RedundantParentheses when chaining [] method calls. (@koic)
  • #13788: Fix false negatives for Style/RedundantParentheses when [] method is called with variable or constant receivers. (@koic)
  • #13811: Fix false negatives for Style/RedundantParentheses when handling range literals with redundant parentheses. (@koic)
  • #13796: Fix crash in Layout/EmptyLinesAroundMethodBody for endless methods. (@dvandersluis)
  • #13817: Fix false positive for format specifier with non-numeric precision. (@dvandersluis)
  • #12672: Fix false positives for Lint/FormatParameterMismatch when the width value is interpolated. (@dvandersluis)
  • #12795: Fix Layout/BlockAlignment for blocks that are the body of an endless method. (@dvandersluis)
  • #13822: Fix undefined method Logger when processing watched file notifications. (@vinistock)
  • #13805: Make the language_server-protocol dependency version stricter. (@koic)

1.71.2

Bug fixes

  • #13782: Fix an error Layout/ElseAlignment when else is part of a numblock. (@earlopain)
  • #13395: Fix a false positive for Lint/UselessAssignment when assigning in branch and block. (@pCosta99)
  • #13783: Fix a false positive for Lint/Void when each numblock with conditional expressions that has multiple statements. (@earlopain)
  • #13787: Fix incorrect autocorrect for Style/ExplicitBlockArgument when using arguments of zsuper in method definition. (@koic)
  • #13785: Fix Style/EachWithObject cop error in case of single block argument. (@viralpraxis)
  • #13781: Fix a false positive for Lint/UnmodifiedReduceAccumulator when omitting the accumulator in a nested numblock. (@earlopain)

Does any of this look wrong? Please let us know.

Commits

See the full diff on Github. The new version differs by more commits than we can show here.

↗️ concurrent-ruby (indirect, 1.3.4 → 1.3.5) · Repo · Changelog

Release Notes

1.3.5

What's Changed

New Contributors

Full Changelog: v1.3.4...v1.3.5

Does any of this look wrong? Please let us know.

Commits

See the full diff on Github. The new version differs by 6 commits:

↗️ i18n (indirect, 1.14.6 → 1.14.7) · Repo · Changelog

Release Notes

1.14.7

What's Changed

  • Ruby 3.4 Hash#inspect compatibility. by @voxik in #709
  • Removed (annoying) post-install message that was triggering on all Rubies, rather than the specified versions.

Full Changelog: v1.14.6...v1.14.7

Does any of this look wrong? Please let us know.

Commits

See the full diff on Github. The new version differs by 8 commits:

↗️ json (indirect, 2.9.1 → 2.10.1) · Repo · Changelog

Release Notes

2.10.1 (from changelog)

  • Fix a compatibility issue with MultiJson.dump(obj, pretty: true): no implicit conversion of false into Proc (TypeError).

2.10.0

What's Changed

  • strict: true now accept symbols as values. Previously they'd only be accepted as hash keys.
  • The C extension Parser has been entirely reimplemented from scratch.
  • Introduced JSON::Coder as a new API allowing to customize how non native types are serialized in a non-global way.
  • Introduced JSON::Fragment to allow assembling cached fragments in a safe way.
  • The Java implementation of the generator received many optimizations.

Full Changelog: v2.9.1...v2.10.0

Does any of this look wrong? Please let us know.

Commits

See the full diff on Github. The new version differs by 61 commits:

↗️ parser (indirect, 3.3.7.0 → 3.3.7.1) · Repo · Changelog

Release Notes

3.3.7.1 (from changelog)

API modifications:

  • parser/current: add -dev prefix to 3.4 branch (#1067) (Ilya Bylich)
  • parser/current: bump 3.2 branch to 3.2.7 (#1066) (Ilya Bylich)

Does any of this look wrong? Please let us know.

Commits

See the full diff on Github. The new version differs by 5 commits:

↗️ rack (indirect, 2.2.10 → 2.2.11) · Repo · Changelog

Security Advisories 🚨

🚨 Possible Log Injection in Rack::CommonLogger

Summary

Rack::CommonLogger can be exploited by crafting input that includes newline characters to manipulate log entries. The supplied proof-of-concept demonstrates injecting malicious content into logs.

Details

When a user provides the authorization credentials via Rack::Auth::Basic, if success, the username will be put in env['REMOTE_USER'] and later be used by Rack::CommonLogger for logging purposes.

The issue occurs when a server intentionally or unintentionally allows a user creation with the username contain CRLF and white space characters, or the server just want to log every login attempts. If an attacker enters a username with CRLF character, the logger will log the malicious username with CRLF characters into the logfile.

Impact

Attackers can break log formats or insert fraudulent entries, potentially obscuring real activity or injecting malicious data into log files.

Mitigation

  • Update to the latest version of Rack.
Commits

See the full diff on Github. The new version differs by 2 commits:

🆕 lint_roller (added, 1.1.0)


Depfu Status

Depfu will automatically keep this PR conflict-free, as long as you don't add any commits to this branch yourself. You can also trigger a rebase manually by commenting with @depfu rebase.

All Depfu comment commands
@​depfu rebase
Rebases against your default branch and redoes this update
@​depfu recreate
Recreates this PR, overwriting any edits that you've made to it
@​depfu merge
Merges this PR once your tests are passing and conflicts are resolved
@​depfu cancel merge
Cancels automatic merging of this PR
@​depfu close
Closes this PR and deletes the branch
@​depfu reopen
Restores the branch and reopens this PR (if it's closed)
@​depfu pause
Ignores all future updates for this dependency and closes this PR
@​depfu pause [minor|major]
Ignores all future minor/major updates for this dependency and closes this PR
@​depfu resume
Future versions of this dependency will create PRs again (leaves this PR as is)

@depfu depfu bot added dependencies Pull requests that update a dependency file Technical Debt labels Feb 18, 2025
Copy link
Contributor Author

depfu bot commented Feb 25, 2025

Closed in favor of #564.

@depfu depfu bot closed this Feb 25, 2025
@depfu depfu bot deleted the depfu/update/rubocop-rails-2.30.1 branch February 25, 2025 19:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file Technical Debt
Projects
None yet
Development

Successfully merging this pull request may close these issues.

0 participants