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 {
9393 // for example in `realmObj.data = sensitive`.
9494 isSink ( node ) and
9595 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 ( )
10099 )
101100 or
102101 // any default implicit reads
You can’t perform that action at this time.
0 commit comments