chore(contract): extract-guard rulings approved by the user, 64 KiB cap
This commit is contained in:
1 parent
cf9a3b8ea7
commit
f4b19d0dc1
1 file changed
+1
-1
@@ -17,7 +17,7 @@ Pass B `[gated 2026-11-04]` (user: recommended options): deny, not ask (the user
|
||||
|
||||
Design gate `[gated 2026-11-04]` (after the plan challenge: r1 FATAL ×3, r2 FATAL(9)/FATAL(7)/CONCERNS(2); user: "Hook simple + soft_deny", vaas-cli "les deux formes"): one POSIX-awk scanner that re-tokenizes every quoted, `$(…)`, backtick and heredoc text (no carrier list) and runs a detector from every watched tool word; remote commands follow the local rules (relative or absent destination passes); plus an `autoMode.soft_deny` line in settings.json for the forms no static parser sees; `vaas-cli ssh <vm> -- <cmd>` and `vaas-cli ssh <vm> '<cmd>'` both covered; accepted false positive: a text containing a complete extraction command into a system dir. Ruling: matcher `Bash|Monitor` (push-guard precedent, BDR-112), FILE SCOPE gains templates/settings/SETTINGS.md and CHANGELOG.md (doc-sync).
|
||||
|
||||
Gate rulings `[gated 2026-11-05]` (controller, after GATE 1 ECARTS(2) and GATE 2 PASS with 4 MEDIUM): the test suite's `# shellcheck disable=SC2016` is authorized (the single-quoted forms are the commands under test; same line in guard-bash.test.sh and seven other suites); a quoted script inherits the caller's cd directory (a `bash -c` script runs in the caller's cwd), so `cd / && ssh vm "tar xf a"` is a stated false positive; a `( … )` subshell restores the directory at its end; glob and brace destinations (`*`, `?`, `[`, `{a,b}`) are unresolvable (refused); cpio copy-pass (`-p`) counts as an extraction; commands over 256 KiB that name a watched tool are refused as too large to check.
|
||||
Gate rulings `[gated 2026-11-05]` (proposed by the controller after GATE 1 ECARTS(2) and GATE 2 PASS with 4 MEDIUM; user approved both the SC2016 suppression and the cd inheritance: "Oui, les deux"): the test suite's `# shellcheck disable=SC2016` is authorized (the single-quoted forms are the commands under test; same line in guard-bash.test.sh and seven other suites); a quoted script inherits the caller's cd directory (a `bash -c` script runs in the caller's cwd), so `cd / && ssh vm "tar xf a"` is a stated false positive; a `( … )` subshell restores the directory at its end; glob and brace destinations (`*`, `?`, `[`, `{a,b}`) are unresolvable (refused); cpio copy-pass (`-p`) counts as an extraction; commands over 256 KiB that name a watched tool are refused as too large to check. Re-scan round `[gated 2026-11-05]` (user: "Oui"): the cap is 64 KiB (busybox awk timing), `$"…"` is a quote, tool names built by expansion (`t$'a'r`, `t${x}ar`, empty `$()`/backticks) are a stated MISS.
|
||||
|
||||
## ACCEPTANCE CRITERIA
|
||||
1. A PreToolUse Bash hook refuses, before it runs, a command that extracts a package or archive into `/` or a system directory: `dpkg -x` / `dpkg-deb -x` (and their long forms) with such a destination; `tar` extracting with `-C` / `--directory` to one, or after a `cd` to one in the same command; `unzip -d` to one; including when the command sits inside `ssh … '<cmd>'`, `vaas-cli ssh … '<cmd>'` or `bash -c '<cmd>'`. The refusal names the rule and the safe path (list first, extract into a work dir, or let the user run it).
|
||||
|
||||
Reference in new issue
Block a user