Swift/CleartextStorageDatabaseQuery

swift/ql/src/queries/Security/CWE-311/CleartextStorageDatabase.ql
This commit is contained in:
Nora Dimitrijević
2025-10-14 14:51:42 +02:00
parent 462d8c5dc4
commit 2332cea330

View File

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