4 Commits
Author SHA1 Message Date
g4borg 1e3e3648a9 fix(fermata): a write never takes a printed file past the gate; a flag's value rule leaves file arguments; every spelling of a write and of a shell's line is read
-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.
2026-11-07 09:48:21 +01:00
g4borg bc984b8625 fix(fermata): what a command writes meets the rules, also when it is not there yet
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.
2026-11-07 09:00:45 +01:00
g4borg 6bf602aa6a fix(fermata): a bad glob costs only itself; commands read what is there, behind a wrapper or a shell
- 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.
2026-11-07 02:00:45 +01:00
g4borg 16a8b13fb9 feat(fermata): core::paths names what a command reaches, by verb class; core::extract goes
Words, segments and paths of a command line, for Bash and PowerShell, with a
Prints, Metadata or Other class per path. Not wired to the hook yet (block 2D).
Beyond the plan's rules, to keep it from denying normal work: shell keywords are
no verb, comments and heredoc bodies name nothing, prose and URLs count only as
a real file. A word after < is a printing path and never the verb.
2026-11-07 00:55:12 +01:00