This is great. On a related note, we recently compiled Python 3.12.0 to WebAssembly: using it should shield almost any use case of malicious behavior even on external untrusted modules. https://wasmer.io/python/python Run it locally and see that filesystem access and network are completely sandboxed by default! :) wasmer run python/python
I know Docker is not 100% watertight, but it’s very unlikely a normal user encounters trojaned Python code that tries to break out from a container.
The run-time penalty for using WebAssembly for Python is pretty severe at the moment, at least what I have tried.