@@ -49,23 +49,6 @@ 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
- ) ;
68
-
69
52
/**
70
53
* Holds if in a call to the function with canonical path `path`, the value referred
71
54
* to by `output` is a flow source of the given `kind`.
@@ -79,24 +62,6 @@ extensible predicate sourceModel(
79
62
string path , string output , string kind , string provenance , QlBuiltins:: ExtensionId madId
80
63
) ;
81
64
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
- ) ;
99
-
100
65
/**
101
66
* Holds if in a call to the function with canonical path `path`, the value referred
102
67
* to by `input` is a flow sink of the given `kind`.
@@ -111,21 +76,6 @@ extensible predicate sinkModel(
111
76
string path , string input , string kind , string provenance , QlBuiltins:: ExtensionId madId
112
77
) ;
113
78
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
- ) ;
128
-
129
79
/**
130
80
* Holds if in a call to the function with canonical path `path`, the value referred
131
81
* to by `input` can flow to the value referred to by `output`.
@@ -144,67 +94,22 @@ extensible predicate summaryModel(
144
94
* This predicate should only be used in tests.
145
95
*/
146
96
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
97
exists ( string path , string output , string kind |
153
98
sourceModel ( path , output , kind , _, madId ) and
154
99
model = "Source: " + path + "; " + output + "; " + kind
155
100
)
156
101
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
102
exists ( string path , string input , string kind |
163
103
sinkModel ( path , input , kind , _, madId ) and
164
104
model = "Sink: " + path + "; " + input + "; " + kind
165
105
)
166
106
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
107
exists ( string path , string input , string output , string kind |
173
108
summaryModel ( path , input , output , kind , _, madId ) and
174
109
model = "Summary: " + path + "; " + input + "; " + output + "; " + kind
175
110
)
176
111
}
177
112
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
-
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
-
208
113
private class SummarizedCallableFromModel extends SummarizedCallable:: Range {
209
114
private string path ;
210
115
@@ -233,23 +138,6 @@ private class SummarizedCallableFromModel extends SummarizedCallable::Range {
233
138
}
234
139
}
235
140
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
-
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
-
253
141
private class FlowSourceFromModel extends FlowSource:: Range {
254
142
private string path ;
255
143
@@ -266,23 +154,6 @@ private class FlowSourceFromModel extends FlowSource::Range {
266
154
}
267
155
}
268
156
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
-
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
-
286
157
private class FlowSinkFromModel extends FlowSink:: Range {
287
158
private string path ;
288
159
0 commit comments