aboutsummaryrefslogtreecommitdiffstats
path: root/share/bash-completion
diff options
context:
space:
mode:
authortv <tv@krebsco.de>2026-12-01 01:59:16 +0000
committertv <tv@krebsco.de>2026-12-01 01:59:16 +0000
commit2af90fd35ea8a0aafb9156653f5b28cbac4e1677 (patch)
treec2eceb7e2dae9625bb4e5a994e13151e11fd44d4 /share/bash-completion
parent5804d2b952ebead3d9bc238fc8db20af6563fddc (diff)
enstate: validators and renderers in a sandboxHEADmaster
By bubblewrap: everything read-only but OUT (and IN bound again after a fresh /tmp), a new /dev and /proc, namespaces of their own (no network), no capabilities, a new session, gone with the receptor. The setting sandbox is bwrap (found in the receptor's PATH, as the programs' environment is empty), or none; the module sets its bubblewrap. The tests run their programs in it where bubblewrap can make one (not in Nix's build sandbox), and a test checks that a program can't write outside OUT, nor into IN, and has no network nor environment.
Diffstat (limited to 'share/bash-completion')
-rw-r--r--share/bash-completion/completions/enstate17
1 files changed, 9 insertions, 8 deletions
diff --git a/share/bash-completion/completions/enstate b/share/bash-completion/completions/enstate
index 2900ba1..b0f827e 100644
--- a/share/bash-completion/completions/enstate
+++ b/share/bash-completion/completions/enstate
@@ -7,7 +7,7 @@ _enstate() {
local commands="--plan --apply --stage --status --materialize --migrate --pack"
# the settings, and those each command uses
local general="--config --unset --print-config"
- local settings="$general --state-dir --run-dir --schema --unit"
+ local settings="$general --state-dir --run-dir --schema --sandbox --unit"
local store="$general --state-dir --run-dir --schema"
local i w cmd= path= used=" "
# bash splits --option=VALUE into --option, =, VALUE
@@ -21,7 +21,7 @@ _enstate() {
case $w in
--plan | --apply | --stage | --status | --materialize | --migrate | --pack)
cmd=${w#--} ;;
- --out | --config | --unset | --state-dir | --run-dir | --schema | --unit)
+ --out | --config | --unset | --state-dir | --run-dir | --schema | --sandbox | --unit)
used="$used$w "
# its value, written apart or with =
if [ "${COMP_WORDS[i+1]}" = = ]; then i=$((i + 2)); else i=$((i + 1)); fi ;;
@@ -31,18 +31,19 @@ _enstate() {
esac
done
case $prev in
- --config | --schema) COMPREPLY=($(compgen -f -- "$cur")); return ;;
+ --config | --schema | --sandbox) COMPREPLY=($(compgen -f -- "$cur")); return ;;
--state-dir | --run-dir | --out) COMPREPLY=($(compgen -d -- "$cur")); return ;;
- --unset) COMPREPLY=($(compgen -W "state-dir run-dir schema unit" -- "$cur")); return ;;
+ --unset) COMPREPLY=($(compgen -W "state-dir run-dir schema sandbox unit" -- "$cur")); return ;;
--unit) COMPREPLY=(); return ;;
esac
local options
case $cmd in
"") options="$commands -h --help $settings" ;;
- plan | stage) options="--json $store" ;;
- apply) options="--json $store --unit" ;;
- status | materialize) options="--json $store" ;;
- migrate) options="--json --dry-run $store" ;;
+ plan | stage) options="--json $store --sandbox" ;;
+ apply) options="--json $store --sandbox --unit" ;;
+ status) options="--json $store" ;;
+ materialize) options="--json $store --sandbox" ;;
+ migrate) options="--json --dry-run $store --sandbox" ;;
pack) options="--out $general --schema" ;;
esac
local o candidates=