-
Notifications
You must be signed in to change notification settings - Fork 1.9k
JS: support sanitizers that sanitize individual chars in js/shell-commandconstructed-from-input #4921
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
esbena
left a comment
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.
LGTM except for a nit, two ideas for future work.
.../ql/src/semmle/javascript/security/dataflow/UnsafeShellCommandConstructionCustomizations.qll
Outdated
Show resolved
Hide resolved
| * Holds if `instance` is an instance of the access-path `ap`, and there exists a guard | ||
| * that ensures that `instance` is not equal to `char`. | ||
| */ | ||
| private predicate blocksCharInAccess(AccessPath ap, string char, Expr instance) { |
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.
If the performance works out, we should try to move this SanitizedChar and blocksCharInAccess to TaintTracking.qll (lets make a separate issue for that).
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.
So generalize the sanitizer such that other queries can use it?
.../ql/src/semmle/javascript/security/dataflow/UnsafeShellCommandConstructionCustomizations.qll
Show resolved
Hide resolved
.../ql/src/semmle/javascript/security/dataflow/UnsafeShellCommandConstructionCustomizations.qll
Show resolved
Hide resolved
…-constructed-from-input
Co-authored-by: Esben Sparre Andreasen <esbena@github.com>
f8d61c9 to
7eab085
Compare
.../ql/src/semmle/javascript/security/dataflow/UnsafeShellCommandConstructionCustomizations.qll
Outdated
Show resolved
Hide resolved
…ellCommandConstructionCustomizations.qll Co-authored-by: Esben Sparre Andreasen <esbena@github.com>
Gets a TN for CVE-2020-26274