Skip to content

Commit 658c54a

Browse files
committed
Change names of configuration to fit new naming convention
1 parent cb58936 commit 658c54a

File tree

3 files changed

+13
-13
lines changed

3 files changed

+13
-13
lines changed

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import semmle.code.java.security.InsecureLdapAuth
99
/**
1010
* A taint-tracking configuration for `ldap://` URL in LDAP authentication.
1111
*/
12-
private module InsecureUrlFlowConfig implements DataFlow::ConfigSig {
12+
private module InsecureLdapUrlConfig implements DataFlow::ConfigSig {
1313
predicate isSource(DataFlow::Node src) { src.asExpr() instanceof InsecureLdapUrl }
1414

1515
predicate isSink(DataFlow::Node sink) {
@@ -29,12 +29,12 @@ private module InsecureUrlFlowConfig implements DataFlow::ConfigSig {
2929
}
3030
}
3131

32-
module InsecureUrlFlowConfiguration = TaintTracking::Make<InsecureUrlFlowConfig>;
32+
module InsecureLdapUrlFlow = TaintTracking::Make<InsecureLdapUrlConfig>;
3333

3434
/**
3535
* A taint-tracking configuration for `simple` basic-authentication in LDAP configuration.
3636
*/
37-
private module BasicAuthFlowConfig implements DataFlow::ConfigSig {
37+
private module BasicAuthConfig implements DataFlow::ConfigSig {
3838
predicate isSource(DataFlow::Node src) {
3939
exists(MethodAccess ma |
4040
isBasicAuthEnv(ma) and ma.getQualifier() = src.(PostUpdateNode).getPreUpdateNode().asExpr()
@@ -49,7 +49,7 @@ private module BasicAuthFlowConfig implements DataFlow::ConfigSig {
4949
}
5050
}
5151

52-
module BasicAuthFlowConfiguration = DataFlow::Make<BasicAuthFlowConfig>;
52+
module BasicAuthFlow = DataFlow::Make<BasicAuthConfig>;
5353

5454
/**
5555
* A taint-tracking configuration for `ssl` configuration in LDAP authentication.
@@ -69,4 +69,4 @@ private module RequiresSslConfig implements DataFlow::ConfigSig {
6969
}
7070
}
7171

72-
module RequiresSslConfiguration = DataFlow::Make<RequiresSslConfig>;
72+
module RequiresSslFlow = DataFlow::Make<RequiresSslConfig>;

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,12 @@
1414

1515
import java
1616
import semmle.code.java.security.InsecureLdapAuthQuery
17-
import InsecureUrlFlowConfiguration::PathGraph
17+
import InsecureLdapUrlFlow::PathGraph
1818

19-
from InsecureUrlFlowConfiguration::PathNode source, InsecureUrlFlowConfiguration::PathNode sink
19+
from InsecureLdapUrlFlow::PathNode source, InsecureLdapUrlFlow::PathNode sink
2020
where
21-
InsecureUrlFlowConfiguration::hasFlowPath(source, sink) and
22-
BasicAuthFlowConfiguration::hasFlowTo(sink.getNode()) and
23-
not RequiresSslConfiguration::hasFlowTo(sink.getNode())
21+
InsecureLdapUrlFlow::hasFlowPath(source, sink) and
22+
BasicAuthFlow::hasFlowTo(sink.getNode()) and
23+
not RequiresSslFlow::hasFlowTo(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 | InsecureUrlFlowConfiguration::hasFlowTo(sink) |
13-
BasicAuthFlowConfiguration::hasFlowTo(sink) and
14-
not SslFlowConfiguration::hasFlowTo(sink) and
12+
exists(DataFlow::Node sink | InsecureLdapUrlFlow::hasFlowTo(sink) |
13+
BasicAuthFlow::hasFlowTo(sink) and
14+
not RequiresSslFlow::hasFlowTo(sink) and
1515
sink.getLocation() = location and
1616
element = sink.toString() and
1717
value = ""

0 commit comments

Comments
 (0)