google / google/codeworld

Run TemplateHaskell with sandboxing

未关闭
#69 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
discussion
主要语言
Haskell
星标
1.3k
派生
201
PR 合并指标
30 天内没有已合并 PR

描述

From Luite:

> By the way, GHCJS runs Template Haskell with a JS engine now (it used to load native code) so it's not all that hard to build a variant that is safe enough for untrusted code. The standard implementation is a [small server script](https://github.com/ghcjs/ghcjs/blob/master/lib/etc/thrunner.js) that runs on node.js. GHCJS first sends the runtime system and the actual [Template Haskell runner code](https://github.com/ghcjs/ghcjs-prim/blob/master/GHCJS/Prim/TH/Eval.hs), and then incrementally all compiled splices and their dependencies. You could for example modify the script to use a [node.js sandbox](https://github.com/gf3/sandbox), if you're more adventurous you could even send it to the user's browser.

贡献指南

打开贡献指南

调研方向

Start by reading the linked GHCJS lib/etc/thrunner.js script and GHCJS/Prim/TH/Eval.hs runner to understand how Template Haskell code and dependencies are sent to Node.js. Investigate whether the proposed node.js sandbox can safely isolate untrusted code, then verify that Template Haskell still runs while native access is restricted.

由索引模型根据 Issue 内容生成。

评估

技术栈
haskell, node.js
领域
compilers, security
Issue 类型
功能
难度
5/5
预计耗时
一周以上
活跃度
停滞
描述清晰度
基本清楚
新手友好度
25/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。