diff --git a/python/ql/lib/semmle/python/dataflow/new/internal/TypeTracker.qll b/python/ql/lib/semmle/python/dataflow/new/internal/TypeTracker.qll index 1ada143a475..52807799c2c 100644 --- a/python/ql/lib/semmle/python/dataflow/new/internal/TypeTracker.qll +++ b/python/ql/lib/semmle/python/dataflow/new/internal/TypeTracker.qll @@ -186,7 +186,7 @@ private module Cached { jumpStep(nodeFrom, nodeTo) and summary = JumpStep() or - levelStep(nodeFrom, nodeTo) and + levelStepNoCall(nodeFrom, nodeTo) and summary = LevelStep() or exists(TypeTrackerContent content | @@ -216,6 +216,9 @@ private module Cached { or returnStep(nodeFrom, nodeTo) and summary = ReturnStep() + or + levelStepCall(nodeFrom, nodeTo) and + summary = LevelStep() } } diff --git a/python/ql/lib/semmle/python/dataflow/new/internal/TypeTrackerSpecific.qll b/python/ql/lib/semmle/python/dataflow/new/internal/TypeTrackerSpecific.qll index 05ad3cbdd7d..fc16da4b0e2 100644 --- a/python/ql/lib/semmle/python/dataflow/new/internal/TypeTrackerSpecific.qll +++ b/python/ql/lib/semmle/python/dataflow/new/internal/TypeTrackerSpecific.qll @@ -45,8 +45,11 @@ predicate simpleLocalFlowStep = DataFlowPrivate::simpleLocalFlowStepForTypetrack predicate jumpStep = DataFlowPrivate::jumpStepSharedWithTypeTracker/2; -/** Holds if there is a level step from `pred` to `succ`. */ -predicate levelStep(Node pred, Node succ) { none() } +/** Holds if there is a level step from `nodeFrom` to `nodeTo`, which may depend on the call graph. */ +predicate levelStepCall(Node pred, Node succ) { none() } + +/** Holds if there is a level step from `nodeFrom` to `nodeTo`, which does not depend on the call graph. */ +predicate levelStepNoCall(Node nodeFrom, Node nodeTo) { none() } /** * Gets the name of a possible piece of content. For Python, this is currently only attribute names,