@@ -19,19 +19,22 @@ module Summaries {
19
19
}
20
20
21
21
predicate isSink ( DataFlow:: Node sink ) { sink = any ( DataFlow:: MethodNode m ) .getAReturnNode ( ) }
22
+
23
+ DataFlow:: FlowFeature getAFeature ( ) {
24
+ result instanceof DataFlow:: FeatureEqualSourceSinkCallContext
25
+ }
22
26
}
23
27
24
28
private module ValueFlow {
25
29
import DataFlow:: Global< Config >
26
30
27
31
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 |
29
33
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 ( ) )
32
35
|
33
36
Util:: pathToMethod ( methodNode , type , path ) and
34
- input = Util:: getArgumentPath ( paramNode . asSource ( ) ) and
37
+ input = Util:: getArgumentPath ( paramNode ) and
35
38
output = "ReturnValue"
36
39
)
37
40
}
@@ -42,13 +45,12 @@ module Summaries {
42
45
43
46
predicate summaryModel ( string type , string path , string input , string output ) {
44
47
not ValueFlow:: summaryModel ( type , path , input , output ) and
45
- exists ( DataFlow:: MethodNode methodNode , API :: Node paramNode |
48
+ exists ( DataFlow:: MethodNode methodNode , DataFlow :: ParameterNode paramNode |
46
49
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 ( ) )
49
51
|
50
52
Util:: pathToMethod ( methodNode , type , path ) and
51
- input = Util:: getArgumentPath ( paramNode . asSource ( ) ) and
53
+ input = Util:: getArgumentPath ( paramNode ) and
52
54
output = "ReturnValue"
53
55
)
54
56
}
0 commit comments