fence

Lightweight sandbox for commands with network and filesystem restrictions

brewmacoslinux
Try with needOr install directly
Source

About

Lightweight sandbox for commands with network and filesystem restrictions

Commands

fence

Examples

Run a command with no network access$ fence --no-network echo 'Hello World'
Execute command with restricted filesystem access to specific directory$ fence --allow /tmp -- ls /tmp
Run untrusted script with both network and filesystem restrictions$ fence --no-network --read-only /home/user/script.sh