Scoping -P permissions for a simple Vite setup— expected effort? #36202
Replies: 2 comments 1 reply
|
On the workspace-climbing part specifically: that's Vite/pnpm walking up the tree looking for a workspace root, not deno. Your empty On env and ffi: leaving those open for a bundler is normal for now — native build tools and their child processes ask for a lot, and there's no reliable static list to allow ahead of time. Denying the few sensitive values (
|
|
The important split here is Deno vs Vite. Vite is what walks upward looking for a workspace root. Its documented controls are
FFI is the sensitive one: Deno documents that loaded native libraries are outside the runtime sandbox. If the bundler cannot work without broad Deno permissions · Deno permission config · Vite |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Hi all! First, thanks for deno, it helps to learn a lot.
I wanted to be a good citizen and actually scope a minimal permission set for a basic Vite + web extension. You could see that video about how security prompts just train us to hit "allow all" by the end of the day. But I tried:
A couple of observations:
Workspace climbing: Vite keep reading all the way up my directory tree looking for project files (like pnpm-workspace.yaml). Dropping an empty yaml in my project root stopped the search, but that feels like a weird workaround. Is there a right way to set a project boundary?
Env & FFI: I eventually had to leave env wide open due to dozens of requested tool-specific variables, and ffi wide open for native build bins. Not a big issue though: probably it is easier to deny access to sensitive values.
Is iterating manually like this pretty much the expected workflow for bundlers right now, or did I miss a smoother trick? I know about DENO_AUDIT_PERMISSIONS but not sure if it helps to find critical permissions (as opposed to permissions we could safely drop).
How do you usually handle the workspace-climbing issue without dropping dummy files around? What's a more practical way to handle deno's permissions??
All reactions