File tree Expand file tree Collapse file tree 2 files changed +6
-1
lines changed
lib/codeql/ruby/frameworks
test/library-tests/frameworks/active_record Expand file tree Collapse file tree 2 files changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -618,7 +618,9 @@ private class ActiveRecordAssociationMethodCall extends DataFlow::CallNode {
618
618
(
619
619
assoc .isCollection ( ) and
620
620
(
621
- this .getMethodName ( ) = pluralize ( model ) + [ "" , "=" , "<<" ]
621
+ this .getMethodName ( ) = pluralize ( model ) + [ "" , "=" ]
622
+ or
623
+ this .getMethodName ( ) = "<<"
622
624
or
623
625
this .getMethodName ( ) = model + [ "_ids" , "_ids=" ]
624
626
)
Original file line number Diff line number Diff line change @@ -39,6 +39,7 @@ activeRecordInstances
39
39
| associations.rb:27:9:27:28 | call to create |
40
40
| associations.rb:29:1:29:7 | author2 |
41
41
| associations.rb:29:1:29:13 | call to posts |
42
+ | associations.rb:29:1:29:22 | ... << ... |
42
43
| associations.rb:29:18:29:22 | post2 |
43
44
| associations.rb:31:1:31:5 | post1 |
44
45
| associations.rb:31:1:31:12 | __synth__0 |
@@ -175,6 +176,8 @@ activeRecordModelInstantiations
175
176
| associations.rb:27:9:27:21 | call to posts | associations.rb:5:1:9:3 | Post |
176
177
| associations.rb:27:9:27:28 | call to create | associations.rb:5:1:9:3 | Post |
177
178
| associations.rb:29:1:29:13 | call to posts | associations.rb:5:1:9:3 | Post |
179
+ | associations.rb:29:1:29:22 | ... << ... | associations.rb:11:1:13:3 | Tag |
180
+ | associations.rb:29:1:29:22 | ... << ... | associations.rb:15:1:17:3 | Comment |
178
181
| associations.rb:31:1:31:12 | call to author= | associations.rb:1:1:3:3 | Author |
179
182
| associations.rb:35:1:35:14 | call to comments | associations.rb:15:1:17:3 | Comment |
180
183
| associations.rb:35:1:35:21 | call to create | associations.rb:15:1:17:3 | Comment |
You can’t perform that action at this time.
0 commit comments