Skip to content

Commit a7252ef

Browse files
committed
Swift/CleartextStoragePreferencesQuery
swift/ql/src/queries/Security/CWE-312/CleartextStoragePreferences.ql
1 parent 6e07d65 commit a7252ef

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

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

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -34,12 +34,9 @@ module CleartextStoragePreferencesConfig implements DataFlow::ConfigSig {
3434
predicate observeDiffInformedIncrementalMode() { any() }
3535

3636
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-
)
37+
result = sink.(CleartextStoragePreferencesSink).getLocation()
38+
or
39+
result = sink.(DataFlow::PostUpdateNode).getPreUpdateNode().getLocation()
4340
}
4441
}
4542

0 commit comments

Comments
 (0)