Skip to content

Commit da192f6

Browse files
committed
Swift/CleartextStorageDatabaseQuery
swift/ql/src/queries/Security/CWE-311/CleartextStorageDatabase.ql
1 parent a362113 commit da192f6

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

swift/ql/lib/codeql/swift/security/CleartextStorageDatabaseQuery.qll

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -52,12 +52,9 @@ module CleartextStorageDatabaseConfig implements DataFlow::ConfigSig {
5252
predicate observeDiffInformedIncrementalMode() { any() }
5353

5454
Location getASelectedSinkLocation(DataFlow::Node sink) {
55-
exists(DataFlow::Node cleanSink | result = cleanSink.getLocation() |
56-
cleanSink = sink.(DataFlow::PostUpdateNode).getPreUpdateNode()
57-
or
58-
not sink instanceof DataFlow::PostUpdateNode and
59-
cleanSink = sink
60-
)
55+
result = sink.(CleartextStorageDatabaseSink).getLocation()
56+
or
57+
result = sink.(DataFlow::PostUpdateNode).getPreUpdateNode().getLocation()
6158
}
6259
}
6360

0 commit comments

Comments
 (0)