Ruby: Ql4QL fix

This commit is contained in:
Harry Maclean
2024-02-26 10:41:30 +00:00
parent beef9965cc
commit d1847566b6
2 changed files with 7 additions and 5 deletions

View File

@@ -135,11 +135,8 @@ module Kernel {
* spawn([env,] command... [,options]) -> pid
* ```
*/
class KernelSpawnCall extends SystemCommandExecution::Range instanceof DataFlow::CallNode {
KernelSpawnCall() {
this.getMethodName() = "spawn" and
this instanceof KernelMethodCall
}
class KernelSpawnCall extends SystemCommandExecution::Range instanceof KernelMethodCall {
KernelSpawnCall() { this.getMethodName() = "spawn" }
override DataFlow::Node getAnArgument() { result = super.getArgument(_) }

View File

@@ -31,6 +31,11 @@ module Open3 {
}
}
/**
* A system command executed via one of the `Open4` methods.
* These methods take the same argument forms as `Kernel.system`.
* See `KernelSystemCall` for details.
*/
class Open4Call extends SystemCommandExecution::Range instanceof DataFlow::CallNode {
Open4Call() {
this = API::getTopLevelMember("Open4").getAMethodCall(["open4", "popen4", "spawn"])