haskell / play-haskell

Haskell Playground
130 stars 8 forks source link

Audit the containerisation code #6

Open tomsmeding opened 1 year ago

tomsmeding commented 1 year ago

The worker currently uses bubblewrap (using linux cgroups) for privilege separation, and systemd-run (using linux user namespaces) for limiting of volatile resources (time, memory). While this is a nice, lightweight setup, it's not an existing setup, and it has not been audited.

If anyone has the expertise to have an informed opinion about these kind of systems, please help!

The system is as follows: (all is in the play-haskell-worker/ directory)

Assuming that the worker (and the server and the client webpage after that) handle the output bytes safely, the security property is (loosely formulated) that no matter what bytes are sent to P, the outside of the container is not harmfully affected. That is to say: the container does not perform network activity, puts no lasting data on disk, and maybe other things that I haven't thought of.