mirror of
https://github.com/github/codeql.git
synced 2026-05-04 21:25:44 +02:00
Python: Remove omittable exists variables
This commit is contained in:
@@ -29,7 +29,7 @@ class MaximalFlowsConfig extends DataFlow::Configuration {
|
||||
not node instanceof DataFlow::PostUpdateNode and
|
||||
// not node.asExpr() instanceof FunctionExpr and
|
||||
// not node.asExpr() instanceof ClassExpr and
|
||||
not exists(DataFlow::Node pred | DataFlow::localFlowStep(pred, node))
|
||||
not DataFlow::localFlowStep(_, node)
|
||||
}
|
||||
|
||||
override predicate isSink(DataFlow::Node node) {
|
||||
@@ -37,6 +37,6 @@ class MaximalFlowsConfig extends DataFlow::Configuration {
|
||||
not any(CallNode c).getArg(_) = node.asCfgNode() and
|
||||
not node instanceof DataFlow::ArgumentNode and
|
||||
not node.asCfgNode().(NameNode).getId().matches("SINK%") and
|
||||
not exists(DataFlow::Node succ | DataFlow::localFlowStep(node, succ))
|
||||
not DataFlow::localFlowStep(node, _)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,9 +9,7 @@ class CaptureTest extends InlineExpectationsTest {
|
||||
override string getARelevantTag() { result = "captured" }
|
||||
|
||||
override predicate hasActualResult(Location location, string element, string tag, string value) {
|
||||
exists(DataFlow::Node source, DataFlow::Node sink |
|
||||
exists(TestConfiguration cfg | cfg.hasFlow(source, sink))
|
||||
|
|
||||
exists(DataFlow::Node sink | exists(TestConfiguration cfg | cfg.hasFlowTo(sink)) |
|
||||
location = sink.getLocation() and
|
||||
tag = "captured" and
|
||||
value = "" and
|
||||
|
||||
Reference in New Issue
Block a user