mirror of
https://github.com/github/codeql.git
synced 2026-04-25 16:55:19 +02:00
Swift: Rename clashing CleartextStorage modules.
This commit is contained in:
@@ -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>;
|
||||
|
||||
@@ -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>;
|
||||
|
||||
@@ -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() +
|
||||
|
||||
@@ -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 " +
|
||||
|
||||
Reference in New Issue
Block a user