mirror of
https://github.com/github/codeql.git
synced 2026-05-03 20:58:03 +02:00
Java: Remove omittable exists variables
This commit is contained in:
@@ -25,7 +25,7 @@ class HasFlowTest extends InlineExpectationsTest {
|
||||
|
||||
override predicate hasActualResult(Location location, string element, string tag, string value) {
|
||||
tag = "hasTaintFlow" and
|
||||
exists(DataFlow::Node src, DataFlow::Node sink, TaintFlowConf conf | conf.hasFlow(src, sink) |
|
||||
exists(DataFlow::Node sink, TaintFlowConf conf | conf.hasFlowTo(sink) |
|
||||
sink.getLocation() = location and
|
||||
element = sink.toString() and
|
||||
value = ""
|
||||
|
||||
@@ -33,7 +33,7 @@ class LocalFlowTest extends InlineExpectationsTest {
|
||||
|
||||
override predicate hasActualResult(Location location, string element, string tag, string value) {
|
||||
tag = "hasLocalValueFlow" and
|
||||
exists(DataFlow::Node src, DataFlow::Node sink | any(LocalValueConf c).hasFlow(src, sink) |
|
||||
exists(DataFlow::Node sink | any(LocalValueConf c).hasFlowTo(sink) |
|
||||
sink.getLocation() = location and
|
||||
element = sink.toString() and
|
||||
value = ""
|
||||
|
||||
@@ -29,7 +29,7 @@ class RemoteFlowTest extends InlineExpectationsTest {
|
||||
|
||||
override predicate hasActualResult(Location location, string element, string tag, string value) {
|
||||
tag = "hasRemoteValueFlow" and
|
||||
exists(DataFlow::Node src, DataFlow::Node sink | any(RemoteValueConf c).hasFlow(src, sink) |
|
||||
exists(DataFlow::Node sink | any(RemoteValueConf c).hasFlowTo(sink) |
|
||||
sink.getLocation() = location and
|
||||
element = sink.toString() and
|
||||
value = ""
|
||||
|
||||
@@ -22,8 +22,8 @@ class FlowStepTest extends InlineExpectationsTest {
|
||||
override predicate hasActualResult(Location l, string element, string tag, string value) {
|
||||
tag = "taintReachesReturn" and
|
||||
value = "" and
|
||||
exists(Conf conf, DataFlow::Node source, DataFlow::Node sink |
|
||||
conf.hasFlow(source, sink) and
|
||||
exists(Conf conf, DataFlow::Node source |
|
||||
conf.hasFlow(source, _) and
|
||||
l = source.getLocation() and
|
||||
element = source.toString()
|
||||
)
|
||||
|
||||
@@ -22,8 +22,8 @@ class SinkTest extends InlineExpectationsTest {
|
||||
override predicate hasActualResult(Location l, string element, string tag, string value) {
|
||||
tag = "taintReachesSink" and
|
||||
value = "" and
|
||||
exists(Conf conf, DataFlow::Node source, DataFlow::Node sink |
|
||||
conf.hasFlow(source, sink) and
|
||||
exists(Conf conf, DataFlow::Node source |
|
||||
conf.hasFlow(source, _) and
|
||||
l = source.getLocation() and
|
||||
element = source.toString()
|
||||
)
|
||||
|
||||
@@ -46,9 +46,7 @@ class HasFlowTest extends InlineExpectationsTest {
|
||||
)
|
||||
or
|
||||
tag = "numValueFlow" and
|
||||
exists(DataFlow::Node src, DataFlow::Node sink, ValueFlowConf vconf, int num |
|
||||
vconf.hasFlow(src, sink)
|
||||
|
|
||||
exists(DataFlow::Node sink, ValueFlowConf vconf, int num | vconf.hasFlowTo(sink) |
|
||||
value = num.toString() and
|
||||
sink.getLocation() = location and
|
||||
element = sink.toString() and
|
||||
|
||||
@@ -21,9 +21,7 @@ class JmsFlowTest extends InlineExpectationsTest {
|
||||
|
||||
override predicate hasActualResult(Location location, string element, string tag, string value) {
|
||||
tag = "tainted" and
|
||||
exists(DataFlow::PathNode source, DataFlow::PathNode sink, TestConfig conf |
|
||||
conf.hasFlowPath(source, sink)
|
||||
|
|
||||
exists(DataFlow::PathNode sink, TestConfig conf | conf.hasFlowPath(_, sink) |
|
||||
location = sink.getNode().getLocation() and element = sink.getNode().toString() and value = ""
|
||||
)
|
||||
}
|
||||
|
||||
@@ -24,7 +24,7 @@ class HasFlowTest extends InlineExpectationsTest {
|
||||
|
||||
override predicate hasActualResult(Location location, string element, string tag, string value) {
|
||||
tag = "hasTaintFlow" and
|
||||
exists(DataFlow::Node src, DataFlow::Node sink, Conf conf | conf.hasFlow(src, sink) |
|
||||
exists(DataFlow::Node sink, Conf conf | conf.hasFlowTo(sink) |
|
||||
sink.getLocation() = location and
|
||||
element = sink.toString() and
|
||||
value = ""
|
||||
|
||||
Reference in New Issue
Block a user