@@ -45,7 +45,7 @@ class SecurityOptions extends string {
45
45
/**
46
46
* The argument of the given function is filled in from user input.
47
47
*/
48
- predicate userInputArgument ( FunctionCall functionCall , int arg ) {
48
+ deprecated predicate userInputArgument ( FunctionCall functionCall , int arg ) {
49
49
exists ( string fname |
50
50
functionCall .getTarget ( ) .hasGlobalOrStdName ( fname ) and
51
51
exists ( functionCall .getArgument ( arg ) ) and
@@ -73,7 +73,7 @@ class SecurityOptions extends string {
73
73
/**
74
74
* The return value of the given function is filled in from user input.
75
75
*/
76
- predicate userInputReturned ( FunctionCall functionCall ) {
76
+ deprecated predicate userInputReturned ( FunctionCall functionCall ) {
77
77
exists ( string fname |
78
78
functionCall .getTarget ( ) .getName ( ) = fname and
79
79
(
@@ -91,12 +91,8 @@ class SecurityOptions extends string {
91
91
92
92
/**
93
93
* DEPRECATED: Users should override `userInputReturned()` instead.
94
- *
95
- * note: this function is not formally tagged as `deprecated` since the
96
- * new `userInputReturned` uses it to provide compatibility with older
97
- * custom SecurityOptions.qll files.
98
94
*/
99
- predicate userInputReturn ( string function ) { none ( ) }
95
+ deprecated predicate userInputReturn ( string function ) { none ( ) }
100
96
101
97
/**
102
98
* The argument of the given function is used for running a process or loading
@@ -117,7 +113,7 @@ class SecurityOptions extends string {
117
113
* computed from user input. Such expressions are treated as
118
114
* sources of taint.
119
115
*/
120
- predicate isUserInput ( Expr expr , string cause ) {
116
+ deprecated predicate isUserInput ( Expr expr , string cause ) {
121
117
exists ( FunctionCall fc , int i |
122
118
this .userInputArgument ( fc , i ) and
123
119
expr = fc .getArgument ( i ) and
@@ -178,17 +174,17 @@ predicate argv(Parameter argv) {
178
174
predicate isPureFunction ( string name ) { exists ( SecurityOptions opts | opts .isPureFunction ( name ) ) }
179
175
180
176
/** Convenience accessor for SecurityOptions.userInputArgument */
181
- predicate userInputArgument ( FunctionCall functionCall , int arg ) {
177
+ deprecated predicate userInputArgument ( FunctionCall functionCall , int arg ) {
182
178
exists ( SecurityOptions opts | opts .userInputArgument ( functionCall , arg ) )
183
179
}
184
180
185
181
/** Convenience accessor for SecurityOptions.userInputReturn */
186
- predicate userInputReturned ( FunctionCall functionCall ) {
182
+ deprecated predicate userInputReturned ( FunctionCall functionCall ) {
187
183
exists ( SecurityOptions opts | opts .userInputReturned ( functionCall ) )
188
184
}
189
185
190
186
/** Convenience accessor for SecurityOptions.isUserInput */
191
- predicate isUserInput ( Expr expr , string cause ) {
187
+ deprecated predicate isUserInput ( Expr expr , string cause ) {
192
188
exists ( SecurityOptions opts | opts .isUserInput ( expr , cause ) )
193
189
}
194
190
0 commit comments