14 Commits
Author SHA1 Message Date
g4borg e83d886fa3 docs(fermata): the page lists the command holes left for the shell parser, each with a test
N-1b (a shell line ending in a backslash), S-1b (grep -fe clusters), R-1
(writes through a shell's positional arguments), R-2 (bash -oc pipefail),
R-3 (PowerShell short switches) as known failures, and the echo-only
positional argument as an over-denial. Command checks are marked best
effort until the shell parser round. security-model.md says positional
arguments are read only as printed. No src change.
2026-11-07 11:33:15 +01:00
g4borg d679aec6c3 docs(fermata): the page drops bash -c -o pipefail and names an indented private block and the = and : write forms 2026-11-07 10:05:18 +01:00
g4borg 938ce2d766 docs(fermata): the page names the spaced exclude flag a rule still stops 2026-11-07 09:51:52 +01:00
g4borg b9e8e52731 docs(fermata): the page lists what stays open after the fixes; the failure diagram leaves the public README
threat-landscape.svg showed specific failures and nothing else used it, so it is gone. The
false entry on runs outside a project now names all four markers, with a test.
2026-11-07 09:48:21 +01:00
g4borg 709f0cf1bc docs(fermata): the failure list moves out of the READMEs into docs/known-failures.md
One list, merged from both READMEs and security-model.md "Known limits", each entry with
its test. Entries fixed on this branch are gone. Both READMEs keep the warning and point at
the page. tests/docs_known_failures.rs keeps the page and known_limits.rs in step, and
test_crate_export.py checks that the public README's links resolve in the exported tree.
2026-11-07 09:07:19 +01:00
g4borg 33e330a4eb fix(fermata): a path call's leading ~/ is expanded, so Grep with path ~/.ssh/id_rsa meets the gate 2026-11-07 09:02:27 +01:00
g4borg 8998540375 fix(fermata): a certificate file is judged by all of its text, not by its armor labels
API_TOKEN=x, a lowercase private block or a raw key beside a certificate block no longer
pass the read gate. Bag Attributes, subject= and issuer=, a CA bundle's comments and the
head of x509 -text stay allowed, so real PEMs keep passing.
2026-11-07 09:02:19 +01:00
g4borg f78fed95ef fix(fermata): a flag's value and an excluded name stop no harmless command
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.
2026-11-07 09:01:10 +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 8dd5a81bc8 fix(fermata): a script named like a wrapper or a metadata verb hides nothing; every shell's command line is read
./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.
2026-11-07 08:58:35 +01:00
g4borg 34298c5f9a fix(fermata): a shell behind a wrapper and a verb given by path are read; the forms that stay text are named
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)
2026-11-07 02:11:10 +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 999ed6ba4e docs(fermata): known limits, config reference and READMEs say what the tests show
Known to fail holds only what known_limits.rs pins or Claude Code's docs state;
the multi-line quoted value gets its own limit test. configuration.md follows the
code (unknown fields, [enforcement] settings, marks, plain settings, verb classes)
and every TOML example of it is loaded by tests/docs_toml_examples.rs. Speed
numbers are measured with a release build. matrix.md notes the new refusals.
2026-11-07 01:38:19 +01:00
g4borg d67ccdc039 test(fermata): known_limits.rs, each named limit shown through the binary 2026-11-07 01:32:13 +01:00