Skip to content

Commit da8c745

Browse files
committed
Ruby: Restrict Rails Setting nodes to SetterMethodCalls
1 parent 712972c commit da8c745

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,8 @@ private module Settings {
131131
Setting() {
132132
// exclude some test configuration
133133
not isInTestConfiguration(this.getLocation()) and
134-
this.getReceiver+() instanceof Config::Node
134+
this.getReceiver+() instanceof Config::Node and
135+
this.asExpr().getExpr() instanceof SetterMethodCall
135136
}
136137
}
137138

0 commit comments

Comments
 (0)