I ended up building this TypeScript-based sandboxed Bash. If we compare it to other alternatives, it is divided into two layers:
- The core, with all the Bash commands and the operator logic.
- The runtime, a pluggable part that manages code execution in the sandbox. There's a Wasm runtime available based on a Rust runtime I launched a few months ago. [1]
In practice, the core calls the runtime to execute code and get back structured information from the sandbox, including exact filesystem changes (what was created, modified or deleted) and direct feedback in stdout.
I added commonly used commands, including `python3 -c` and `node -e`, but if you find an edge case where the current commands aren't enough, let me know.
GitHub: https://github.com/capsulerun/bash
--
debarshri•1h ago
mavdol04•1h ago
debarshri•55m ago