-
Notifications
You must be signed in to change notification settings - Fork 26
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
Detect usage of dynamic RegExps #42
Comments
One major issue if the fact that we analyze files one by one. It make the tracing of Proxies (and similar) impossible. |
Can we create an |
No on multiple files it will cost an insane amount of memory. The only viable solution is to think "multiple iterations"
Kind of.. |
Ok to be able to start solving this issue, let's begin with a probe that work in a single file class MyRegExp extends RegExp {
constructor(...args) {
super(...args);
}
}
const d = new MyRegExp('^node_modules\\/(@[^/]+\\/?[^/]+|[^/]+)(\\/.*)?$'); This code should detect one warning of kind |
OK, looking into it. |
There is currently a lot of situations where we are missing dynamic RegExps. Ref and examples here: nodejs/security-wg#208
We should probably use the new Tracer to detect those cases (extension, proxy ...).
The text was updated successfully, but these errors were encountered: