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

Block requiring Node Addons #327

Closed
techar opened this issue Nov 20, 2020 · 1 comment
Closed

Block requiring Node Addons #327

techar opened this issue Nov 20, 2020 · 1 comment

Comments

@techar
Copy link

techar commented Nov 20, 2020

How do you block requiring the Node Addons? The Addons might as well be doing the same things like disallowed modules. I can't find any Node build arguments nor vm2 options.

My vm2 config is:

  new NodeVM({
    require: {
        external: true,
        builtin: [x,y,z],
        mock: {..},
        context: 'sandbox'
    }..
@XmiliaH
Copy link
Collaborator

XmiliaH commented Apr 7, 2021

You can either set option require.external to false to disable any external module or restrict modules to those in a specific path with the require.root option.

@XmiliaH XmiliaH closed this as completed Apr 7, 2021
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