Swift/CleartextStoragePreferencesQuery

swift/ql/src/queries/Security/CWE-312/CleartextStoragePreferences.ql
This commit is contained in:
Nora Dimitrijević
2025-10-14 14:55:28 +02:00
parent 2332cea330
commit c190fae737

View File

@@ -34,12 +34,9 @@ module CleartextStoragePreferencesConfig implements DataFlow::ConfigSig {
predicate observeDiffInformedIncrementalMode() { any() } predicate observeDiffInformedIncrementalMode() { any() }
Location getASelectedSinkLocation(DataFlow::Node sink) { Location getASelectedSinkLocation(DataFlow::Node sink) {
exists(DataFlow::Node cleanSink | result = cleanSink.getLocation() | result = sink.(CleartextStoragePreferencesSink).getLocation()
cleanSink = sink.(DataFlow::PostUpdateNode).getPreUpdateNode() or
or result = sink.(DataFlow::PostUpdateNode).getPreUpdateNode().getLocation()
not sink instanceof DataFlow::PostUpdateNode and
cleanSink = sink
)
} }
} }