-
Notifications
You must be signed in to change notification settings - Fork 5.4k
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
Cannot read files from /proc/self/fd
since Deno 1.43
#23703
Comments
With some changes in 1.43 this unfortunately requires --allow-all now, as we don't currently have a way to discriminate between pipes and files in |
Looks like a lot more is now disallowed which is a big breaking change. Here is an example from the docs: $ deno run --allow-read=/etc https://deno.land/[email protected]/examples/cat.ts /etc/passwd
error: Uncaught (in promise) PermissionDenied: permission denied: open '/etc/passwd'
const file = await Deno.open(filename);
^
at Object.open (ext:deno_fs/30_fs.js:633:21)
at https://deno.land/[email protected]/examples/cat.ts:10:27 Moving from |
I personally don't mind adding more granularity to the --allow flags (supposing some new flag will come to allow these extra use cases). I just don't think it's a good idea to do it in Deno 1.x. |
This has been relaxed by #23718 and will work again in v1.43.2.
That's true, but we had to do it because of the security vulnerability that you can see at GHSA-23rx-c3g5-hv9w. |
Maybe supporting |
@felipecrs Read access to |
I see. |
I think we might be able to make this work without relaxing the security sandbox -- we'll allow opening FD magic links on unix systems, but only if they are not stdio, and are pipes. |
`deno run script.ts <(some command)` is a valid use case -- let's allow this to work without `--allow-all`. Fixes #23703
`deno run script.ts <(some command)` is a valid use case -- let's allow this to work without `--allow-all`. Fixes #23703
Version: Deno 1.43.1
https://github.com/felipecrs/deno-repro-fd-perm
The text was updated successfully, but these errors were encountered: