premailer / css_parser

Ruby CSS Parser
Other
279 stars 110 forks source link

Use File.read instead of IO.read #149

Closed tagliala closed 4 months ago

tagliala commented 4 months ago

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

Why and what is being done.

Pre-Merge Checklist

grosser commented 4 months ago

nice find!

grosser commented 4 months ago

1.17.1