mirror of
https://github.com/github/codeql.git
synced 2025-12-24 04:36:35 +01:00
Support ActiveRecord SQL executing calls where there is a self receiver (implicit or explicit)
This commit is contained in:
@@ -52,6 +52,13 @@ class ActiveRecordModelClassMethodCall extends MethodCall {
|
||||
or
|
||||
// e.g. Foo.joins(:bars).where(...)
|
||||
this.getReceiver() instanceof ActiveRecordModelClassMethodCall
|
||||
or
|
||||
// e.g. self.where(...) within an ActiveRecordModelClass
|
||||
(
|
||||
this.getReceiver() instanceof Self
|
||||
and
|
||||
this.getEnclosingModule() instanceof ActiveRecordModelClass
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user