0
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-10-30 09:08:00 -04:00
denoland-deno/runtime/ops
Asher Gomez 6fb7e8d93b
feat(permissions): add "--deny-*" flags (#19070)
This commit adds new "--deny-*" permission flags. These are complimentary to
"--allow-*" flags.

These flags can be used to restrict access to certain resources, even if they
were granted using "--allow-*" flags or the "--allow-all" ("-A") flag.

Eg. specifying "--allow-read --deny-read" will result in a permission error,
while "--allow-read --deny-read=/etc" will allow read access to all FS but the
"/etc" directory.

Runtime permissions APIs ("Deno.permissions") were adjusted as well, mainly
by adding, a new "PermissionStatus.partial" field. This field denotes that
while permission might be granted to requested resource, it's only partial (ie.
a "--deny-*" flag was specified that excludes some of the requested resources).
Eg. specifying "--allow-read=foo/ --deny-read=foo/bar" and then querying for
permissions like "Deno.permissions.query({ name: "read", path: "foo/" })"
will return "PermissionStatus { state: "granted", onchange: null, partial: true }",
denoting that some of the subpaths don't have read access.

Closes #18804.

---------

Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
Co-authored-by: Nayeem Rahman <nayeemrmn99@gmail.com>
2023-08-03 13:19:19 +02:00
..
os feat(runtime): sys_info.rs - Use KERN_OSRELEASE on {Free,Open}BSD (#19849) 2023-07-22 05:50:57 +02:00
web_worker Reland "fix(cli): don't store blob and data urls in the module cache" (#18581) 2023-07-02 00:52:30 +02:00
fs_events.rs refactor(core): remove force_op_registration and cleanup JsRuntimeForSnapshot (#19353) 2023-06-03 14:22:32 -06:00
http.rs refactor(serde_v8): split ZeroCopyBuf into JsBuffer and ToJsBuffer (#19566) 2023-06-22 23:37:56 +02:00
mod.rs refactor: Add "deno_fs" extension crate (#18040) 2023-03-07 18:13:44 +09:00
permissions.rs feat(permissions): add "--deny-*" flags (#19070) 2023-08-03 13:19:19 +02:00
process.rs fix(runtime): print process name in case of spawn error (#19855) 2023-07-19 01:24:30 +02:00
runtime.rs chore: fix typos (#19572) 2023-06-26 09:10:27 -04:00
signal.rs feat: Adaptations to support OpenBSD port (#19153) 2023-06-12 13:14:27 +03:00
tty.rs chore: fix windows clippy errors (#20014) 2023-08-01 23:30:19 +02:00
utils.rs refactor: move TaskQueue from deno_runtime to deno_core (#18016) 2023-03-05 00:10:31 +00:00
web_worker.rs refactor(core): remove force_op_registration and cleanup JsRuntimeForSnapshot (#19353) 2023-06-03 14:22:32 -06:00
worker_host.rs refactor(core): remove force_op_registration and cleanup JsRuntimeForSnapshot (#19353) 2023-06-03 14:22:32 -06:00