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

Does .wasm module under --experimental-pemission protect? #1168

Open
LongTengDao opened this issue Dec 18, 2023 · 4 comments
Open

Does .wasm module under --experimental-pemission protect? #1168

LongTengDao opened this issue Dec 18, 2023 · 4 comments

Comments

@LongTengDao
Copy link

LongTengDao commented Dec 18, 2023

.node file is native and can't support under --experimental-permission, if I understand correctly.

What's the fundamental difference between .wasm and .node?

Does it safe if I enable both --experimental-pemission and --experimental-wasm-modules? Will .wasm module be limited run by --experimental-pemission exactly same as .mjs?

And what about --experimental-wasi-unstable-preview1 (wasi)?

Thanks

@RafaelGSS
Copy link
Member

RafaelGSS commented Dec 18, 2023

wasm modules won't be limited by the permission model. Permission Model guarantees the fs, child_process, spawn modules will have the correct permission to execute. WASM could, technically, bypass it.

@LongTengDao
Copy link
Author

Is it not possible for .wasm, just like .node?

Or just currently not limit, and will do that in the future?

@RafaelGSS

@LongTengDao
Copy link
Author

(Why can wasm bypass it? I remember wasm is module without side effects, without dom or io access ability, and the imports inside also need be apply by the WebAssembly.instantiate() explicitly. Thank you!)

Copy link
Contributor

This issue is stale because it has been open many days with no activity. It will be closed soon unless the stale label is removed or a comment is made.

@github-actions github-actions bot added the stale label Mar 19, 2024
@RafaelGSS RafaelGSS removed the stale label Mar 19, 2024
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

No branches or pull requests

2 participants