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

Use File.read instead of IO.read #149

Merged
merged 1 commit into from Apr 7, 2024

Commits on Apr 7, 2024

  1. Use File.read instead of IO.read

    If argument starts with a pipe character (`'|'`) and the receiver is
    the `IO` class, a subprocess is created in the same way as
    `Kernel#open`, and its output is returned. `Kernel#open` may allow
    unintentional command injection, which is the reason these `IO` methods
    are a security risk. Consider to use `File.read` to disable the
    behavior of subprocess invocation.
    
    Ref: https://www.rubydoc.info/gems/rubocop/RuboCop/Cop/Security/IoMethods
    tagliala committed Apr 7, 2024
    Configuration menu
    Copy the full SHA
    d96c4df View commit details
    Browse the repository at this point in the history