dd-trace
Version:
Datadog APM tracing client for JavaScript
23 lines (17 loc) • 581 B
JavaScript
const { LDAP_INJECTION } = require('../vulnerabilities')
const { getNodeModulesPaths } = require('../path-line')
const InjectionAnalyzer = require('./injection-analyzer')
const EXCLUDED_PATHS = getNodeModulesPaths('ldapjs-promise')
class LdapInjectionAnalyzer extends InjectionAnalyzer {
constructor () {
super(LDAP_INJECTION)
}
onConfigure () {
this.addSub('datadog:ldapjs:client:search', ({ base, filter }) => this.analyzeAll(base, filter))
}
_getExcludedPaths () {
return EXCLUDED_PATHS
}
}
module.exports = new LdapInjectionAnalyzer()