@@ -9,46 +9,6 @@ import codeql.swift.dataflow.DataFlow
99import codeql.swift.dataflow.TaintTracking
1010import codeql.swift.security.CleartextStorageDatabaseExtensions
1111
12- /**
13- * A taint configuration from sensitive information to expressions that are
14- * transmitted over a network.
15- */
16- deprecated class CleartextStorageConfig extends TaintTracking:: Configuration {
17- CleartextStorageConfig ( ) { this = "CleartextStorageConfig" }
18-
19- override predicate isSource ( DataFlow:: Node node ) { node .asExpr ( ) instanceof SensitiveExpr }
20-
21- override predicate isSink ( DataFlow:: Node node ) { node instanceof CleartextStorageDatabaseSink }
22-
23- override predicate isSanitizer ( DataFlow:: Node sanitizer ) {
24- sanitizer instanceof CleartextStorageDatabaseSanitizer
25- }
26-
27- override predicate isAdditionalTaintStep ( DataFlow:: Node nodeFrom , DataFlow:: Node nodeTo ) {
28- any ( CleartextStorageDatabaseAdditionalTaintStep s ) .step ( nodeFrom , nodeTo )
29- }
30-
31- override predicate isSanitizerIn ( DataFlow:: Node node ) {
32- // make sources barriers so that we only report the closest instance
33- isSource ( node )
34- }
35-
36- override predicate allowImplicitRead ( DataFlow:: Node node , DataFlow:: ContentSet c ) {
37- // flow out from fields of an `NSManagedObject` or `RealmSwiftObject` at the sink,
38- // for example in `realmObj.data = sensitive`.
39- isSink ( node ) and
40- exists ( NominalTypeDecl d , Decl cx |
41- d .getType ( ) .getABaseType * ( ) .getUnderlyingType ( ) .getName ( ) =
42- [ "NSManagedObject" , "RealmSwiftObject" ] and
43- cx .asNominalTypeDecl ( ) = d and
44- c .getAReadContent ( ) .( DataFlow:: Content:: FieldContent ) .getField ( ) = cx .getAMember ( )
45- )
46- or
47- // any default implicit reads
48- super .allowImplicitRead ( node , c )
49- }
50- }
51-
5212/**
5313 * A taint configuration from sensitive information to expressions that are
5414 * transmitted over a network.
0 commit comments