@@ -50,6 +50,8 @@ private import codeql.rust.dataflow.FlowSink
50
50
private import codeql.rust.elements.internal.CallExprBaseImpl:: Impl as CallExprBaseImpl
51
51
52
52
/**
53
+ * DEPRECATED: Do not use.
54
+ *
53
55
* Holds if in a call to the function with canonical path `path`, defined in the
54
56
* crate `crate`, the value referred to by `output` is a flow source of the given
55
57
* `kind`.
@@ -59,12 +61,14 @@ private import codeql.rust.elements.internal.CallExprBaseImpl::Impl as CallExprB
59
61
* For more information on the `kind` parameter, see
60
62
* https://github.com/github/codeql/blob/main/docs/codeql/reusables/threat-model-description.rst.
61
63
*/
62
- extensible predicate sourceModel (
64
+ extensible predicate sourceModelDeprecated (
63
65
string crate , string path , string output , string kind , string provenance ,
64
66
QlBuiltins:: ExtensionId madId
65
67
) ;
66
68
67
69
/**
70
+ * DEPRECATED: Do not use.
71
+ *
68
72
* Holds if in a call to the function with canonical path `path`, defined in the
69
73
* crate `crate`, the value referred to by `input` is a flow sink of the given
70
74
* `kind`.
@@ -75,20 +79,22 @@ extensible predicate sourceModel(
75
79
*
76
80
* - `sql-injection`: a flow sink for SQL injection.
77
81
*/
78
- extensible predicate sinkModel (
82
+ extensible predicate sinkModelDeprecated (
79
83
string crate , string path , string input , string kind , string provenance ,
80
84
QlBuiltins:: ExtensionId madId
81
85
) ;
82
86
83
87
/**
88
+ * DEPRECATED: Do not use.
89
+ *
84
90
* Holds if in a call to the function with canonical path `path`, defined in the
85
91
* crate `crate`, the value referred to by `input` can flow to the value referred
86
92
* to by `output`.
87
93
*
88
94
* `kind` should be either `value` or `taint`, for value-preserving or taint-preserving
89
95
* steps, respectively.
90
96
*/
91
- extensible predicate summaryModel (
97
+ extensible predicate summaryModelDeprecated (
92
98
string crate , string path , string input , string output , string kind , string provenance ,
93
99
QlBuiltins:: ExtensionId madId
94
100
) ;
@@ -100,27 +106,27 @@ extensible predicate summaryModel(
100
106
*/
101
107
predicate interpretModelForTest ( QlBuiltins:: ExtensionId madId , string model ) {
102
108
exists ( string crate , string path , string output , string kind |
103
- sourceModel ( crate , path , kind , output , _, madId ) and
109
+ sourceModelDeprecated ( crate , path , kind , output , _, madId ) and
104
110
model = "Source: " + crate + "; " + path + "; " + output + "; " + kind
105
111
)
106
112
or
107
113
exists ( string crate , string path , string input , string kind |
108
- sinkModel ( crate , path , kind , input , _, madId ) and
114
+ sinkModelDeprecated ( crate , path , kind , input , _, madId ) and
109
115
model = "Sink: " + crate + "; " + path + "; " + input + "; " + kind
110
116
)
111
117
or
112
118
exists ( string type , string path , string input , string output , string kind |
113
- summaryModel ( type , path , input , output , kind , _, madId ) and
119
+ summaryModelDeprecated ( type , path , input , output , kind , _, madId ) and
114
120
model = "Summary: " + type + "; " + path + "; " + input + "; " + output + "; " + kind
115
121
)
116
122
}
117
123
118
- private class SummarizedCallableFromModel extends SummarizedCallable:: Range {
124
+ private class SummarizedCallableFromModelDeprecated extends SummarizedCallable:: Range {
119
125
private string crate ;
120
126
private string path ;
121
127
122
- SummarizedCallableFromModel ( ) {
123
- summaryModel ( crate , path , _, _, _, _, _) and
128
+ SummarizedCallableFromModelDeprecated ( ) {
129
+ summaryModelDeprecated ( crate , path , _, _, _, _, _) and
124
130
exists ( CallExprBase call , Resolvable r |
125
131
call .getStaticTarget ( ) = this and
126
132
r = CallExprBaseImpl:: getCallResolvable ( call ) and
@@ -133,7 +139,7 @@ private class SummarizedCallableFromModel extends SummarizedCallable::Range {
133
139
string input , string output , boolean preservesValue , string model
134
140
) {
135
141
exists ( string kind , QlBuiltins:: ExtensionId madId |
136
- summaryModel ( crate , path , input , output , kind , _, madId ) and
142
+ summaryModelDeprecated ( crate , path , input , output , kind , _, madId ) and
137
143
model = "MaD:" + madId .toString ( )
138
144
|
139
145
kind = "value" and
@@ -145,35 +151,35 @@ private class SummarizedCallableFromModel extends SummarizedCallable::Range {
145
151
}
146
152
}
147
153
148
- private class FlowSourceFromModel extends FlowSource:: Range {
154
+ private class FlowSourceFromModelDeprecated extends FlowSource:: Range {
149
155
private string crate ;
150
156
private string path ;
151
157
152
- FlowSourceFromModel ( ) {
153
- sourceModel ( crate , path , _, _, _, _) and
158
+ FlowSourceFromModelDeprecated ( ) {
159
+ sourceModelDeprecated ( crate , path , _, _, _, _) and
154
160
this .callResolvesTo ( crate , path )
155
161
}
156
162
157
163
override predicate isSource ( string output , string kind , Provenance provenance , string model ) {
158
164
exists ( QlBuiltins:: ExtensionId madId |
159
- sourceModel ( crate , path , output , kind , provenance , madId ) and
165
+ sourceModelDeprecated ( crate , path , output , kind , provenance , madId ) and
160
166
model = "MaD:" + madId .toString ( )
161
167
)
162
168
}
163
169
}
164
170
165
- private class FlowSinkFromModel extends FlowSink:: Range {
171
+ private class FlowSinkFromModelDeprecated extends FlowSink:: Range {
166
172
private string crate ;
167
173
private string path ;
168
174
169
- FlowSinkFromModel ( ) {
170
- sinkModel ( crate , path , _, _, _, _) and
175
+ FlowSinkFromModelDeprecated ( ) {
176
+ sinkModelDeprecated ( crate , path , _, _, _, _) and
171
177
this .callResolvesTo ( crate , path )
172
178
}
173
179
174
180
override predicate isSink ( string input , string kind , Provenance provenance , string model ) {
175
181
exists ( QlBuiltins:: ExtensionId madId |
176
- sinkModel ( crate , path , input , kind , provenance , madId ) and
182
+ sinkModelDeprecated ( crate , path , input , kind , provenance , madId ) and
177
183
model = "MaD:" + madId .toString ( )
178
184
)
179
185
}
0 commit comments