Skip to content

Commit 1257617

Browse files
committed
Ruby: do not generate API graph edges from Attribute contents
Models should use Method[x] edges, not attribute edges
1 parent 6daa1c4 commit 1257617

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

ruby/ql/lib/codeql/ruby/ApiGraphs.qll

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -522,7 +522,8 @@ module API {
522522
or
523523
exists(TypeTrackerSpecific::TypeTrackerContent c |
524524
TypeTrackerSpecific::basicLoadStep(node, ref, c) and
525-
lbl = Label::content(c.getAStoreContent())
525+
lbl = Label::content(c.getAStoreContent()) and
526+
not c.isSingleton(any(DataFlow::Content::AttributeNameContent k))
526527
)
527528
// note: method calls are not handled here as there is no DataFlow::Node for the intermediate MkMethodAccessNode API node
528529
}

0 commit comments

Comments
 (0)