@@ -49,22 +49,7 @@ private import codeql.rust.dataflow.FlowSource
49
49
private import codeql.rust.dataflow.FlowSink
50
50
private import codeql.rust.elements.internal.CallExprBaseImpl:: Impl as CallExprBaseImpl
51
51
52
- /**
53
- * DEPRECATED: Do not use.
54
- *
55
- * Holds if in a call to the function with canonical path `path`, defined in the
56
- * crate `crate`, the value referred to by `output` is a flow source of the given
57
- * `kind`.
58
- *
59
- * `output = "ReturnValue"` simply means the result of the call itself.
60
- *
61
- * For more information on the `kind` parameter, see
62
- * https://github.com/github/codeql/blob/main/docs/codeql/reusables/threat-model-description.rst.
63
- */
64
- extensible predicate sourceModelDeprecated (
65
- string crate , string path , string output , string kind , string provenance ,
66
- QlBuiltins:: ExtensionId madId
67
- ) ;
52
+
68
53
69
54
/**
70
55
* Holds if in a call to the function with canonical path `path`, the value referred
@@ -79,23 +64,7 @@ extensible predicate sourceModel(
79
64
string path , string output , string kind , string provenance , QlBuiltins:: ExtensionId madId
80
65
) ;
81
66
82
- /**
83
- * DEPRECATED: Do not use.
84
- *
85
- * Holds if in a call to the function with canonical path `path`, defined in the
86
- * crate `crate`, the value referred to by `input` is a flow sink of the given
87
- * `kind`.
88
- *
89
- * For example, `input = Argument[0]` means the first argument of the call.
90
- *
91
- * The following kinds are supported:
92
- *
93
- * - `sql-injection`: a flow sink for SQL injection.
94
- */
95
- extensible predicate sinkModelDeprecated (
96
- string crate , string path , string input , string kind , string provenance ,
97
- QlBuiltins:: ExtensionId madId
98
- ) ;
67
+
99
68
100
69
/**
101
70
* Holds if in a call to the function with canonical path `path`, the value referred
@@ -111,20 +80,7 @@ extensible predicate sinkModel(
111
80
string path , string input , string kind , string provenance , QlBuiltins:: ExtensionId madId
112
81
) ;
113
82
114
- /**
115
- * DEPRECATED: Do not use.
116
- *
117
- * Holds if in a call to the function with canonical path `path`, defined in the
118
- * crate `crate`, the value referred to by `input` can flow to the value referred
119
- * to by `output`.
120
- *
121
- * `kind` should be either `value` or `taint`, for value-preserving or taint-preserving
122
- * steps, respectively.
123
- */
124
- extensible predicate summaryModelDeprecated (
125
- string crate , string path , string input , string output , string kind , string provenance ,
126
- QlBuiltins:: ExtensionId madId
127
- ) ;
83
+
128
84
129
85
/**
130
86
* Holds if in a call to the function with canonical path `path`, the value referred
@@ -144,66 +100,23 @@ extensible predicate summaryModel(
144
100
* This predicate should only be used in tests.
145
101
*/
146
102
predicate interpretModelForTest ( QlBuiltins:: ExtensionId madId , string model ) {
147
- exists ( string crate , string path , string output , string kind |
148
- sourceModelDeprecated ( crate , path , output , kind , _, madId ) and
149
- model = "Source: " + crate + "; " + path + "; " + output + "; " + kind
150
- )
151
- or
152
103
exists ( string path , string output , string kind |
153
104
sourceModel ( path , output , kind , _, madId ) and
154
105
model = "Source: " + path + "; " + output + "; " + kind
155
106
)
156
107
or
157
- exists ( string crate , string path , string input , string kind |
158
- sinkModelDeprecated ( crate , path , input , kind , _, madId ) and
159
- model = "Sink: " + crate + "; " + path + "; " + input + "; " + kind
160
- )
161
- or
162
108
exists ( string path , string input , string kind |
163
109
sinkModel ( path , input , kind , _, madId ) and
164
110
model = "Sink: " + path + "; " + input + "; " + kind
165
111
)
166
112
or
167
- exists ( string type , string path , string input , string output , string kind |
168
- summaryModelDeprecated ( type , path , input , output , kind , _, madId ) and
169
- model = "Summary: " + type + "; " + path + "; " + input + "; " + output + "; " + kind
170
- )
171
- or
172
113
exists ( string path , string input , string output , string kind |
173
114
summaryModel ( path , input , output , kind , _, madId ) and
174
115
model = "Summary: " + path + "; " + input + "; " + output + "; " + kind
175
116
)
176
117
}
177
118
178
- private class SummarizedCallableFromModelDeprecated extends SummarizedCallable:: Range {
179
- private string crate ;
180
- private string path ;
181
-
182
- SummarizedCallableFromModelDeprecated ( ) {
183
- summaryModelDeprecated ( crate , path , _, _, _, _, _) and
184
- exists ( CallExprBase call , Resolvable r |
185
- call .getStaticTarget ( ) = this and
186
- r = CallExprBaseImpl:: getCallResolvable ( call ) and
187
- r .getResolvedPath ( ) = path and
188
- r .getResolvedCrateOrigin ( ) = crate
189
- )
190
- }
191
119
192
- override predicate propagatesFlow (
193
- string input , string output , boolean preservesValue , string model
194
- ) {
195
- exists ( string kind , QlBuiltins:: ExtensionId madId |
196
- summaryModelDeprecated ( crate , path , input , output , kind , _, madId ) and
197
- model = "MaD:" + madId .toString ( )
198
- |
199
- kind = "value" and
200
- preservesValue = true
201
- or
202
- kind = "taint" and
203
- preservesValue = false
204
- )
205
- }
206
- }
207
120
208
121
private class SummarizedCallableFromModel extends SummarizedCallable:: Range {
209
122
private string path ;
@@ -233,22 +146,7 @@ private class SummarizedCallableFromModel extends SummarizedCallable::Range {
233
146
}
234
147
}
235
148
236
- private class FlowSourceFromModelDeprecated extends FlowSource:: Range {
237
- private string crate ;
238
- private string path ;
239
-
240
- FlowSourceFromModelDeprecated ( ) {
241
- sourceModelDeprecated ( crate , path , _, _, _, _) and
242
- this .callResolvesTo ( crate , path )
243
- }
244
149
245
- override predicate isSource ( string output , string kind , Provenance provenance , string model ) {
246
- exists ( QlBuiltins:: ExtensionId madId |
247
- sourceModelDeprecated ( crate , path , output , kind , provenance , madId ) and
248
- model = "MaD:" + madId .toString ( )
249
- )
250
- }
251
- }
252
150
253
151
private class FlowSourceFromModel extends FlowSource:: Range {
254
152
private string path ;
@@ -266,22 +164,7 @@ private class FlowSourceFromModel extends FlowSource::Range {
266
164
}
267
165
}
268
166
269
- private class FlowSinkFromModelDeprecated extends FlowSink:: Range {
270
- private string crate ;
271
- private string path ;
272
-
273
- FlowSinkFromModelDeprecated ( ) {
274
- sinkModelDeprecated ( crate , path , _, _, _, _) and
275
- this .callResolvesTo ( crate , path )
276
- }
277
167
278
- override predicate isSink ( string input , string kind , Provenance provenance , string model ) {
279
- exists ( QlBuiltins:: ExtensionId madId |
280
- sinkModelDeprecated ( crate , path , input , kind , provenance , madId ) and
281
- model = "MaD:" + madId .toString ( )
282
- )
283
- }
284
- }
285
168
286
169
private class FlowSinkFromModel extends FlowSink:: Range {
287
170
private string path ;
0 commit comments