Skip to content

Resolve rubocop todo about Security/Open

What does this MR do and why?

Resolve rubocop todo about Security/Open.

Rubocop Offenses:

Security/Open: The use of URI.open is a serious security risk.

Solution reference from: https://www.rubydoc.info/gems/rubocop/RuboCop/Cop/Security/Open

# bad
open(something)
open("| #{something}")
URI.open(something)

# good
File.open(something)
IO.popen(something)
URI.parse(something).open

# good (literal strings)
open("foo.text")
open("| foo")
URI.open("http://example.com")

Merge request reports

Loading