@@ -50,6 +50,8 @@ private import codeql.rust.dataflow.FlowSink
5050private import codeql.rust.elements.internal.CallExprBaseImpl:: Impl as CallExprBaseImpl
5151
5252/**
53+ * DEPRECATED: Do not use.
54+ *
5355 * Holds if in a call to the function with canonical path `path`, defined in the
5456 * crate `crate`, the value referred to by `output` is a flow source of the given
5557 * `kind`.
@@ -59,12 +61,14 @@ private import codeql.rust.elements.internal.CallExprBaseImpl::Impl as CallExprB
5961 * For more information on the `kind` parameter, see
6062 * https://github.com/github/codeql/blob/main/docs/codeql/reusables/threat-model-description.rst.
6163 */
62- extensible predicate sourceModel (
64+ extensible predicate sourceModelDeprecated (
6365 string crate , string path , string output , string kind , string provenance ,
6466 QlBuiltins:: ExtensionId madId
6567) ;
6668
6769/**
70+ * DEPRECATED: Do not use.
71+ *
6872 * Holds if in a call to the function with canonical path `path`, defined in the
6973 * crate `crate`, the value referred to by `input` is a flow sink of the given
7074 * `kind`.
@@ -75,20 +79,22 @@ extensible predicate sourceModel(
7579 *
7680 * - `sql-injection`: a flow sink for SQL injection.
7781 */
78- extensible predicate sinkModel (
82+ extensible predicate sinkModelDeprecated (
7983 string crate , string path , string input , string kind , string provenance ,
8084 QlBuiltins:: ExtensionId madId
8185) ;
8286
8387/**
88+ * DEPRECATED: Do not use.
89+ *
8490 * Holds if in a call to the function with canonical path `path`, defined in the
8591 * crate `crate`, the value referred to by `input` can flow to the value referred
8692 * to by `output`.
8793 *
8894 * `kind` should be either `value` or `taint`, for value-preserving or taint-preserving
8995 * steps, respectively.
9096 */
91- extensible predicate summaryModel (
97+ extensible predicate summaryModelDeprecated (
9298 string crate , string path , string input , string output , string kind , string provenance ,
9399 QlBuiltins:: ExtensionId madId
94100) ;
@@ -100,27 +106,27 @@ extensible predicate summaryModel(
100106 */
101107predicate interpretModelForTest ( QlBuiltins:: ExtensionId madId , string model ) {
102108 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
104110 model = "Source: " + crate + "; " + path + "; " + output + "; " + kind
105111 )
106112 or
107113 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
109115 model = "Sink: " + crate + "; " + path + "; " + input + "; " + kind
110116 )
111117 or
112118 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
114120 model = "Summary: " + type + "; " + path + "; " + input + "; " + output + "; " + kind
115121 )
116122}
117123
118- private class SummarizedCallableFromModel extends SummarizedCallable:: Range {
124+ private class SummarizedCallableFromModelDeprecated extends SummarizedCallable:: Range {
119125 private string crate ;
120126 private string path ;
121127
122- SummarizedCallableFromModel ( ) {
123- summaryModel ( crate , path , _, _, _, _, _) and
128+ SummarizedCallableFromModelDeprecated ( ) {
129+ summaryModelDeprecated ( crate , path , _, _, _, _, _) and
124130 exists ( CallExprBase call , Resolvable r |
125131 call .getStaticTarget ( ) = this and
126132 r = CallExprBaseImpl:: getCallResolvable ( call ) and
@@ -133,7 +139,7 @@ private class SummarizedCallableFromModel extends SummarizedCallable::Range {
133139 string input , string output , boolean preservesValue , string model
134140 ) {
135141 exists ( string kind , QlBuiltins:: ExtensionId madId |
136- summaryModel ( crate , path , input , output , kind , _, madId ) and
142+ summaryModelDeprecated ( crate , path , input , output , kind , _, madId ) and
137143 model = "MaD:" + madId .toString ( )
138144 |
139145 kind = "value" and
@@ -145,35 +151,35 @@ private class SummarizedCallableFromModel extends SummarizedCallable::Range {
145151 }
146152}
147153
148- private class FlowSourceFromModel extends FlowSource:: Range {
154+ private class FlowSourceFromModelDeprecated extends FlowSource:: Range {
149155 private string crate ;
150156 private string path ;
151157
152- FlowSourceFromModel ( ) {
153- sourceModel ( crate , path , _, _, _, _) and
158+ FlowSourceFromModelDeprecated ( ) {
159+ sourceModelDeprecated ( crate , path , _, _, _, _) and
154160 this .callResolvesTo ( crate , path )
155161 }
156162
157163 override predicate isSource ( string output , string kind , Provenance provenance , string model ) {
158164 exists ( QlBuiltins:: ExtensionId madId |
159- sourceModel ( crate , path , output , kind , provenance , madId ) and
165+ sourceModelDeprecated ( crate , path , output , kind , provenance , madId ) and
160166 model = "MaD:" + madId .toString ( )
161167 )
162168 }
163169}
164170
165- private class FlowSinkFromModel extends FlowSink:: Range {
171+ private class FlowSinkFromModelDeprecated extends FlowSink:: Range {
166172 private string crate ;
167173 private string path ;
168174
169- FlowSinkFromModel ( ) {
170- sinkModel ( crate , path , _, _, _, _) and
175+ FlowSinkFromModelDeprecated ( ) {
176+ sinkModelDeprecated ( crate , path , _, _, _, _) and
171177 this .callResolvesTo ( crate , path )
172178 }
173179
174180 override predicate isSink ( string input , string kind , Provenance provenance , string model ) {
175181 exists ( QlBuiltins:: ExtensionId madId |
176- sinkModel ( crate , path , input , kind , provenance , madId ) and
182+ sinkModelDeprecated ( crate , path , input , kind , provenance , madId ) and
177183 model = "MaD:" + madId .toString ( )
178184 )
179185 }
0 commit comments