Skip to content
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

[WIP] feat: support "permissions" in config file #14520

Closed

Conversation

bartlomieju
Copy link
Member

@bartlomieju bartlomieju commented May 7, 2022

Closes #12763

TODO:

  • When a configuration file is applied and the "permissions" section is parsed and the permissions are applied from the "permissions" section. Any other flags on the command line are ignored.
  • If there are flags on the command line and a config file is being applied, and the config file contains "permissions" a warning should be issued to stderr that permissions from the config file are being applied.
  • Remote configuration files are supported, but a summary of the permissions is prompted before hand and requires user configuration to continue. (see Proposal: add permissions to config file #12763 (comment))
  • In situations where a base path is needed for relative paths (for --allow-read and --allow-write) the config file is used as a base, versus the cwd.

@jsejcksn
Copy link
Contributor

jsejcksn commented May 9, 2022

I think it is important for #13452 to be completed before this lands. It is core to Deno's security model that code is run in a sandbox with only explicitly granted permissions, and if config files are automatically detected (with no way of disabling that behavior), and config files include permissions, then that means that programs will be run with implicit permissions (with no way of disabling that). ⚠️

@bartlomieju
Copy link
Member Author

I think it is important for #13452 to be completed before this lands. It is core to Deno's security model that code is run in a sandbox with only explicitly granted permissions, and if config files are automatically detected (with no way of disabling that behavior), and config files include permissions, then that means that programs will be run with implicit permissions (with no way of disabling that). ⚠️

@jsejcksn opened #14555

@bartlomieju
Copy link
Member Author

There's no consensus about this feature in the core team. Closing for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Proposal: add permissions to config file
2 participants