What we need is a capabilities based security system. It could write all the python, asm, whatever it wants and it wouldn't matter at all if it was never given a reference to use something it shouldn't.
Isn't this already possible? Give it its own user account with write access to the project directory and either read access or no access outside it.
Docker is enough in practice no?
[dead]
Isn't this already possible? Give it its own user account with write access to the project directory and either read access or no access outside it.