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

sandbox mode without access to global scope #89

Open
imolorhe opened this issue Nov 19, 2022 · 3 comments
Open

sandbox mode without access to global scope #89

imolorhe opened this issue Nov 19, 2022 · 3 comments
Labels
enhancement New feature or request

Comments

@imolorhe
Copy link

I'm trying to understand how sval works and particularly the sandbox. Is it possible to evaluate the code without allowing access to the global scope object, when running untrusted code?

@Siubaak
Copy link
Owner

Siubaak commented Dec 5, 2022

I think it's possible, if we complement all global objects by our own to prevent prototype pollution. However I've found the SES which may be a better choice.

@imolorhe
Copy link
Author

imolorhe commented Dec 5, 2022

I've looked into ses but it requires unsafe-eval to work unfortunately

@Siubaak
Copy link
Owner

Siubaak commented Feb 3, 2023

SES complemented by Proxy + Object.freeze. I think we can also use these apis to complement a sandbox by our own.

@Siubaak Siubaak added the enhancement New feature or request label Jan 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants