-
Notifications
You must be signed in to change notification settings - Fork 8
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
[feature discussion] granular permissions for packages #1
Comments
Thanks for starting the discussion on packages 😄 (This is a more long form answer with context, as the project is new and it might be a good reference) Behind the scenes:
Would it be possible to define package-based permissions?
Caveats:
Where would these package permission definitions come from?
Overall the next step of the In #2 I'm discussing the idea of supporting a default config file that would scope all permissions to the project folder (and temp) by default, which should make most common projects work out of the box without the need to configure anything. We're still in the early days of this project but I'm eager to build something that is useful for myself, working on this made me acutely aware of the madness of not sandboxing random code from the internet. 😄 |
Thinking about it: Using a default configuration file mentioned in #2 in combo with package name specific extra permissions (defined in the default file) makes a lot of sense: We get good security by default with zero work for everything we work on and when using packages like puppeteer we only need to add their name and special permissions once to our default config and whenever puppeteer is used anywhere the extra permissions will apply automatically. |
How exactly would such feature work? Will it still be a set of permissions for a single process, but now needed permissions would be automatically enabled/disabled according to used packages? Having read discussions about module-based granular permissions in deno repos, it seems like there's no simple way to detect what code belongs to what package and what permissions it should have. For example, a library might take user function as callback |
Here are some ideas:
|
I wonder if the new permissions API + nodejs/node#47855 can be used for this. |
Would it be desirable and technically feasible to define package-based configurations instead of project-based configurations?
I.e.:
got
to access the internetpuppeteer
to access/tmp
and the internet to store Chrome profiles.random-ssh-client
to access~/.ssh/id_rsa
The text was updated successfully, but these errors were encountered: