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 {
618618 (
619619 assoc .isCollection ( ) and
620620 (
621- this .getMethodName ( ) = pluralize ( model ) + [ "" , "=" , "<<" ]
621+ this .getMethodName ( ) = pluralize ( model ) + [ "" , "=" ]
622+ or
623+ this .getMethodName ( ) = "<<"
622624 or
623625 this .getMethodName ( ) = model + [ "_ids" , "_ids=" ]
624626 )
Original file line number Diff line number Diff line change @@ -39,6 +39,7 @@ activeRecordInstances
3939| associations.rb:27:9:27:28 | call to create |
4040| associations.rb:29:1:29:7 | author2 |
4141| associations.rb:29:1:29:13 | call to posts |
42+ | associations.rb:29:1:29:22 | ... << ... |
4243| associations.rb:29:18:29:22 | post2 |
4344| associations.rb:31:1:31:5 | post1 |
4445| associations.rb:31:1:31:12 | __synth__0 |
@@ -175,6 +176,8 @@ activeRecordModelInstantiations
175176| associations.rb:27:9:27:21 | call to posts | associations.rb:5:1:9:3 | Post |
176177| associations.rb:27:9:27:28 | call to create | associations.rb:5:1:9:3 | Post |
177178| 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 |
178181| associations.rb:31:1:31:12 | call to author= | associations.rb:1:1:3:3 | Author |
179182| associations.rb:35:1:35:14 | call to comments | associations.rb:15:1:17:3 | Comment |
180183| 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