google / google/codeworld

Run TemplateHaskell with sandboxing

Ouverte
#69 1 commentaire 0 réactions 0 personnes assignées Voir sur GitHub
discussion
Langage dominant
Haskell
Étoiles
1.3k
Forks
201
Métriques de merge des PR
Aucune PR mergée en 30 j

Description

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.

Guide de contribution

Ouvrir le guide de contribution

Piste de recherche

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.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Évaluation

Stack technique
haskell, node.js
Domaine
compilers, security
Type d'issue
Fonctionnalité
Difficulté
5/5
Temps estimé
Plus d'une semaine
Activité
À l'abandon
Clarté
Plutôt claire
Accessibilité débutants
25/100

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.