Skip to content

Commit c5f1e06

Browse files
committed
Swift: CleartextStoragePreferences
1 parent 18fbdb7 commit c5f1e06

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

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

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,15 @@ module CleartextStoragePreferencesConfig implements DataFlow::ConfigSig {
3131
isSource(node)
3232
}
3333

34-
predicate observeDiffInformedIncrementalMode() {
35-
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 32 (/Users/d10c/src/semmle-code/ql/swift/ql/src/queries/Security/CWE-312/CleartextStoragePreferences.ql@34:8:34:16)
34+
predicate observeDiffInformedIncrementalMode() { any() }
35+
36+
Location getASelectedSinkLocation(DataFlow::Node sink) {
37+
exists(DataFlow::Node cleanSink | result = cleanSink.getLocation() |
38+
cleanSink = sink.(DataFlow::PostUpdateNode).getPreUpdateNode()
39+
or
40+
not sink instanceof DataFlow::PostUpdateNode and
41+
cleanSink = sink
42+
)
3643
}
3744
}
3845

0 commit comments

Comments
 (0)