Pointers:
- Is there a sandbox mode in Elixir? - #4 by rvirding
- How to create a sandbox to run untrusted code/modules? - #8 by DianaOlympos
IMO either use an embedded script engine (like GitHub - rvirding/luerl: Lua in Erlang · GitHub), or have a separate small machine to which you delegate possibly unsafe external code.
Somebody used a pretty cheap setup to achieve something similar: How to setup an Elixir sandbox for a nerves project in 2 simple steps with Nanobox


















