We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d497fd2 commit 6a986a9Copy full SHA for 6a986a9
javascript/ql/src/semmle/javascript/dataflow/Nodes.qll
@@ -716,7 +716,11 @@ class ClassNode extends DataFlow::SourceNode {
716
result = getAReceiverNode()
717
or
718
exists(DataFlow::TypeTracker t2 |
719
- result = getAnInstanceReference(t2).track(t2, t)
+ result = getAnInstanceReference(t2).track(t2, t) and
720
+ // Avoid tracking into the receiver of other classes.
721
+ // Note that this also blocks flows into a property of the receiver,
722
+ // but the `localFieldStep` rule will often compensate for this.
723
+ not result = any(DataFlow::ClassNode cls).getAReceiverNode()
724
)
725
}
726
0 commit comments