File tree Expand file tree Collapse file tree 1 file changed +24
-1
lines changed
python/ql/src/experimental/semmle/python/security Expand file tree Collapse file tree 1 file changed +24
-1
lines changed Original file line number Diff line number Diff line change
1
+ import python
2
+ import experimental.semmle.python.Concepts
3
+ import semmle.python.dataflow.new.DataFlow
4
+ import semmle.python.dataflow.new.TaintTracking
5
+ import semmle.python.dataflow.new.RemoteFlowSources
1
6
2
- //
7
+ class LDAPImproperAuthSink extends DataFlow:: Node {
8
+ LDAPImproperAuthSink ( ) {
9
+ exists ( LDAPBind ldapBind |
10
+ (
11
+ DataFlow:: localFlow ( DataFlow:: exprNode ( any ( None noneName ) ) , ldapBind .getPasswordNode ( ) ) or
12
+ not exists ( ldapBind .getPasswordNode ( ) )
13
+ ) and
14
+ this = ldapBind .getQueryNode ( )
15
+ )
16
+ }
17
+ }
18
+
19
+ class LDAPImproperAuthenticationConfig extends TaintTracking:: Configuration {
20
+ LDAPImproperAuthenticationConfig ( ) { this = "LDAPImproperAuthenticationConfig" }
21
+
22
+ override predicate isSource ( DataFlow:: Node source ) { source instanceof RemoteFlowSource }
23
+
24
+ override predicate isSink ( DataFlow:: Node sink ) { sink instanceof LDAPImproperAuthSink }
25
+ }
You can’t perform that action at this time.
0 commit comments