Files
codeql/ruby/ql/test/library-tests/frameworks/PosixSpawn.ql
2022-05-26 14:29:04 +01:00

16 lines
551 B
Plaintext

import ruby
import codeql.ruby.frameworks.PosixSpawn
import codeql.ruby.DataFlow
query predicate systemCalls(
PosixSpawn::SystemCall call, DataFlow::Node arg, boolean shellInterpreted
) {
arg = call.getAnArgument() and
if call.isShellInterpreted(arg) then shellInterpreted = true else shellInterpreted = false
}
query predicate childCalls(PosixSpawn::ChildCall call, DataFlow::Node arg, boolean shellInterpreted) {
arg = call.getAnArgument() and
if call.isShellInterpreted(arg) then shellInterpreted = true else shellInterpreted = false
}