mirror of
https://github.com/github/codeql.git
synced 2026-04-25 16:55:19 +02:00
Update Kernel.qll to include send aliases
Add `public_send` and `__send__` as Code Injection sinks as proposed by @vcsjones
This commit is contained in:
@@ -43,7 +43,7 @@ module Kernel {
|
||||
* ```
|
||||
*/
|
||||
private predicate isPublicKernelMethod(string method) {
|
||||
method in ["class", "clone", "frozen?", "tap", "then", "yield_self", "send"]
|
||||
method in ["class", "clone", "frozen?", "tap", "then", "yield_self", "send", "public_send", "__send__"]
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -167,7 +167,7 @@ module Kernel {
|
||||
* ```
|
||||
*/
|
||||
class SendCallCodeExecution extends CodeExecution::Range, KernelMethodCall {
|
||||
SendCallCodeExecution() { this.getMethodName() = "send" }
|
||||
SendCallCodeExecution() { this.getMethodName() = ["send", "public_send", "__send__"] }
|
||||
|
||||
override DataFlow::Node getCode() { result = this.getArgument(0) }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user