adobe / adobe/aio-cli-plugin-app-dev
isolate action code
- 主要语言
- JavaScript
- 星标
- 2
- 派生
- 5
- PR 合并指标
- 30 天内没有已合并 PR
描述
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. https://github.com/node-inspector/node-inspector/issues/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
贡献指南
调研方向
首先定位此 repository 中的 action 执行入口;该 issue 没有指定文件或测试。阅读 Node's vm 文档和链接的 isolation 参考资料,然后定义一种考虑 require 和 filesystem 访问的 isolation 方案;该 issue 没有指定具体的完成标准。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- javascript, node.js, webpack
- 领域
- cli, security
- Issue 类型
- 功能
- 难度
- 5/5
- 预计耗时
- 一周以上
- 活跃度
- 停滞
- 描述清晰度
- 需要澄清
- 新手友好度
- 25/100