Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 611ed93 commit cfde7e9Copy full SHA for cfde7e9
1 file changed
ruby/ql/lib/codeql/ruby/frameworks/ActionCable.qll
@@ -43,8 +43,17 @@ module ActionCable {
43
.getConstant("Channel")
44
.getConstant("Base")
45
.getADescendentModule()
46
- .getAnOwnInstanceMethod() and
47
- // as long as it's public
+ .getAnInstanceMethod() and
+ // as long as it's not an instance method of
48
+ // `ActionCable::Channel::Base` itself, which might exist in the
49
+ // database
50
+ not m =
51
+ DataFlow::getConstant("ActionCable")
52
+ .getConstant("Channel")
53
+ .getConstant("Base")
54
+ .asModule()
55
56
+ // and as long as it's public
57
m.asCallableAstNode().isPublic() and
58
// and is not called `subscribed` or `unsubscribed`.
59
not m.getMethodName() = ["subscribed", "unsubscribed"]
0 commit comments