diff --git a/swift/ql/lib/codeql/swift/dataflow/internal/DataFlowPrivate.qll b/swift/ql/lib/codeql/swift/dataflow/internal/DataFlowPrivate.qll index 9ea57c1ff06..135924c0eb7 100644 --- a/swift/ql/lib/codeql/swift/dataflow/internal/DataFlowPrivate.qll +++ b/swift/ql/lib/codeql/swift/dataflow/internal/DataFlowPrivate.qll @@ -305,7 +305,7 @@ private module Cached { model = "" or // flow through a flow summary (extension of `SummaryModelCsv`) - FlowSummaryImpl::Private::Steps::summaryLocalStep(nodeFrom.(FlowSummaryNode).getSummaryNode(), + FlowSummaryImpl::Private::Steps::summaryLocalStep(nodeFrom, nodeTo.(FlowSummaryNode).getSummaryNode(), true, model) } diff --git a/swift/ql/lib/codeql/swift/dataflow/internal/FlowSummaryImpl.qll b/swift/ql/lib/codeql/swift/dataflow/internal/FlowSummaryImpl.qll index 3a096fe3d57..6ca8e12ef6b 100644 --- a/swift/ql/lib/codeql/swift/dataflow/internal/FlowSummaryImpl.qll +++ b/swift/ql/lib/codeql/swift/dataflow/internal/FlowSummaryImpl.qll @@ -20,6 +20,8 @@ module Input implements InputSig class SinkBase = Void; + class FlowSummaryCallBase = Void; + predicate callableFromSource(SummarizedCallableBase c) { c.hasBody() } ArgumentPosition callbackSelfParameterPosition() { result instanceof ThisArgumentPosition } @@ -113,6 +115,10 @@ module Input implements InputSig private import Make as Impl private module StepsInput implements Impl::Private::StepsInputSig { + Impl::Private::SummaryNode getSummaryNode(Node n) { + result = n.(FlowSummaryNode).getSummaryNode() + } + DataFlowCall getACall(Public::SummarizedCallable sc) { result.asCall().getStaticTarget() = sc } DataFlowCallable getSourceNodeEnclosingCallable(Input::SourceBase source) { none() } diff --git a/swift/ql/lib/codeql/swift/dataflow/internal/TaintTrackingPrivate.qll b/swift/ql/lib/codeql/swift/dataflow/internal/TaintTrackingPrivate.qll index c3f14b03f83..6960dcf6177 100644 --- a/swift/ql/lib/codeql/swift/dataflow/internal/TaintTrackingPrivate.qll +++ b/swift/ql/lib/codeql/swift/dataflow/internal/TaintTrackingPrivate.qll @@ -76,7 +76,7 @@ private module Cached { model = "" or // flow through a flow summary (extension of `SummaryModelCsv`) - FlowSummaryImpl::Private::Steps::summaryLocalStep(nodeFrom.(FlowSummaryNode).getSummaryNode(), + FlowSummaryImpl::Private::Steps::summaryLocalStep(nodeFrom, nodeTo.(FlowSummaryNode).getSummaryNode(), false, model) or any(AdditionalTaintStep a).step(nodeFrom, nodeTo) and model = "AdditionalTaintStep"