Skip to content

Commit d3250a7

Browse files
committed
Swift: Fix finding base classes.
1 parent 92a927e commit d3250a7

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

swift/ql/src/queries/Security/CWE-311/CleartextStorageDatabase.ql

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,8 +89,7 @@ class CleartextStorageConfig extends TaintTracking::Configuration {
8989
isSink(node) and
9090
exists(ClassDecl cd |
9191
c.getAReadContent().(DataFlow::Content::FieldContent).getField() = cd.getAMember() and
92-
cd.getName() = ["RealmSwiftObject", "MyRealmSwiftObject"]
93-
// TODO: should be cd.getParent*().getName() = "RealmSwiftObject"
92+
cd.getType().(NominalType).getABaseType*().getName() = "RealmSwiftObject"
9493
)
9594
or
9695
// any default implicit reads

0 commit comments

Comments
 (0)