Skip to content

Commit 6dffd73

Browse files
committed
Swift: CleartextStorageDatabase
1 parent 5ad6978 commit 6dffd73

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

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

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,15 @@ module CleartextStorageDatabaseConfig implements DataFlow::ConfigSig {
4949
c.getAReadContent().(DataFlow::Content::TupleContent).getIndex() = 1
5050
}
5151

52-
predicate observeDiffInformedIncrementalMode() {
53-
any() // TODO: Make sure that the location overrides match the query's select clause: Column 1 does not select a source or sink originating from the flow call on line 33 (/Users/d10c/src/semmle-code/ql/swift/ql/src/queries/Security/CWE-311/CleartextStorageDatabase.ql@35:8:35:16)
52+
predicate observeDiffInformedIncrementalMode() { any() }
53+
54+
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+
)
5461
}
5562
}
5663

0 commit comments

Comments
 (0)