@@ -12,12 +12,7 @@ import semmle.code.java.security.InsecureLdapAuth
1212private module InsecureLdapUrlConfig implements DataFlow:: ConfigSig {
1313 predicate isSource ( DataFlow:: Node src ) { src .asExpr ( ) instanceof InsecureLdapUrl }
1414
15- predicate isSink ( DataFlow:: Node sink ) {
16- exists ( ConstructorCall cc |
17- cc .getConstructedType ( ) .getAnAncestor ( ) instanceof TypeDirContext and
18- sink .asExpr ( ) = cc .getArgument ( 0 )
19- )
20- }
15+ predicate isSink ( DataFlow:: Node sink ) { sink instanceof InsecureLdapUrlSink }
2116
2217 /** Method call of `env.put()`. */
2318 predicate isAdditionalFlowStep ( DataFlow:: Node pred , DataFlow:: Node succ ) {
@@ -37,16 +32,12 @@ module InsecureLdapUrlFlow = TaintTracking::Make<InsecureLdapUrlConfig>;
3732private module BasicAuthConfig implements DataFlow:: ConfigSig {
3833 predicate isSource ( DataFlow:: Node src ) {
3934 exists ( MethodAccess ma |
40- isBasicAuthEnv ( ma ) and ma .getQualifier ( ) = src .( DataFlow:: PostUpdateNode ) .getPreUpdateNode ( ) .asExpr ( )
35+ isBasicAuthEnv ( ma ) and
36+ ma .getQualifier ( ) = src .( DataFlow:: PostUpdateNode ) .getPreUpdateNode ( ) .asExpr ( )
4137 )
4238 }
4339
44- predicate isSink ( DataFlow:: Node sink ) {
45- exists ( ConstructorCall cc |
46- cc .getConstructedType ( ) .getAnAncestor ( ) instanceof TypeDirContext and
47- sink .asExpr ( ) = cc .getArgument ( 0 )
48- )
49- }
40+ predicate isSink ( DataFlow:: Node sink ) { sink instanceof InsecureLdapUrlSink }
5041}
5142
5243module BasicAuthFlow = DataFlow:: Make< BasicAuthConfig > ;
@@ -57,16 +48,12 @@ module BasicAuthFlow = DataFlow::Make<BasicAuthConfig>;
5748private module RequiresSslConfig implements DataFlow:: ConfigSig {
5849 predicate isSource ( DataFlow:: Node src ) {
5950 exists ( MethodAccess ma |
60- isSslEnv ( ma ) and ma .getQualifier ( ) = src .( DataFlow:: PostUpdateNode ) .getPreUpdateNode ( ) .asExpr ( )
51+ isSslEnv ( ma ) and
52+ ma .getQualifier ( ) = src .( DataFlow:: PostUpdateNode ) .getPreUpdateNode ( ) .asExpr ( )
6153 )
6254 }
6355
64- predicate isSink ( DataFlow:: Node sink ) {
65- exists ( ConstructorCall cc |
66- cc .getConstructedType ( ) .getAnAncestor ( ) instanceof TypeDirContext and
67- sink .asExpr ( ) = cc .getArgument ( 0 )
68- )
69- }
56+ predicate isSink ( DataFlow:: Node sink ) { sink instanceof InsecureLdapUrlSink }
7057}
7158
7259module RequiresSslFlow = DataFlow:: Make< RequiresSslConfig > ;
0 commit comments