Skip to content

Commit d184756

Browse files
committed
Ruby: Ql4QL fix
1 parent beef996 commit d184756

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

ruby/ql/lib/codeql/ruby/frameworks/core/Kernel.qll

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -135,11 +135,8 @@ module Kernel {
135135
* spawn([env,] command... [,options]) -> pid
136136
* ```
137137
*/
138-
class KernelSpawnCall extends SystemCommandExecution::Range instanceof DataFlow::CallNode {
139-
KernelSpawnCall() {
140-
this.getMethodName() = "spawn" and
141-
this instanceof KernelMethodCall
142-
}
138+
class KernelSpawnCall extends SystemCommandExecution::Range instanceof KernelMethodCall {
139+
KernelSpawnCall() { this.getMethodName() = "spawn" }
143140

144141
override DataFlow::Node getAnArgument() { result = super.getArgument(_) }
145142

ruby/ql/lib/codeql/ruby/frameworks/stdlib/Open3.qll

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,11 @@ module Open3 {
3131
}
3232
}
3333

34+
/**
35+
* A system command executed via one of the `Open4` methods.
36+
* These methods take the same argument forms as `Kernel.system`.
37+
* See `KernelSystemCall` for details.
38+
*/
3439
class Open4Call extends SystemCommandExecution::Range instanceof DataFlow::CallNode {
3540
Open4Call() {
3641
this = API::getTopLevelMember("Open4").getAMethodCall(["open4", "popen4", "spawn"])

0 commit comments

Comments
 (0)