@@ -13,47 +13,7 @@ import codeql.swift.security.CleartextStorageDatabaseExtensions
1313 * A taint configuration from sensitive information to expressions that are
1414 * transmitted over a network.
1515 */
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-
52- /**
53- * A taint configuration from sensitive information to expressions that are
54- * transmitted over a network.
55- */
56- module CleartextStorageConfig implements DataFlow:: ConfigSig {
16+ module CleartextStorageDatabaseConfig implements DataFlow:: ConfigSig {
5717 predicate isSource ( DataFlow:: Node node ) { node .asExpr ( ) instanceof SensitiveExpr }
5818
5919 predicate isSink ( DataFlow:: Node node ) { node instanceof CleartextStorageDatabaseSink }
@@ -88,4 +48,4 @@ module CleartextStorageConfig implements DataFlow::ConfigSig {
8848 * Detect taint flow of sensitive information to expressions that are
8949 * transmitted over a network.
9050 */
91- module CleartextStorageFlow = TaintTracking:: Global< CleartextStorageConfig > ;
51+ module CleartextStorageDatabaseFlow = TaintTracking:: Global< CleartextStorageDatabaseConfig > ;
0 commit comments