@@ -11,11 +11,11 @@ sandbox-run: run command in a secure OS sandbox
1111
1212#### Problem statement
1313
14- Running other people's programs is insecure.
14+ Running other people's programs is inherently insecure.
1515[ Rogue dependencies] ( https://www.google.com/search?q=malicious+python+packages&tbm=nws ) \*
1616🎯 or [ hacked library code] ( https://www.google.com/search?q=(hacked+OR+hijacked+OR+backdoored+OR+"supply+chain+attack")+(npm+OR+pypi)&tbm=nws&num=100 )
1717:pirate_flag : ([ et cet.] ( https://slsa.dev/spec/draft/threats-overview ) :warning : )
18- can wreak havoc, including access all your private parts** :bangbang : —think
18+ ** can wreak havoc, including access all your private parts** :bangbang : —think
1919all current user's credentials and more personal bits like:
2020* ` ~/.ssh ` ,
2121* ` ~/.pki/nssdb/ ` ,
@@ -30,12 +30,12 @@ relies on impeccability of hundreds or thousands of dependencies, NodeJS and Chr
3030
3131Run scary software in separate secure containers:
3232``` shell
33- podman run -it -v .:/src -e PATH=/src debian:stable-slim scary-binary
33+ podman run --rm - it -v " $PWD : $PWD " --net=host --workdir= " $PWD " debian:stable-slim ./ scary-binary
3434```
3535or you can simply
3636` sandbox-run scary-binary `
37- which uses [ bubblewrap] ( https://github.com/containers/bubblewrap ) ** (of
38- [ Flatpak] ( https://en.wikipedia.org/wiki/Flatpak ) fame) under the hood.
37+ which uses [ ** bubblewrap** ] ( https://github.com/containers/bubblewrap ) (of
38+ [ Flatpak] ( https://en.wikipedia.org/wiki/Flatpak ) fame) to spawn your native OS container under the hood.
3939
4040
4141Installation
@@ -90,14 +90,15 @@ See more specific examples below.
9090
9191#### Filesystem mounts
9292
93- The current working directory is mounted with read-write permissions** ,
94- while everything else is mounted read-only. In addition:
93+ The ** current working directory is mounted with read-write permissions** ,
94+ while everything else required for a successful run (e.g. /usr)
95+ is mounted ** read-only** . In addition:
9596
9697* ` "$PWD/.sandbox-home" ` is bind-mounted as ` "$HOME" ` ,
9798
9899To mount extra endpoints, use ` BWRAP_ARGS= ` with switches ` --bind ` or ` --bind-ro ` .
99100Anything else not explicitly mounted by an extra CLI switch
100- is lost upon container termination.
101+ is ** lost upon container termination** .
101102
102103
103104#### Linux Seccomp
@@ -132,7 +133,7 @@ You can run `sandbox-run bash` to spawn **interactive shell inside the sandbox**
132133
133134#### Debugging
134135
135- To see what's failing, run the sandbox with something like ` strace -f -e '%file,%process' ...` .
136+ To see what's failing, run the sandbox with something like ` colorstrace -f -e '%file,%process' ...` .
136137
137138
138139Examples
@@ -166,5 +167,5 @@ You see a mistake—you fix it. Thanks!
166167
167168Viable alternatives
168169-------------------
169- See a few alternatives discussed over at
170+ See a few alternatives discussed over at sister project
170171[ ` sandbox-venv ` ] ( https://github.com/sandbox-utils/sandbox-venv/#Viable-alternatives ) .
0 commit comments