Skip to content

Commit dcc0123

Browse files
committed
Fix QL4QL alert
1 parent 06c95ba commit dcc0123

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

ruby/ql/lib/codeql/ruby/frameworks/ActiveResource.qll

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -184,11 +184,12 @@ module ActiveResource {
184184
ModelClassMethodCall classMethodCall;
185185

186186
Collection() {
187-
exists(ModelClassMethodCall c | c.flowsTo(this) |
188-
c.getMethodName() = "all"
187+
classMethodCall.flowsTo(this) and
188+
(
189+
classMethodCall.getMethodName() = "all"
189190
or
190-
c.getMethodName() = "find" and
191-
c.getArgument(0).asExpr().getConstantValue().isStringlikeValue("all")
191+
classMethodCall.getMethodName() = "find" and
192+
classMethodCall.getArgument(0).asExpr().getConstantValue().isStringlikeValue("all")
192193
)
193194
}
194195

0 commit comments

Comments
 (0)