我想源代碼node.js沙箱能夠運行不受信任的用戶提交的代碼。Node.js沙盒運行不可信用戶提交代碼
有一些關於此的帖子,但他們都是舊的。我希望最新的帖子會有所幫助。
(2011)How to run user-submitted scripts securely in a node.js sandbox?
(2012)How to run untrusted code serverside?
(2013)Safely sandbox and execute user submitted JavaScript?
通過其他職位和研究這個,我發現下面的沙箱和漏洞:
(被囚)https://github.com/asvd/jailed
(Jailed Exploit)https://github.com/asvd/jailed/issues/33
(沙盒)https://github.com/gf3/sandbox
(沙盒漏洞利用)https://github.com/gf3/sandbox/issues/50
(沙堡)https://github.com/bcoe/sandcastle
(沙堡開拓)https://github.com/bcoe/sandcastle/issues/70
(節點的VM)https://nodejs.org/api/vm.html#vm_vm_runinthiscontext_code_options
(在文檔)注:VM模塊是不是一種安全機制。不要用它來運行不可信的代碼。
(VM2)https://github.com/patriksimek/vm2
(VM2開拓)https://github.com/patriksimek/vm2/issues/76
有誰知道,沒有已知漏洞使Node.js的沙箱?
使用AWS lambda函數 – idbehold
@idbehold - 感謝您的建議,但AWS不可用在我們的環境。希望直接在node.js服務器上執行此操作。 –