@@ -19,19 +19,22 @@ module Summaries {
1919 }
2020
2121 predicate isSink ( DataFlow:: Node sink ) { sink = any ( DataFlow:: MethodNode m ) .getAReturnNode ( ) }
22+
23+ DataFlow:: FlowFeature getAFeature ( ) {
24+ result instanceof DataFlow:: FeatureEqualSourceSinkCallContext
25+ }
2226 }
2327
2428 private module ValueFlow {
2529 import DataFlow:: Global< Config >
2630
2731 predicate summaryModel ( string type , string path , string input , string output ) {
28- exists ( DataFlow:: MethodNode methodNode , API :: Node paramNode |
32+ exists ( DataFlow:: MethodNode methodNode , DataFlow :: ParameterNode paramNode |
2933 methodNode .getLocation ( ) .getFile ( ) instanceof Util:: RelevantFile and
30- flow ( paramNode .asSource ( ) , methodNode .getAReturnNode ( ) ) and
31- paramNode .asSource ( ) = Util:: getAnyParameter ( methodNode )
34+ flow ( paramNode , methodNode .getAReturnNode ( ) )
3235 |
3336 Util:: pathToMethod ( methodNode , type , path ) and
34- input = Util:: getArgumentPath ( paramNode . asSource ( ) ) and
37+ input = Util:: getArgumentPath ( paramNode ) and
3538 output = "ReturnValue"
3639 )
3740 }
@@ -42,13 +45,12 @@ module Summaries {
4245
4346 predicate summaryModel ( string type , string path , string input , string output ) {
4447 not ValueFlow:: summaryModel ( type , path , input , output ) and
45- exists ( DataFlow:: MethodNode methodNode , API :: Node paramNode |
48+ exists ( DataFlow:: MethodNode methodNode , DataFlow :: ParameterNode paramNode |
4649 methodNode .getLocation ( ) .getFile ( ) instanceof Util:: RelevantFile and
47- flow ( paramNode .asSource ( ) , methodNode .getAReturnNode ( ) ) and
48- paramNode .asSource ( ) = Util:: getAnyParameter ( methodNode )
50+ flow ( paramNode , methodNode .getAReturnNode ( ) )
4951 |
5052 Util:: pathToMethod ( methodNode , type , path ) and
51- input = Util:: getArgumentPath ( paramNode . asSource ( ) ) and
53+ input = Util:: getArgumentPath ( paramNode ) and
5254 output = "ReturnValue"
5355 )
5456 }
0 commit comments