KEMBAR78
Enhance `Security/Eval` cop to detect `Kernel.eval` calls by viralpraxis · Pull Request #14335 · rubocop/rubocop · GitHub
Skip to content

Conversation

@viralpraxis
Copy link
Contributor

I'm not sure if Kernel.eval is not detected intentionally, but if it's not, here's a patch.


Before submitting the PR make sure the following are checked:

  • The PR relates to only one subject with a clear title and description in grammatically correct, complete sentences.
  • Wrote good commit messages.
  • Feature branch is up-to-date with master (if not - rebase it).
  • Squashed related commits together.
  • Added tests.
  • Ran bundle exec rake default. It executes all tests and runs RuboCop on its own code.
  • Added an entry (file) to the changelog folder named {change_type}_{change_description}.md if the new code introduces user-observable changes. See changelog entry format for details.

@koic
Copy link
Member

koic commented Jul 1, 2025

Can you add the new case to the documentation examples?

I'm not sure if `Kernel.eval` is not detected intentionally,
but if it's not, here's a patch.
@viralpraxis viralpraxis force-pushed the enhance-security-eval-to-detect-kernel-eval-calls branch from 6f2002e to 0e08208 Compare July 1, 2025 07:23
@koic koic merged commit d7f3da6 into rubocop:master Jul 1, 2025
24 checks passed
@viralpraxis viralpraxis deleted the enhance-security-eval-to-detect-kernel-eval-calls branch July 1, 2025 08:15
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.

2 participants