mirror of
https://github.com/github/codeql.git
synced 2026-04-30 19:26:02 +02:00
Python/Ruby/Swift: Rename references.
This commit is contained in:
@@ -112,7 +112,7 @@ module InsecureContextConfiguration2 implements DataFlow::StateConfigSig {
|
||||
}
|
||||
}
|
||||
|
||||
private module InsecureContextFlow = DataFlow::MakeWithState<InsecureContextConfiguration2>;
|
||||
private module InsecureContextFlow = DataFlow::GlobalWithState<InsecureContextConfiguration2>;
|
||||
|
||||
/**
|
||||
* Holds if `conectionCreation` marks the creation of a connection based on the contex
|
||||
@@ -127,7 +127,7 @@ predicate unsafe_connection_creation_with_context(
|
||||
) {
|
||||
// Connection created from a context allowing `insecure_version`.
|
||||
exists(InsecureContextFlow::PathNode src, InsecureContextFlow::PathNode sink |
|
||||
InsecureContextFlow::hasFlowPath(src, sink) and
|
||||
InsecureContextFlow::flowPath(src, sink) and
|
||||
src.getNode() = contextOrigin and
|
||||
sink.getNode() = connectionCreation and
|
||||
sink.getState().allowsInsecureVersion(insecure_version) and
|
||||
|
||||
@@ -56,7 +56,7 @@ module StoredXss {
|
||||
}
|
||||
}
|
||||
|
||||
import TaintTracking::Make<Config>
|
||||
import TaintTracking::Global<Config>
|
||||
}
|
||||
|
||||
/** DEPRECATED: Alias for StoredXss */
|
||||
|
||||
@@ -304,7 +304,7 @@ private module OrmTracking {
|
||||
}
|
||||
}
|
||||
|
||||
import DataFlow::Make<Config>
|
||||
import DataFlow::Global<Config>
|
||||
}
|
||||
|
||||
/** Provides default sources, sinks and sanitizers for detecting stored cross-site scripting (XSS) vulnerabilities. */
|
||||
@@ -336,7 +336,7 @@ module StoredXss {
|
||||
private class OrmFieldAsSource extends Source instanceof DataFlow::CallNode {
|
||||
OrmFieldAsSource() {
|
||||
exists(DataFlow::CallNode subSrc |
|
||||
OrmTracking::hasFlow(subSrc, this.getReceiver()) and
|
||||
OrmTracking::flow(subSrc, this.getReceiver()) and
|
||||
subSrc.(OrmInstantiation).methodCallMayAccessField(this.getMethodName())
|
||||
)
|
||||
}
|
||||
|
||||
@@ -17,6 +17,6 @@ import codeql.ruby.security.StoredXSSQuery
|
||||
import StoredXss::PathGraph
|
||||
|
||||
from StoredXss::PathNode source, StoredXss::PathNode sink
|
||||
where StoredXss::hasFlowPath(source, sink)
|
||||
where StoredXss::flowPath(source, sink)
|
||||
select sink.getNode(), source, sink, "Stored cross-site scripting vulnerability due to $@.",
|
||||
source.getNode(), "stored value"
|
||||
|
||||
@@ -21,12 +21,12 @@ module TaintReachConfig implements DataFlow::ConfigSig {
|
||||
predicate isSink(DataFlow::Node node) { any() }
|
||||
}
|
||||
|
||||
module TaintReachFlow = TaintTracking::Make<TaintReachConfig>;
|
||||
module TaintReachFlow = TaintTracking::Global<TaintReachConfig>;
|
||||
|
||||
/**
|
||||
* Gets the total number of dataflow nodes that taint reaches (from any source).
|
||||
*/
|
||||
int taintedNodesCount() { result = count(DataFlow::Node n | TaintReachFlow::hasFlowTo(n)) }
|
||||
int taintedNodesCount() { result = count(DataFlow::Node n | TaintReachFlow::flowTo(n)) }
|
||||
|
||||
/**
|
||||
* Gets the proportion of dataflow nodes that taint reaches (from any source),
|
||||
|
||||
Reference in New Issue
Block a user