File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed
swift/ql/src/queries/Security/CWE-311 Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -93,10 +93,9 @@ class CleartextStorageConfig extends TaintTracking::Configuration {
93
93
// for example in `realmObj.data = sensitive`.
94
94
isSink ( node ) and
95
95
exists ( ClassOrStructDecl cd , IterableDeclContext cx |
96
- ( cx = cd or cx .( ExtensionDecl ) .getExtendedTypeDecl ( ) = cd ) and
97
- c .getAReadContent ( ) .( DataFlow:: Content:: FieldContent ) .getField ( ) = cx .getAMember ( ) and
98
- // TODO: add a `getAMember` version that accounts for extensions?
99
- cd .getABaseTypeDecl * ( ) .getName ( ) = [ "NSManagedObject" , "RealmSwiftObject" ]
96
+ cd .getABaseTypeDecl * ( ) .getName ( ) = [ "NSManagedObject" , "RealmSwiftObject" ] and
97
+ cx .getNominalTypeDecl ( ) = cd and
98
+ c .getAReadContent ( ) .( DataFlow:: Content:: FieldContent ) .getField ( ) = cx .getAMember ( )
100
99
)
101
100
or
102
101
// any default implicit reads
You can’t perform that action at this time.
0 commit comments