Skip to content

Commit 9bfb13b

Browse files
committed
Update to the Global/flow* api
1 parent 106e5e7 commit 9bfb13b

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

java/ql/lib/semmle/code/java/security/InsecureLdapAuthQuery.qll

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ private module InsecureLdapUrlConfig implements DataFlow::ConfigSig {
2424
}
2525
}
2626

27-
module InsecureLdapUrlFlow = TaintTracking::Make<InsecureLdapUrlConfig>;
27+
module InsecureLdapUrlFlow = TaintTracking::Global<InsecureLdapUrlConfig>;
2828

2929
/**
3030
* A taint-tracking configuration for `simple` basic-authentication in LDAP configuration.
@@ -40,7 +40,7 @@ private module BasicAuthConfig implements DataFlow::ConfigSig {
4040
predicate isSink(DataFlow::Node sink) { sink instanceof InsecureLdapUrlSink }
4141
}
4242

43-
module BasicAuthFlow = DataFlow::Make<BasicAuthConfig>;
43+
module BasicAuthFlow = DataFlow::Global<BasicAuthConfig>;
4444

4545
/**
4646
* A taint-tracking configuration for `ssl` configuration in LDAP authentication.
@@ -56,4 +56,4 @@ private module RequiresSslConfig implements DataFlow::ConfigSig {
5656
predicate isSink(DataFlow::Node sink) { sink instanceof InsecureLdapUrlSink }
5757
}
5858

59-
module RequiresSslFlow = DataFlow::Make<RequiresSslConfig>;
59+
module RequiresSslFlow = DataFlow::Global<RequiresSslConfig>;

java/ql/src/Security/CWE/CWE-522/InsecureLdapAuth.ql

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ import InsecureLdapUrlFlow::PathGraph
1818

1919
from InsecureLdapUrlFlow::PathNode source, InsecureLdapUrlFlow::PathNode sink
2020
where
21-
InsecureLdapUrlFlow::hasFlowPath(source, sink) and
22-
BasicAuthFlow::hasFlowTo(sink.getNode()) and
23-
not RequiresSslFlow::hasFlowTo(sink.getNode())
21+
InsecureLdapUrlFlow::flowPath(source, sink) and
22+
BasicAuthFlow::flowTo(sink.getNode()) and
23+
not RequiresSslFlow::flowTo(sink.getNode())
2424
select sink.getNode(), source, sink, "Insecure LDAP authentication from $@.", source.getNode(),
2525
"LDAP connection string"

java/ql/test/query-tests/security/CWE-522/InsecureLdapAuthTest.ql

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@ class InsecureLdapAuthenticationTest extends InlineExpectationsTest {
99

1010
override predicate hasActualResult(Location location, string element, string tag, string value) {
1111
tag = "hasInsecureLdapAuth" and
12-
exists(DataFlow::Node sink | InsecureLdapUrlFlow::hasFlowTo(sink) |
13-
BasicAuthFlow::hasFlowTo(sink) and
14-
not RequiresSslFlow::hasFlowTo(sink) and
12+
exists(DataFlow::Node sink | InsecureLdapUrlFlow::flowTo(sink) |
13+
BasicAuthFlow::flowTo(sink) and
14+
not RequiresSslFlow::flowTo(sink) and
1515
sink.getLocation() = location and
1616
element = sink.toString() and
1717
value = ""

0 commit comments

Comments
 (0)