-
Notifications
You must be signed in to change notification settings - Fork 29.6k
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
permission: resolve reference to an absolute path only for fs permission #47930
permission: resolve reference to an absolute path only for fs permission #47930
Conversation
/cc @nodejs/security-wg |
For other candidate permissions, such as "net" or "env", this patch will pass the reference without resolving it to an absolute path. Signed-off-by: Daeyeon Jeong <daeyeon.dev@gmail.com>
cbfbe91
to
74bc8eb
Compare
What other, non-path references are planned? |
AFAIK, it hasn't been discussed yet. I assume that, in the case of "env" permission, environment variable names would be used like: Although it isn't entirely clear, the conversion to an absolute path seems to be applied to the "fs" permission only, and there seems to be a plan to move it to the C++ side in the future. |
I'm currently working on moving the resolve path to c++ side, so this check will be handled there @RafaelGSS |
Thanks for confirming. It would be ideal to perform only type validation for the reference in JS side and let each permission C++ implementation handle parsing separately. |
That's correct. Eventually, we'll have
Correct, this is how it will work. |
Landed in 4eec362 |
For other candidate permissions, such as "net" or "env", this patch will pass the reference without resolving it to an absolute path. Signed-off-by: Daeyeon Jeong <daeyeon.dev@gmail.com> PR-URL: #47930 Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com> Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
For other candidate permissions, such as "net" or "env", this patch will pass the given reference without resolving it to an absolute path.
Signed-off-by: Daeyeon Jeong daeyeon.dev@gmail.com