N-1: a POSIX shell's words after its line get a printing segment of their own; eval, cmd
and PowerShell still join. N-2: the line flag is looked for among the shell's leading
options, skipping -o and the like, and PowerShell stops at -File. N-3: the splitter marks
unquoted < and > as tokens, so echo '>' | cat .env and cat '>' id_rsa are read. S-1:
--regexp, --file, --expression and clusters holding e or f give the pattern. A guard test
runs the re-check's ordinary commands.
-o counts as output only on a verb that neither prints nor is metadata, and on sort; what
sed -i and sort -o name stays Prints. A spaced exclude flag is skipped only where it takes
a value, so grep --ignore API .env is stopped again. >|, <>, a name with a space, sed -Ei
and --in-place, attached flag values, cp -t and a glob matching nothing yet are writes.
-ce, -cx, --command, rbash and more shells, pwsh -Com, cmd /k, bash -c --, and eval's whole
argument list are read, with all the words after the flag. git commit -F is no metadata.
Remote scp and rsync targets are no local path.
grep -A 2 .env a.txt, rg -t py .env, tar --exclude=.env and git --no-pager status .env
pass under a rule on .env. A small list of grep's and rg's flags with a value, four
exclude flags and git's quiet flags; grep -A 2 TOKEN .env and --include=.env stay stopped.
cp a.txt vendor/new, touch .env, echo x > .env and curl -o vendor/new are stopped under a
rule. Verb::Writes covers redirect targets, a list of writing verbs, sed -i, dd of= and
the value of -o. It meets [policy.write] as well as .botignore and [policy.read], and not
the read gate: writing a file reveals nothing.
./do .env, scripts/time .env and ./test .env pass no more: a wrapper counts by its file
name only as a bare word or an absolute path, and the word after an absolute path still
counts as a path, so /home/me/scripts/env .env is stopped too. A metadata verb has to be
a bare word. dash, ksh, mksh, ash, yash, fish, csh, tcsh, pwsh, powershell and cmd have
their command line read, and bash --norc -c no longer hides it.
The bash/sh/zsh/eval unwrap reads the word after the prefix walk, so sudo, env,
timeout, nohup, exec, xargs, busybox and X=1 in front of a shell no longer hide
its command line. A prefix counts by its file name, as a verb already did, so
/bin/bash -c, /usr/bin/env cat and /usr/bin/timeout 5 cat are read.
Named as limits, each with a test in known_limits.rs: dash -c, ksh -c,
bash -c -- x, eval past its first argument, sudo -u root bash -c, and on the read
gate eval cat id_rsa and cat <&3 id_rsa. (re-check I-3, I-4 leftover, I-5's stale line)
- A glob in [files] or [policy] that does not compile costs only that pattern while open,
with a note by name beside text output. A [files] list with none left leaves the built-in
list. Under deny the refusal stays, and the channel filter stays strict.
- A file named `credentials` is on the default list, at any depth.
- A word with a separator counts only if the path is there, the shell may expand it, or a
redirect names it: packages, branches and hosts' paths are not denied.
- timeout, nice, ionice, stdbuf, xargs and busybox are prefixes; `2>&1` stays in its segment.
- `bash|sh|zsh -c` and `eval` arguments are read as command lines.
- A `<<` with no closing line is no heredoc. A commented line's own comment is dropped.
Text holding NUL fails to parse. The unknown-field message says so. Durations are bound
to under 6 characters. More source extensions pass the gate.
- Removed: HarnessAdapter::post_tool_op (dead since 3C was dropped), tool_op back inline.
check_command_paths is wired for Bash, PowerShell and Monitor and merged with check_command, so
allow_prefixes never lifts a path rule. Prints verbs get the rules and the read gate, Other verbs
the rules, Metadata verbs nothing. A path call is decided by the path's project and the session's,
and the worst stands: a Read of ~/.ssh/id_rsa from a project is stopped, and so is ../b/x under b's rules.