Provides modeling for the IO
class.
Import path
import codeql.ruby.frameworks.core.IO
Classes
IOInstance | An instance of the IO class, for example in
|
POpenCall | A system command executed via the IO.popen method. Signature: popen([env,] cmd, mode="r" [, opt]) -> io popen([env,] cmd, mode="r" [, opt]) {|io| block } -> obj IO.popen does different things based on the value of cmd : "-" : fork commandline : command line string which is passed to a shell [env, cmdname, arg1, ..., opts] : command name and zero or more arguments (no shell) [env, [cmdname, argv0], arg1, ..., opts] : command name, argv[0] and zero or more arguments (no shell) (env and opts are optional.) Examples: ruby IO.popen("cat foo.txt | tail") IO.popen({some_env_var: "123"}, "cat foo.txt | tail") IO.popen(["cat", "foo.txt"]) IO.popen([{some_env_var: "123"}, "cat", "foo.txt"]) IO.popen([["cat", "argv0"], "foo.txt"]) IO.popen([{some_env_var: "123"}, ["cat", "argv0"], "foo.txt"]) Ruby documentation: https://docs.ruby-lang.org/en/3.1/IO.html#method-c-popen
|
Aliases
FileReader | A DataFlow::CallNode that reads data to the filesystem using the IO or File classes. For example, the IO.read and File#readline calls in:
|
FileWriter | A DataFlow::CallNode that reads data from the filesystem using the IO or File classes. For example, the write and puts calls in:
|
IOReader | A DataFlow::CallNode that reads data using the IO class. For example, the read and readline calls in:
|
IOWriter | A DataFlow::CallNode that writes data using the IO class. For example, the write and puts calls in:
|