@@ -194,14 +194,13 @@ module PropagateFlowConfig implements DataFlow::StateConfigSig {
194194 }
195195}
196196
197- private module PropagateFlow = TaintTracking:: GlobalWithState< PropagateFlowConfig > ;
197+ module PropagateFlow = TaintTracking:: GlobalWithState< PropagateFlowConfig > ;
198198
199- /**
200- * Gets the summary model(s) of `api`, if there is flow from parameters to return value or parameter.
201- */
202- string captureThroughFlow ( DataFlowSummaryTargetApi api ) {
203- exists ( DataFlow:: ParameterNode p , ReturnNodeExt returnNodeExt , string input , string output |
204- PropagateFlow:: flow ( p , returnNodeExt ) and
199+ string captureThroughFlow0 (
200+ DataFlowSummaryTargetApi api , DataFlow:: ParameterNode p , ReturnNodeExt returnNodeExt
201+ ) {
202+ exists ( string input , string output |
203+ p .getEnclosingCallable ( ) = api and
205204 returnNodeExt .( DataFlow:: Node ) .getEnclosingCallable ( ) = api and
206205 input = parameterNodeAsInput ( p ) and
207206 output = returnNodeExt .getOutput ( ) and
@@ -210,6 +209,16 @@ string captureThroughFlow(DataFlowSummaryTargetApi api) {
210209 )
211210}
212211
212+ /**
213+ * Gets the summary model(s) of `api`, if there is flow from parameters to return value or parameter.
214+ */
215+ string captureThroughFlow ( DataFlowSummaryTargetApi api ) {
216+ exists ( DataFlow:: ParameterNode p , ReturnNodeExt returnNodeExt |
217+ PropagateFlow:: flow ( p , returnNodeExt ) and
218+ result = captureThroughFlow0 ( api , p , returnNodeExt )
219+ )
220+ }
221+
213222/**
214223 * A dataflow configuration used for finding new sources.
215224 * The sources are the already known existing sources and the sinks are the API return nodes.
0 commit comments