@@ -14,16 +14,27 @@ private import DataFlowImplSpecific::Public
1414module Input implements InputSig< Location , DataFlowImplSpecific:: PythonDataFlow > {
1515 private import codeql.util.Void
1616
17- class SummarizedCallableBase = string ;
17+ class SummarizedCallableBase extends string {
18+ bindingset [ this ]
19+ SummarizedCallableBase ( ) { exists ( this ) }
1820
19- class SourceBase = Void ;
21+ Location getLocation ( ) { none ( ) }
22+ }
23+
24+ class SourceBase extends Void {
25+ Location getLocation ( ) { none ( ) }
26+ }
2027
21- class SinkBase = Void ;
28+ class SinkBase = SourceBase ;
2229
23- class FlowSummaryCallBase = Void ;
30+ class FlowSummaryCallBase = SourceBase ;
2431
2532 predicate callableFromSource ( SummarizedCallableBase c ) { none ( ) }
2633
34+ DataFlowCallable getSummarizedCallableAsDataFlowCallable ( SummarizedCallableBase c ) {
35+ result .asLibraryCallable ( ) = c
36+ }
37+
2738 ArgumentPosition callbackSelfParameterPosition ( ) { result .isLambdaSelf ( ) }
2839
2940 ReturnKind getStandardReturnValueKind ( ) { any ( ) }
@@ -112,11 +123,42 @@ module Input implements InputSig<Location, DataFlowImplSpecific::PythonDataFlow>
112123
113124private import Make< Location , DataFlowImplSpecific:: PythonDataFlow , Input > as Impl
114125
115- private module StepsInput implements Impl:: Private:: StepsInputSig {
116- Impl:: Private:: SummaryNode getSummaryNode ( Node n ) {
117- result = n .( FlowSummaryNode ) .getSummaryNode ( )
126+ private module Input2 implements Impl:: Private:: InputSig2 {
127+ private import codeql.util.Void
128+
129+ class SourceSinkReportingElement extends Void {
130+ Location getLocation ( ) { none ( ) }
131+
132+ DataFlowCallable getEnclosingCallable ( ) { none ( ) }
118133 }
119134
135+ bindingset [ source, s]
136+ SourceSinkReportingElement getSourceEntryElement (
137+ Impl:: Public:: SourceElement source , Impl:: Private:: SummaryComponentStack s
138+ ) {
139+ none ( )
140+ }
141+
142+ bindingset [ e, s]
143+ Node getSourceExitNode ( SourceSinkReportingElement e , Impl:: Private:: SummaryComponentStack s ) {
144+ none ( )
145+ }
146+
147+ SourceSinkReportingElement getSinkExitElement (
148+ Impl:: Public:: SinkElement sink , Impl:: Private:: SummaryComponent sc
149+ ) {
150+ none ( )
151+ }
152+
153+ bindingset [ e, sc]
154+ Node getSinkEntryNode ( SourceSinkReportingElement e , Impl:: Private:: SummaryComponent sc ) { none ( ) }
155+ }
156+
157+ private import Impl:: Private:: Make2< Input2 > as Impl2
158+
159+ private module StepsInput implements Impl2:: StepsInputSig {
160+ Impl2:: SummaryNode getSummaryNode ( Node n ) { result = n .( FlowSummaryNode ) .getSummaryNode ( ) }
161+
120162 overlay [ global]
121163 DataFlowCall getACall ( Public:: SummarizedCallable sc ) {
122164 result =
@@ -125,18 +167,13 @@ private module StepsInput implements Impl::Private::StepsInputSig {
125167 sc .( LibraryCallable ) .getACallSimple ( ) .asCfgNode ( )
126168 ] )
127169 }
128-
129- DataFlowCallable getSourceNodeEnclosingCallable ( Input:: SourceBase source ) { none ( ) }
130-
131- Node getSourceNode ( Input:: SourceBase source , Impl:: Private:: SummaryComponentStack s ) { none ( ) }
132-
133- Node getSinkNode ( Input:: SinkBase sink , Impl:: Private:: SummaryComponent sc ) { none ( ) }
134170}
135171
136172module Private {
137173 import Impl:: Private
174+ import Impl2
138175
139- module Steps = Impl :: Private :: Steps< StepsInput > ;
176+ module Steps = Impl2 :: Steps< StepsInput > ;
140177
141178 /**
142179 * Provides predicates for constructing summary components.
0 commit comments