mirror of
https://github.com/github/codeql.git
synced 2026-04-29 18:55:14 +02:00
Java: Rename references.
This commit is contained in:
@@ -57,9 +57,9 @@ module DefaultFlowConfig implements DataFlow::ConfigSig {
|
||||
int fieldFlowBranchLimit() { result = 1000 }
|
||||
}
|
||||
|
||||
private module DefaultValueFlow = DataFlow::Make<DefaultFlowConfig>;
|
||||
private module DefaultValueFlow = DataFlow::Global<DefaultFlowConfig>;
|
||||
|
||||
private module DefaultTaintFlow = TaintTracking::Make<DefaultFlowConfig>;
|
||||
private module DefaultTaintFlow = TaintTracking::Global<DefaultFlowConfig>;
|
||||
|
||||
class DefaultValueFlowConf extends DataFlow::Configuration {
|
||||
DefaultValueFlowConf() { this = "qltest:defaultValueFlowConf" }
|
||||
@@ -118,13 +118,13 @@ class InlineFlowTest extends InlineExpectationsTest {
|
||||
predicate hasValueFlow(DataFlow::Node src, DataFlow::Node sink) {
|
||||
if exists(EnableLegacyConfiguration e)
|
||||
then getValueFlowConfig().hasFlow(src, sink)
|
||||
else DefaultValueFlow::hasFlow(src, sink)
|
||||
else DefaultValueFlow::flow(src, sink)
|
||||
}
|
||||
|
||||
predicate hasTaintFlow(DataFlow::Node src, DataFlow::Node sink) {
|
||||
if exists(EnableLegacyConfiguration e)
|
||||
then getTaintFlowConfig().hasFlow(src, sink)
|
||||
else DefaultTaintFlow::hasFlow(src, sink)
|
||||
else DefaultTaintFlow::flow(src, sink)
|
||||
}
|
||||
|
||||
DataFlow::Configuration getValueFlowConfig() { result = any(DefaultValueFlowConf config) }
|
||||
|
||||
@@ -47,13 +47,13 @@ module Conf4 implements ConfigSig {
|
||||
}
|
||||
|
||||
predicate flow(Node src, Node sink, string s) {
|
||||
Make<Conf1>::hasFlow(src, sink) and s = "nobarrier"
|
||||
Global<Conf1>::flow(src, sink) and s = "nobarrier"
|
||||
or
|
||||
Make<Conf2>::hasFlow(src, sink) and s = "srcbarrier"
|
||||
Global<Conf2>::flow(src, sink) and s = "srcbarrier"
|
||||
or
|
||||
Make<Conf3>::hasFlow(src, sink) and s = "sinkbarrier"
|
||||
Global<Conf3>::flow(src, sink) and s = "sinkbarrier"
|
||||
or
|
||||
Make<Conf4>::hasFlow(src, sink) and s = "both"
|
||||
Global<Conf4>::flow(src, sink) and s = "both"
|
||||
}
|
||||
|
||||
from Node src, Node sink, string s
|
||||
|
||||
@@ -10,10 +10,10 @@ module Config implements ConfigSig {
|
||||
|
||||
int explorationLimit() { result = 10 }
|
||||
|
||||
module PartialFlow = Make<Config>::FlowExploration<explorationLimit/0>;
|
||||
module PartialFlow = Global<Config>::FlowExploration<explorationLimit/0>;
|
||||
|
||||
import PartialFlow::PartialPathGraph
|
||||
|
||||
from PartialFlow::PartialPathNode n, int dist
|
||||
where PartialFlow::hasPartialFlow(_, n, dist)
|
||||
where PartialFlow::partialFlow(_, n, dist)
|
||||
select dist, n
|
||||
|
||||
@@ -10,10 +10,10 @@ module Config implements ConfigSig {
|
||||
|
||||
int explorationLimit() { result = 10 }
|
||||
|
||||
module PartialFlow = Make<Config>::FlowExploration<explorationLimit/0>;
|
||||
module PartialFlow = Global<Config>::FlowExploration<explorationLimit/0>;
|
||||
|
||||
import PartialFlow::PartialPathGraph
|
||||
|
||||
from PartialFlow::PartialPathNode n, int dist
|
||||
where PartialFlow::hasPartialFlowRev(n, _, dist)
|
||||
where PartialFlow::partialFlowRev(n, _, dist)
|
||||
select dist, n
|
||||
|
||||
@@ -55,7 +55,7 @@ module Config implements DataFlow::StateConfigSig {
|
||||
|
||||
int explorationLimit() { result = 0 }
|
||||
|
||||
module Flow = TaintTracking::MakeWithState<Config>;
|
||||
module Flow = TaintTracking::GlobalWithState<Config>;
|
||||
|
||||
module PartialFlow = Flow::FlowExploration<explorationLimit/0>;
|
||||
|
||||
@@ -67,7 +67,7 @@ class HasFlowTest extends InlineExpectationsTest {
|
||||
override predicate hasActualResult(Location location, string element, string tag, string value) {
|
||||
tag = "flow" and
|
||||
exists(Flow::PathNode src, Flow::PathNode sink |
|
||||
Flow::hasFlowPath(src, sink) and
|
||||
Flow::flowPath(src, sink) and
|
||||
sink.getNode().getLocation() = location and
|
||||
element = sink.toString() and
|
||||
value = src.getState()
|
||||
@@ -75,7 +75,7 @@ class HasFlowTest extends InlineExpectationsTest {
|
||||
or
|
||||
tag = "pFwd" and
|
||||
exists(PartialFlow::PartialPathNode src, PartialFlow::PartialPathNode node |
|
||||
PartialFlow::hasPartialFlow(src, node, _) and
|
||||
PartialFlow::partialFlow(src, node, _) and
|
||||
checkNode(node.getNode()) and
|
||||
node.getNode().getLocation() = location and
|
||||
element = node.toString() and
|
||||
@@ -84,7 +84,7 @@ class HasFlowTest extends InlineExpectationsTest {
|
||||
or
|
||||
tag = "pRev" and
|
||||
exists(PartialFlow::PartialPathNode node, PartialFlow::PartialPathNode sink |
|
||||
PartialFlow::hasPartialFlowRev(node, sink, _) and
|
||||
PartialFlow::partialFlowRev(node, sink, _) and
|
||||
checkNode(node.getNode()) and
|
||||
node.getNode().getLocation() = location and
|
||||
element = node.toString() and
|
||||
|
||||
@@ -10,7 +10,7 @@ class HasApkInstallationTest extends InlineExpectationsTest {
|
||||
|
||||
override predicate hasActualResult(Location location, string element, string tag, string value) {
|
||||
tag = "hasApkInstallation" and
|
||||
exists(DataFlow::Node sink | ApkInstallationFlow::hasFlowTo(sink) |
|
||||
exists(DataFlow::Node sink | ApkInstallationFlow::flowTo(sink) |
|
||||
sink.getLocation() = location and
|
||||
element = sink.toString() and
|
||||
value = ""
|
||||
|
||||
@@ -12,6 +12,6 @@ private class LogInjectionTest extends InlineFlowTest {
|
||||
override predicate hasValueFlow(DataFlow::Node src, DataFlow::Node sink) { none() }
|
||||
|
||||
override predicate hasTaintFlow(DataFlow::Node src, DataFlow::Node sink) {
|
||||
LogInjectionFlow::hasFlow(src, sink)
|
||||
LogInjectionFlow::flow(src, sink)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,6 +6,6 @@ class IntentUriPermissionManipulationTest extends InlineFlowTest {
|
||||
override predicate hasValueFlow(DataFlow::Node src, DataFlow::Node sink) { none() }
|
||||
|
||||
override predicate hasTaintFlow(DataFlow::Node src, DataFlow::Node sink) {
|
||||
IntentUriPermissionManipulationFlow::hasFlow(src, sink)
|
||||
IntentUriPermissionManipulationFlow::flow(src, sink)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,6 +6,6 @@ class Test extends InlineFlowTest {
|
||||
override predicate hasValueFlow(DataFlow::Node src, DataFlow::Node sink) { none() }
|
||||
|
||||
override predicate hasTaintFlow(DataFlow::Node src, DataFlow::Node sink) {
|
||||
UnsafeContentResolutionFlow::hasFlow(src, sink)
|
||||
UnsafeContentResolutionFlow::flow(src, sink)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,6 +6,6 @@ class Test extends InlineFlowTest {
|
||||
override predicate hasValueFlow(DataFlow::Node src, DataFlow::Node sink) { none() }
|
||||
|
||||
override predicate hasTaintFlow(DataFlow::Node src, DataFlow::Node sink) {
|
||||
FragmentInjectionTaintFlow::hasFlow(src, sink)
|
||||
FragmentInjectionTaintFlow::flow(src, sink)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,7 +4,7 @@ import semmle.code.java.security.SensitiveLoggingQuery
|
||||
|
||||
class HasFlowTest extends InlineFlowTest {
|
||||
override predicate hasTaintFlow(DataFlow::Node src, DataFlow::Node sink) {
|
||||
SensitiveLoggerFlow::hasFlow(src, sink)
|
||||
SensitiveLoggerFlow::flow(src, sink)
|
||||
}
|
||||
|
||||
override predicate hasValueFlow(DataFlow::Node src, DataFlow::Node sink) { none() }
|
||||
|
||||
@@ -9,7 +9,7 @@ class HasPolyRedos extends InlineExpectationsTest {
|
||||
override predicate hasActualResult(Location location, string element, string tag, string value) {
|
||||
tag = "hasPolyRedos" and
|
||||
exists(DataFlow::Node sink |
|
||||
PolynomialRedosFlow::hasFlowTo(sink) and
|
||||
PolynomialRedosFlow::flowTo(sink) and
|
||||
location = sink.getLocation() and
|
||||
element = sink.toString() and
|
||||
value = ""
|
||||
|
||||
@@ -7,6 +7,6 @@ class HasFlowTest extends InlineFlowTest {
|
||||
override predicate hasValueFlow(DataFlow::Node src, DataFlow::Node sink) { none() }
|
||||
|
||||
override predicate hasTaintFlow(DataFlow::Node src, DataFlow::Node sink) {
|
||||
RsaWithoutOaepFlow::hasFlow(src, sink)
|
||||
RsaWithoutOaepFlow::flow(src, sink)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10,7 +10,7 @@ class HasFlowTest extends InlineExpectationsTest {
|
||||
override predicate hasActualResult(Location location, string element, string tag, string value) {
|
||||
tag = "SSRF" and
|
||||
exists(DataFlow::Node sink |
|
||||
RequestForgeryFlow::hasFlowTo(sink) and
|
||||
RequestForgeryFlow::flowTo(sink) and
|
||||
sink.getLocation() = location and
|
||||
element = sink.toString() and
|
||||
value = ""
|
||||
|
||||
@@ -7,6 +7,6 @@ class HasFlowTest extends InlineFlowTest {
|
||||
override predicate hasValueFlow(DataFlow::Node src, DataFlow::Node sink) { none() }
|
||||
|
||||
override predicate hasTaintFlow(DataFlow::Node src, DataFlow::Node sink) {
|
||||
SensitiveCommunicationFlow::hasFlow(src, sink)
|
||||
SensitiveCommunicationFlow::flow(src, sink)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user