mirror of
https://github.com/github/codeql.git
synced 2025-12-20 10:46:30 +01:00
Set up taint config and custom sink
This commit is contained in:
@@ -1,2 +1,25 @@
|
||||
import python
|
||||
import experimental.semmle.python.Concepts
|
||||
import semmle.python.dataflow.new.DataFlow
|
||||
import semmle.python.dataflow.new.TaintTracking
|
||||
import semmle.python.dataflow.new.RemoteFlowSources
|
||||
|
||||
//
|
||||
class LDAPImproperAuthSink extends DataFlow::Node {
|
||||
LDAPImproperAuthSink() {
|
||||
exists(LDAPBind ldapBind |
|
||||
(
|
||||
DataFlow::localFlow(DataFlow::exprNode(any(None noneName)), ldapBind.getPasswordNode()) or
|
||||
not exists(ldapBind.getPasswordNode())
|
||||
) and
|
||||
this = ldapBind.getQueryNode()
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
class LDAPImproperAuthenticationConfig extends TaintTracking::Configuration {
|
||||
LDAPImproperAuthenticationConfig() { this = "LDAPImproperAuthenticationConfig" }
|
||||
|
||||
override predicate isSource(DataFlow::Node source) { source instanceof RemoteFlowSource }
|
||||
|
||||
override predicate isSink(DataFlow::Node sink) { sink instanceof LDAPImproperAuthSink }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user