Skip to content
vetkitChecksChangelogDocumentation

vetkit.ruby.command-injection.kernel-open

Kernel#open / IO.read receives request input. A value starting with "|" runs a shell command, and any other value reads an arbitrary file.

Last updated:

Suite: Security

ruby

Kernel#open / IO.read receives request input. A value starting with "|" runs a shell command, and any other value reads an arbitrary file.

Category: SECURITY · Engine rule severity: ERROR

How to fix it

Use File.open / File.read for files (after validating the path) and URI.open or Net::HTTP for URLs.

References

Source: packages/engine/rules/sast/ruby.yml.

Generated from shipped rule definitions at build time. Matching is a review signal, not proof of exploitability. “generic” denotes text matching, not complete language or framework coverage. Runtime configuration and available tools affect whether a rule runs.