@@ -28,7 +28,7 @@ abstract class Stored extends DataFlow::Node { }
2828class CoreDataStore extends Stored {
2929 CoreDataStore ( ) {
3030 // `content` arg to `NWConnection.send` is a sink
31- exists ( ClassDecl c , AbstractFunctionDecl f , CallExpr call |
31+ exists ( ClassOrStructDecl c , AbstractFunctionDecl f , CallExpr call |
3232 c .getName ( ) = "NSManagedObject" and
3333 c .getAMember ( ) = f and
3434 f .getName ( ) = [ "setValue(_:forKey:)" , "setPrimitiveValue(_:forKey:)" ] and
@@ -47,7 +47,7 @@ class RealmStore extends Stored instanceof DataFlow::PostUpdateNode {
4747 // any write into a class derived from `RealmSwiftObject` is a sink. For
4848 // example in `realmObj.data = sensitive` the post-update node corresponding
4949 // with `realmObj.data` is a sink.
50- exists ( ClassDecl cd , Expr e |
50+ exists ( ClassOrStructDecl cd , Expr e |
5151 cd .getABaseTypeDecl * ( ) .getName ( ) = "RealmSwiftObject" and
5252 this .getPreUpdateNode ( ) .asExpr ( ) = e and
5353 e .getFullyConverted ( ) .getType ( ) = cd .getType ( ) and
@@ -81,7 +81,7 @@ class CleartextStorageConfig extends TaintTracking::Configuration {
8181 // flow out from fields of a `RealmSwiftObject` at the sink, for example in
8282 // `realmObj.data = sensitive`.
8383 isSink ( node ) and
84- exists ( ClassDecl cd |
84+ exists ( ClassOrStructDecl cd |
8585 c .getAReadContent ( ) .( DataFlow:: Content:: FieldContent ) .getField ( ) = cd .getAMember ( ) and
8686 cd .getABaseTypeDecl * ( ) .getName ( ) = "RealmSwiftObject"
8787 )
0 commit comments