@@ -11,7 +11,7 @@ private import codeql.ruby.AST
11
11
private import codeql.ruby.ApiGraphs
12
12
private import queries.modeling.internal.Util as Util
13
13
14
- predicate simpleParameters ( string type , string path , string value , DataFlow:: Node details ) {
14
+ predicate simpleParameters ( string type , string path , string value , DataFlow:: Node node ) {
15
15
exists ( DataFlow:: MethodNode methodNode , DataFlow:: ParameterNode paramNode |
16
16
methodNode .getLocation ( ) .getFile ( ) instanceof Util:: RelevantFile and
17
17
(
@@ -24,11 +24,11 @@ predicate simpleParameters(string type, string path, string value, DataFlow::Nod
24
24
|
25
25
Util:: pathToMethod ( methodNode , type , path ) and
26
26
value = Util:: getArgumentPath ( paramNode ) and
27
- details = paramNode
27
+ node = paramNode
28
28
)
29
29
}
30
30
31
- predicate blockArguments ( string type , string path , string value , DataFlow:: Node details ) {
31
+ predicate blockArguments ( string type , string path , string value , DataFlow:: Node node ) {
32
32
exists ( DataFlow:: MethodNode methodNode , DataFlow:: CallNode callNode |
33
33
methodNode .getLocation ( ) .getFile ( ) instanceof Util:: RelevantFile and
34
34
callNode = methodNode .getABlockCall ( )
@@ -38,50 +38,50 @@ predicate blockArguments(string type, string path, string value, DataFlow::Node
38
38
argNode = callNode .getPositionalArgument ( i )
39
39
|
40
40
value = "Argument[block].Parameter[" + i + "]" and
41
- details = argNode
41
+ node = argNode
42
42
)
43
43
or
44
44
exists ( DataFlow:: ExprNode argNode , string keyword |
45
45
argNode = callNode .getKeywordArgument ( keyword )
46
46
|
47
47
value = "Argument[block].Parameter[" + keyword + ":]" and
48
- details = argNode
48
+ node = argNode
49
49
)
50
50
or
51
51
value = "Argument[block]" and
52
- details = callNode
52
+ node = callNode
53
53
) and
54
54
Util:: pathToMethod ( methodNode , type , path )
55
55
)
56
56
}
57
57
58
- predicate returnValue ( string type , string path , string value , DataFlow:: Node details ) {
58
+ predicate returnValue ( string type , string path , string value , DataFlow:: Node node ) {
59
59
exists ( DataFlow:: MethodNode methodNode , DataFlow:: Node returnNode |
60
60
methodNode .getLocation ( ) .getFile ( ) instanceof Util:: RelevantFile and
61
61
returnNode = methodNode .getAReturnNode ( )
62
62
|
63
63
Util:: pathToMethod ( methodNode , type , path ) and
64
64
value = "ReturnValue" and
65
- details = returnNode
65
+ node = returnNode
66
66
)
67
67
}
68
68
69
69
predicate inputAccessPaths (
70
- string type , string path , string value , DataFlow:: Node details , string defType
70
+ string type , string path , string value , DataFlow:: Node node , string defType
71
71
) {
72
- simpleParameters ( type , path , value , details ) and defType = "parameter"
72
+ simpleParameters ( type , path , value , node ) and defType = "parameter"
73
73
or
74
- blockArguments ( type , path , value , details ) and defType = "parameter"
74
+ blockArguments ( type , path , value , node ) and defType = "parameter"
75
75
}
76
76
77
77
predicate outputAccessPaths (
78
- string type , string path , string value , DataFlow:: Node details , string defType
78
+ string type , string path , string value , DataFlow:: Node node , string defType
79
79
) {
80
- simpleParameters ( type , path , value , details ) and defType = "parameter"
80
+ simpleParameters ( type , path , value , node ) and defType = "parameter"
81
81
or
82
- blockArguments ( type , path , value , details ) and defType = "parameter"
82
+ blockArguments ( type , path , value , node ) and defType = "parameter"
83
83
or
84
- returnValue ( type , path , value , details ) and defType = "return"
84
+ returnValue ( type , path , value , node ) and defType = "return"
85
85
}
86
86
87
87
query predicate input = inputAccessPaths / 5 ;
0 commit comments