Swift: Rename clashing CleartextStorage modules.

This commit is contained in:
Geoffrey White
2023-04-19 14:29:25 +01:00
parent 10c222e7e2
commit 4484574301
4 changed files with 10 additions and 10 deletions

View File

@@ -13,7 +13,7 @@ import codeql.swift.security.CleartextStorageDatabaseExtensions
* A taint configuration from sensitive information to expressions that are
* transmitted over a network.
*/
module CleartextStorageConfig implements DataFlow::ConfigSig {
module CleartextStorageDatabaseConfig implements DataFlow::ConfigSig {
predicate isSource(DataFlow::Node node) { node.asExpr() instanceof SensitiveExpr }
predicate isSink(DataFlow::Node node) { node instanceof CleartextStorageDatabaseSink }
@@ -48,4 +48,4 @@ module CleartextStorageConfig implements DataFlow::ConfigSig {
* Detect taint flow of sensitive information to expressions that are
* transmitted over a network.
*/
module CleartextStorageFlow = TaintTracking::Global<CleartextStorageConfig>;
module CleartextStorageDatabaseFlow = TaintTracking::Global<CleartextStorageDatabaseConfig>;

View File

@@ -13,7 +13,7 @@ import codeql.swift.security.CleartextStoragePreferencesExtensions
* A taint configuration from sensitive information to expressions that are
* stored as preferences.
*/
module CleartextStorageConfig implements DataFlow::ConfigSig {
module CleartextStoragePreferencesConfig implements DataFlow::ConfigSig {
predicate isSource(DataFlow::Node node) { node.asExpr() instanceof SensitiveExpr }
predicate isSink(DataFlow::Node node) { node instanceof CleartextStoragePreferencesSink }
@@ -36,4 +36,4 @@ module CleartextStorageConfig implements DataFlow::ConfigSig {
* Detect taint flow of sensitive information to expressions that are stored
* as preferences.
*/
module CleartextStorageFlow = TaintTracking::Global<CleartextStorageConfig>;
module CleartextStoragePreferencesFlow = TaintTracking::Global<CleartextStoragePreferencesConfig>;

View File

@@ -14,7 +14,7 @@
import swift
import codeql.swift.dataflow.DataFlow
import codeql.swift.security.CleartextStorageDatabaseQuery
import CleartextStorageFlow::PathGraph
import CleartextStorageDatabaseFlow::PathGraph
/**
* Gets a prettier node to use in the results.
@@ -27,10 +27,10 @@ DataFlow::Node cleanupNode(DataFlow::Node n) {
}
from
CleartextStorageFlow::PathNode sourceNode, CleartextStorageFlow::PathNode sinkNode,
CleartextStorageDatabaseFlow::PathNode sourceNode, CleartextStorageDatabaseFlow::PathNode sinkNode,
DataFlow::Node cleanSink
where
CleartextStorageFlow::flowPath(sourceNode, sinkNode) and
CleartextStorageDatabaseFlow::flowPath(sourceNode, sinkNode) and
cleanSink = cleanupNode(sinkNode.getNode())
select cleanSink, sourceNode, sinkNode,
"This operation stores '" + cleanSink.toString() +

View File

@@ -13,7 +13,7 @@
import swift
import codeql.swift.dataflow.DataFlow
import codeql.swift.security.CleartextStoragePreferencesQuery
import CleartextStorageFlow::PathGraph
import CleartextStoragePreferencesFlow::PathGraph
/**
* Gets a prettier node to use in the results.
@@ -26,10 +26,10 @@ DataFlow::Node cleanupNode(DataFlow::Node n) {
}
from
CleartextStorageFlow::PathNode sourceNode, CleartextStorageFlow::PathNode sinkNode,
CleartextStoragePreferencesFlow::PathNode sourceNode, CleartextStoragePreferencesFlow::PathNode sinkNode,
DataFlow::Node cleanSink
where
CleartextStorageFlow::flowPath(sourceNode, sinkNode) and
CleartextStoragePreferencesFlow::flowPath(sourceNode, sinkNode) and
cleanSink = cleanupNode(sinkNode.getNode())
select cleanSink, sourceNode, sinkNode,
"This operation stores '" + cleanSink.toString() + "' in " +