-
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
lib: add security warning on io full access #53609
base: main
Are you sure you want to change the base?
Conversation
Review requested:
|
doc/api/permissions.md
Outdated
When `--allow-fs-write=*` is permitted, it may inadvertently lead to invalidating | ||
the permission model because of unintended file access, like full write access | ||
to memory with `/proc/self/mem`. |
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.
How does it apply in a Node.js application? I understand the motivation, but I can't see how this could be exposable.
At this point I don't think we need a runtime warning for that. I think adding a doc warning is ok.
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.
Many projects and programs may recommend permitting all IO operations - and even if they don't, users may do it anyways (like an 'issue' raised in node with pm2, where the author permitted all read operations). A doc warning might be noticed by some, but the immediate jump for libraries that need access to system files outside of the current directory might grant all IO permissions instead of properly checking which ones to grant, which was very common in Deno CLIs (example 1 - inside deno, example 2 - slack install script)
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.
FWIW, I think this section might be too specific. There are many paths that users should probably never grant (read or write) access to.
Also, /proc/self/mem
is a super specific example, and /proc
is only one of many problematic things. (And yet, many applications will want to access /proc
because it's the only way to implement many monitoring mechanisms on Linux.)
Thanks for the PR! |
@RafaelGSS @tniessen did those two previous commits address your concerns? |
Adds #53598, warning about access granted to all files.
Should there be a note in the docs, or should that be inlined into the warning?