-
Notifications
You must be signed in to change notification settings - Fork 1.8k
JS: Move LDAP injection out of experimental #6781
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…Special Elements in Data Query Logic) to SqlInjection.ql
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the LDAPXyzAbc
casing througout this PR should be LdapXyzAbc
in the name of (ql/javascript) consistency.
SearchOptions() { call.getMethodName() = "search" and this = call.getParameter(1) } | ||
} | ||
|
||
/** A creation of an LDAPjs filter, or object containing a filter, that doesn't sanitizes the input. */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The "that doesn't sanitizes the input" bit is hard to derive from the LDAPFilterStep
name. Cold the name include taint, somehow? TaintPreservingLDapFilterStep
, NonSanitizingLDAPFilterStep
...
Alternatively, we could keep the name, but add a default predicate:
predicate sanitizing() { none() }
} | ||
} | ||
|
||
import semmle.javascript.security.IncompleteBlacklistSanitizer as IncompleteBlacklistSanitizer |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't the autoformatter have moved this up?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, it doesn't do that.
I got the import there because it's close to where the import is used.
I'm still mentioning the name of the library as |
I've added LDAP as a sink for
js/sql-injection
(it already has no-sql / graphql injection).I've basically rewritten the entire thing, but each commit should be a logical step (they were the steps I took while porting).
There are some TODO's in some of the commits.
Evaluation on
js/sql-injection
looks fine.(Internal: I'm using this PR to test a
dca
feature, ignore the backrefs).