@@ -5,7 +5,7 @@ private import Common
55/**
66 * An extensible kind of taint representing an externally controlled string.
77 */
8- abstract class ExternalStringKind extends StringKind {
8+ abstract deprecated class ExternalStringKind extends StringKind {
99 bindingset [ this ]
1010 ExternalStringKind ( ) { this = this }
1111
@@ -30,15 +30,15 @@ abstract class ExternalStringKind extends StringKind {
3030}
3131
3232/** A kind of "taint", representing a sequence, with a "taint" member */
33- class ExternalStringSequenceKind extends SequenceKind {
33+ deprecated class ExternalStringSequenceKind extends SequenceKind {
3434 ExternalStringSequenceKind ( ) { this .getItem ( ) instanceof ExternalStringKind }
3535}
3636
3737/**
3838 * An hierachical dictionary or list where the entire structure is externally controlled
3939 * This is typically a parsed JSON object.
4040 */
41- class ExternalJsonKind extends TaintKind {
41+ deprecated class ExternalJsonKind extends TaintKind {
4242 ExternalJsonKind ( ) { this = "json[" + any ( ExternalStringKind key ) + "]" }
4343
4444 /** Gets the taint kind for item in this sequence */
@@ -61,20 +61,20 @@ class ExternalJsonKind extends TaintKind {
6161}
6262
6363/** A kind of "taint", representing a dictionary mapping keys to tainted strings. */
64- class ExternalStringDictKind extends DictKind {
64+ deprecated class ExternalStringDictKind extends DictKind {
6565 ExternalStringDictKind ( ) { this .getValue ( ) instanceof ExternalStringKind }
6666}
6767
6868/**
6969 * A kind of "taint", representing a dictionary mapping keys to sequences of
7070 * tainted strings.
7171 */
72- class ExternalStringSequenceDictKind extends DictKind {
72+ deprecated class ExternalStringSequenceDictKind extends DictKind {
7373 ExternalStringSequenceDictKind ( ) { this .getValue ( ) instanceof ExternalStringSequenceKind }
7474}
7575
7676/** TaintKind for the result of `urlsplit(tainted_string)` */
77- class ExternalUrlSplitResult extends ExternalStringSequenceKind {
77+ deprecated class ExternalUrlSplitResult extends ExternalStringSequenceKind {
7878 // https://docs.python.org/3/library/urllib.parse.html#urllib.parse.urlsplit
7979 override TaintKind getTaintOfAttribute ( string name ) {
8080 result = super .getTaintOfAttribute ( name )
@@ -103,7 +103,7 @@ class ExternalUrlSplitResult extends ExternalStringSequenceKind {
103103}
104104
105105/** TaintKind for the result of `urlparse(tainted_string)` */
106- class ExternalUrlParseResult extends ExternalStringSequenceKind {
106+ deprecated class ExternalUrlParseResult extends ExternalStringSequenceKind {
107107 // https://docs.python.org/3/library/urllib.parse.html#urllib.parse.urlparse
108108 override TaintKind getTaintOfAttribute ( string name ) {
109109 result = super .getTaintOfAttribute ( name )
@@ -134,20 +134,20 @@ class ExternalUrlParseResult extends ExternalStringSequenceKind {
134134
135135/* Helper for getTaintForStep() */
136136pragma [ noinline]
137- private predicate json_subscript_taint (
137+ deprecated deprecated private predicate json_subscript_taint (
138138 SubscriptNode sub , ControlFlowNode obj , ExternalJsonKind seq , TaintKind key
139139) {
140140 sub .isLoad ( ) and
141141 sub .getObject ( ) = obj and
142142 key = seq .getValue ( )
143143}
144144
145- private predicate json_load ( ControlFlowNode fromnode , CallNode tonode ) {
145+ deprecated private predicate json_load ( ControlFlowNode fromnode , CallNode tonode ) {
146146 tonode = Value:: named ( "json.loads" ) .getACall ( ) and
147147 tonode .getArg ( 0 ) = fromnode
148148}
149149
150- private predicate urlsplit ( ControlFlowNode fromnode , CallNode tonode ) {
150+ deprecated private predicate urlsplit ( ControlFlowNode fromnode , CallNode tonode ) {
151151 // This could be implemented as `exists(FunctionValue` without the explicit six part,
152152 // but then our tests will need to import +100 modules, so for now this slightly
153153 // altered version gets to live on.
@@ -166,7 +166,7 @@ private predicate urlsplit(ControlFlowNode fromnode, CallNode tonode) {
166166 )
167167}
168168
169- private predicate urlparse ( ControlFlowNode fromnode , CallNode tonode ) {
169+ deprecated private predicate urlparse ( ControlFlowNode fromnode , CallNode tonode ) {
170170 // This could be implemented as `exists(FunctionValue` without the explicit six part,
171171 // but then our tests will need to import +100 modules, so for now this slightly
172172 // altered version gets to live on.
@@ -185,7 +185,7 @@ private predicate urlparse(ControlFlowNode fromnode, CallNode tonode) {
185185 )
186186}
187187
188- private predicate parse_qs ( ControlFlowNode fromnode , CallNode tonode ) {
188+ deprecated private predicate parse_qs ( ControlFlowNode fromnode , CallNode tonode ) {
189189 // This could be implemented as `exists(FunctionValue` without the explicit six part,
190190 // but then our tests will need to import +100 modules, so for now this slightly
191191 // altered version gets to live on.
@@ -211,7 +211,7 @@ private predicate parse_qs(ControlFlowNode fromnode, CallNode tonode) {
211211 )
212212}
213213
214- private predicate parse_qsl ( ControlFlowNode fromnode , CallNode tonode ) {
214+ deprecated private predicate parse_qsl ( ControlFlowNode fromnode , CallNode tonode ) {
215215 // This could be implemented as `exists(FunctionValue` without the explicit six part,
216216 // but then our tests will need to import +100 modules, so for now this slightly
217217 // altered version gets to live on.
@@ -238,7 +238,7 @@ private predicate parse_qsl(ControlFlowNode fromnode, CallNode tonode) {
238238}
239239
240240/** A kind of "taint", representing an open file-like object from an external source. */
241- class ExternalFileObject extends TaintKind {
241+ deprecated class ExternalFileObject extends TaintKind {
242242 ExternalStringKind valueKind ;
243243
244244 ExternalFileObject ( ) { this = "file[" + valueKind + "]" }
@@ -266,7 +266,7 @@ class ExternalFileObject extends TaintKind {
266266 * - `if splitres.netloc == "KNOWN_VALUE"`
267267 * - `if splitres[0] == "KNOWN_VALUE"`
268268 */
269- class UrlsplitUrlparseTempSanitizer extends Sanitizer {
269+ deprecated class UrlsplitUrlparseTempSanitizer extends Sanitizer {
270270 // TODO: remove this once we have better support for named tuples
271271 UrlsplitUrlparseTempSanitizer ( ) { this = "UrlsplitUrlparseTempSanitizer" }
272272
0 commit comments