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

isolate action code #32

Open
shazron opened this issue May 10, 2024 · 2 comments
Open

isolate action code #32

shazron opened this issue May 10, 2024 · 2 comments
Labels
enhancement New feature or request

Comments

@shazron
Copy link
Member

shazron commented May 10, 2024

Right now all action code that is run, has access to the host's node environment -- which is the developer's machine.
This includes the filesystem, running processes, etc. This will not be representative of a true serverless system which we are simulating.

Explore code isolation via the node vm module: https://nodejs.org/docs/latest-v18.x/api/vm.html
Take note that if the code to run uses require we will need to pass in the require loader, which may or may not be secure. In general this should not be a problem since we webpack the code.

Related:

  1. Setting a breakpoint in code, that is run in the vm module node-inspector/node-inspector#284
  2. https://www.rocket.chat/blog/node-js-vm
  3. https://github.com/laverdet/isolated-vm
  4. https://github.com/Richienb/node-polyfill-webpack-plugin (note fs is not in there, since browsers do have this now, but we can easily add the fs fallback in)
  5. https://blog.logrocket.com/how-to-protect-your-node-js-applications-from-malicious-dependencies-5f2e60ea08f9/
  6. https://github.com/tschaub/mock-fs
@shazron shazron added the enhancement New feature or request label May 10, 2024
@aiojbot
Copy link

aiojbot commented May 10, 2024

JIRA issue created: https://jira.corp.adobe.com/browse/ACNA-2980

@shazron
Copy link
Member Author

shazron commented May 18, 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