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 02:20:48 +0000
commit95785181465a58dd6954ff0f81f29a1761e57a28 (patch)
tree0d2a0c70dae0100f8eb471f990a4621affb76749 /share/bash-completion
parent2aea62bd55e5d8703f70710734d30f8d6cb925be (diff)
enstate: validators and renderers in a sandbox
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 d1e2b49..8e55c18 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 --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=