File tree Expand file tree Collapse file tree
ruby/ql/lib/codeql/ruby/dataflow/internal Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -327,7 +327,12 @@ private module Cached {
327327 FlowSummaryImpl:: Private:: Steps:: summaryThroughStepValue ( nodeFrom , nodeTo , _)
328328 }
329329
330- /** This is the local flow predicate that is used in type tracking. */
330+ /**
331+ * This is the local flow predicate that is used in type tracking.
332+ *
333+ * This needs to exclude `localFlowSsaParamInput` due to a performance trick
334+ * in type tracking, where such steps are treated as call steps.
335+ */
331336 cached
332337 predicate localFlowStepTypeTracker ( Node nodeFrom , Node nodeTo ) {
333338 LocalFlow:: localFlowStepCommon ( nodeFrom , nodeTo )
Original file line number Diff line number Diff line change @@ -326,9 +326,11 @@ private module Cached {
326326 source = sink and
327327 source instanceof LocalSourceNode
328328 or
329- exists ( Node mid |
330- hasLocalSource ( mid , source ) and
329+ exists ( Node mid | hasLocalSource ( mid , source ) |
331330 localFlowStepTypeTracker ( mid , sink )
331+ or
332+ // Explicitly include the SSA param input step as type-tracking omits this step.
333+ LocalFlow:: localFlowSsaParamInput ( mid , sink )
332334 )
333335 }
334336
You can’t perform that action at this time.
0 commit comments