I'm currently facing this issue. I've resorted to implementing my own execution environment albeit limited.
It goes like this:
- bash script parser + interpreter (with hooks for things like file open, execute etc.,)
- wasm executor for execution.
- wasm implementations of common tools like coreutils, grep, sed etc., from the uutils project.
- wasm implementation of python by a VMware backed project.
- entirely virtualized filesystem using Go's io/fs.FS. (tmp dirs can be implemented using any backend)
Works like a charm for the limited usecase I have. There are definitely some drawbacks with threading and especially with preopens in wasm. But a cheap sandbox for simple file explorations and minimal computations.
It goes like this: - bash script parser + interpreter (with hooks for things like file open, execute etc.,) - wasm executor for execution. - wasm implementations of common tools like coreutils, grep, sed etc., from the uutils project. - wasm implementation of python by a VMware backed project. - entirely virtualized filesystem using Go's io/fs.FS. (tmp dirs can be implemented using any backend)
Works like a charm for the limited usecase I have. There are definitely some drawbacks with threading and especially with preopens in wasm. But a cheap sandbox for simple file explorations and minimal computations.