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

Imposing RAM / time limits, and security rules #442

Open
lukehutch opened this issue Jan 16, 2025 · 3 comments
Open

Imposing RAM / time limits, and security rules #442

lukehutch opened this issue Jan 16, 2025 · 3 comments

Comments

@lukehutch
Copy link

I want to be able to set a max RAM usage and run time limit for a V8 process in Javet. I also want to be able to impose some limits on what the sandbox can do (mostly denying network access, although I would also want to deny filesystem access if running on Node rather than V8).

How can I do those things? If it's not possible currently, please take this as a feature request :-)

@caoccao
Copy link
Owner

caoccao commented Jan 16, 2025

Memory Management

Please check this doc out. NodeFlags and V8Flags are the ones you might want to look into.

File Access

Please check this blog out. You can achieve all goals by yourself.

@lukehutch
Copy link
Author

Thanks for those pointers. What about setting the max runtime for a given execute call? I don't see that anywhere. What I would like to see is a V8Options field where max runtime can be set in milliseconds, and if the time is exceeded, an exception is thrown back to the JVM caller.

@caoccao
Copy link
Owner

caoccao commented Jan 17, 2025

Please check this doc out.

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