Skip to content

Commit ef8ca55

Browse files
authored
Merge pull request #15203 from pwntester/patch-3
Ruby: Update Kernel.qll to include `Object.send` aliases
2 parents a743fca + dbefc13 commit ef8ca55

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

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

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,9 @@ module Kernel {
4343
* ```
4444
*/
4545
private predicate isPublicKernelMethod(string method) {
46-
method in ["class", "clone", "frozen?", "tap", "then", "yield_self", "send"]
46+
method in [
47+
"class", "clone", "frozen?", "tap", "then", "yield_self", "send", "public_send", "__send__"
48+
]
4749
}
4850

4951
/**
@@ -167,7 +169,7 @@ module Kernel {
167169
* ```
168170
*/
169171
class SendCallCodeExecution extends CodeExecution::Range, KernelMethodCall {
170-
SendCallCodeExecution() { this.getMethodName() = "send" }
172+
SendCallCodeExecution() { this.getMethodName() = ["send", "public_send", "__send__"] }
171173

172174
override DataFlow::Node getCode() { result = this.getArgument(0) }
173175

0 commit comments

Comments
 (0)