1

I'm using vm2 sandbox to only allow requiring some internal modules but how do you block requiring the Node Addons? The Addons might as well be doing the same things like disallowed modules. Do I strip it in /node/src/ or is there some other way? I can't find any Node arguments nor vm2 options.

My vm2 config is:

  new NodeVM({
    require: {
        external: true,
        builtin: [x,y,z],
        mock: {..},
        context: 'sandbox'
    }..
tuckuns
  • 11
  • 2

0 Answers0