File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed
swift/ql/src/queries/Security/CWE-311 Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -18,12 +18,12 @@ import codeql.swift.dataflow.TaintTracking
1818import DataFlow:: PathGraph
1919
2020/**
21- * An `Expr ` that is stored in a local database.
21+ * A `DataFlow::Node ` that is something stored in a local database.
2222 */
2323abstract class Stored extends DataFlow:: Node { }
2424
2525/**
26- * An `Expr ` that is stored with the Core Data library.
26+ * A `DataFlow::Node ` that is an expression stored with the Core Data library.
2727 */
2828class CoreDataStore extends Stored {
2929 CoreDataStore ( ) {
@@ -39,16 +39,17 @@ class CoreDataStore extends Stored {
3939}
4040
4141/**
42- * An `Expr` that is stored with the Realm database library.
42+ * A `DataFlow::Node` that is an expression stored with the Realm database
43+ * library.
4344 */
44- class RealmStore extends Stored {
45+ class RealmStore extends Stored instanceof DataFlow :: PostUpdateNode {
4546 RealmStore ( ) {
4647 // any write into a class derived from `RealmSwiftObject` is a sink. For
4748 // example in `realmObj.data = sensitive` the post-update node corresponding
4849 // with `realmObj.data` is a sink.
4950 exists ( ClassDecl cd , Expr e |
5051 cd .getABaseTypeDecl * ( ) .getName ( ) = "RealmSwiftObject" and
51- this .( DataFlow :: PostUpdateNode ) . getPreUpdateNode ( ) .asExpr ( ) = e and
52+ this .getPreUpdateNode ( ) .asExpr ( ) = e and
5253 e .getFullyConverted ( ) .getType ( ) = cd .getType ( ) and
5354 not e .( DeclRefExpr ) .getDecl ( ) instanceof SelfParamDecl
5455 )
You can’t perform that action at this time.
0 commit comments