mirror of
https://github.com/github/codeql.git
synced 2026-04-26 01:05:15 +02:00
Ruby: configsig rb/improper-ldap-auth
This commit is contained in:
@@ -9,8 +9,9 @@ private import ImproperLdapAuthCustomizations::ImproperLdapAuth
|
||||
|
||||
/**
|
||||
* A taint-tracking configuration for detecting improper LDAP authentication vulnerabilities.
|
||||
* DEPRECATED: Use `ImproperLdapAuthFlow` instead
|
||||
*/
|
||||
class Configuration extends TaintTracking::Configuration {
|
||||
deprecated class Configuration extends TaintTracking::Configuration {
|
||||
Configuration() { this = "ImproperLdapAuth" }
|
||||
|
||||
override predicate isSource(DataFlow::Node source) { source instanceof Source }
|
||||
@@ -19,3 +20,16 @@ class Configuration extends TaintTracking::Configuration {
|
||||
|
||||
override predicate isSanitizer(DataFlow::Node node) { node instanceof Sanitizer }
|
||||
}
|
||||
|
||||
private module ImproperLdapAuthConfig implements DataFlow::ConfigSig {
|
||||
predicate isSource(DataFlow::Node source) { source instanceof Source }
|
||||
|
||||
predicate isSink(DataFlow::Node sink) { sink instanceof Sink }
|
||||
|
||||
predicate isBarrier(DataFlow::Node node) { node instanceof Sanitizer }
|
||||
}
|
||||
|
||||
/**
|
||||
* Taint-tracking for detecting improper LDAP authentication vulnerabilities.
|
||||
*/
|
||||
module ImproperLdapAuthFlow = TaintTracking::Global<ImproperLdapAuthConfig>;
|
||||
|
||||
@@ -12,9 +12,9 @@
|
||||
import codeql.ruby.DataFlow
|
||||
import codeql.ruby.security.ImproperLdapAuthQuery
|
||||
import codeql.ruby.Concepts
|
||||
import DataFlow::PathGraph
|
||||
import ImproperLdapAuthFlow::PathGraph
|
||||
|
||||
from Configuration config, DataFlow::PathNode source, DataFlow::PathNode sink
|
||||
where config.hasFlowPath(source, sink)
|
||||
from ImproperLdapAuthFlow::PathNode source, ImproperLdapAuthFlow::PathNode sink
|
||||
where ImproperLdapAuthFlow::flowPath(source, sink)
|
||||
select sink.getNode(), source, sink, "This LDAP authencation depends on a $@.", source.getNode(),
|
||||
"user-provided value"
|
||||
|
||||
Reference in New Issue
Block a user