File tree Expand file tree Collapse file tree 1 file changed +4
-8
lines changed
ruby/ql/lib/codeql/ruby/frameworks Expand file tree Collapse file tree 1 file changed +4
-8
lines changed Original file line number Diff line number Diff line change @@ -214,19 +214,15 @@ class ActiveRecordSqlExecutionRange extends SqlExecution::Range {
214
214
this .asExpr ( ) .getNode ( ) = mc .getSqlFragmentSinkArgument ( )
215
215
)
216
216
or
217
- exists ( DataFlow:: CallNode executeCall |
218
- executeCall .getReceiver ( ) = activeRecordConnectionInstance ( ) and
219
- executeCall .getMethodName ( ) = "execute" and
220
- this = executeCall .getArgument ( 0 ) and
221
- unsafeSqlExpr ( this .asExpr ( ) .getExpr ( ) )
222
- )
217
+ this = activeRecordConnectionInstance ( ) .getAMethodCall ( "execute" ) .getArgument ( 0 ) and
218
+ unsafeSqlExpr ( this .asExpr ( ) .getExpr ( ) )
223
219
}
224
220
225
221
override DataFlow:: Node getSql ( ) { result = this }
226
222
}
227
223
228
- private DataFlow :: Node activeRecordConnectionInstance ( ) {
229
- result = activeRecordClassApiNode ( ) .getAMethodCall ( "connection" )
224
+ private API :: Node activeRecordConnectionInstance ( ) {
225
+ result = activeRecordClassApiNode ( ) .getReturn ( "connection" )
230
226
}
231
227
232
228
// TODO: model `ActiveRecord` sanitizers
You can’t perform that action at this time.
0 commit comments