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.
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.
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.
-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.
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.
SecretsConfig::bad_pattern_sources finds the most specific layer holding the pattern in
that section. Notes, refusals and fermata check say "a[ in [policy.read] of .botsecrets".
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.
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)
Both READMEs, security-model.md, configuration.md, commands.md, threat-model.md, the crate
CLAUDE.md and the filter section of matrix.md. Each stated form has a row in
tests/known_limits.rs. The Edit claim now says it comes from Claude Code's documentation, and
"by no other route" is gone. cli_hook_fail_closed's open control asserts that .botignore and
the read gate stay on and that a note names the bad pattern.
- 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.
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.
count_masks counts runs of exactly five stars, or <REDACTED: marks under typed and
named; absent counts 0. write_pairs gives each change's text before and after. The
guard denies when a change holds more marks than what it replaces, and a Write's
"before" is the file on disk, read only if the new text holds a mark. Both projects
of a path call decide. on_mask_write = "allow" turns it off. The refusal says "ask the
user", names the setting and quotes nothing.
Each PostToolUse that masked adds a note beside the output.
cli_hook_fail_closed: a masked Write's only note is now the masks note, asserted
exactly, in place of "no note".
tfstate and its backup parse as JSON and stay stopped on Read. tfvars, credentials and
sh, bash, zsh, ini, conf, cfg parse as Env. Key files are OpaqueText: only a private PEM
block's body or a single token of 16 or more characters enters the manifest, past the
key filter, and such a file never fails, so a binary .key refuses nothing under deny.
A certificate-only PEM passes Read with no entries. A UTF-8 BOM is stripped in
parse_content.
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.
SecretFileSet is the one answer to "is this a secret file?", for discovery and
Policy. unmaskable_reason says why a listed file cannot be masked. Policy::check
is now check_path_rules plus check_read_gate, so that commands can take the rules
without the gate (2D). on_unparsed_read = "allow" turns the gate off.
One tool-to-op mapping in claude.rs, read by parse_request and post_tool_op. A
Grep with a path is a Read; with none it stays {}.
A [[file]] override with a format gives the gate a parser. A bad [files] glob
costs the gate, not .botignore or [policy]: a note beside text output, exit 2
from fermata check, a refusal under deny. Text holding NUL counts as a failed
parse: UTF-16 without a BOM is valid UTF-8 and would pass as garbage keys.
.botignore matches a path or any parent, with the path tried first, so
!vendor/keep beats vendor/. Policy::check takes a relative path against the
root and also checks the path as the file system resolves it, spelled from the
root as given, so a link or a root behind a link hides nothing. session_dir: the
payload's cwd if absolute, else the process directory, for both hooks; fermata
check and the hook make paths absolute.
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.
deny_unknown_fields on every config struct. [enforcement] mode, EnforcementMode and
mask-entire-file are gone, and on_parse_error defaults to allow. New settings
on_unparsed_read and on_mask_write, default deny, read by later blocks.
SecretsConfig::load stays strict for the channel filter. load_or_default skips only the
layers that fail, so a typo keeps the other layers and the default list. Hooks note the
broken layer and any skipped() secret file beside output that shows text, not beside
every Write (shows_text). Under deny the refusal is unchanged. fermata check exits 2
with the line number.
A non-UTF-8 layer counts as a failed layer; a layer whose bytes cannot be read stays
silent, as pinned.
The public README, crate README, docs, SVGs, crate description and --help no
longer present fermata as protection. The README opens with a warning and a
"Known to fail" list from recheck-2, each item reproduced on this code.
The docs also said things the code does not do: the hook never checks a Bash
command against path rules (threat model L1 to L4), [enforcement] mode has no
effect, [policy.read] takes patterns and not deny, a .botignore directory
pattern misses the files below it, and a relative path never matches.
A failed command's output is stated as the largest limit: only a [policy.bash] deny stops
it, and only for the spelling it names. Monitor output and changed-file attachments added.
fermata is documented as no permission approver. Recovery from onFailure block.
PreToolUse answers {} when no rule stopped a call: permissionDecision allow skipped Claude
Code's own prompt. allow_prefixes now only skips fermata's ask rules. PowerShell and Monitor
commands reach [policy.bash]. SCHEMA_VALUES covers the remaining getters of 2.1.314, Artifact
refuses in its read form, and data beside a binary type stays only in a top-level block.
Read shows a file's bytes, a loaded program shows the decoded text. The manifest held
only one. It now holds the file's text, the decoded text, the JSON- and \n-escaped forms,
each line of a multi-line value from 8 characters, and numbers from 6. .env parses quoted
values over lines and a comment after a value.
The hook matcher goes: Grep, Glob, WebFetch, Agent and MCP output needs the hook
too. onFailure: block on PreToolUse (v2.1.295+) stops a tool when fermata cannot
run. A new Known limits section lists what is not covered, including failed tools,
whose text no hook can rewrite.
Built-in tools and normal MCP results send tool_response as an object or an
array, which the hook read as empty: nothing was redacted under any setting.
The hook now walks any shape, masks every string and returns the same shape.
Enum and literal values of Claude Code's output schemas (read from v2.1.314)
stay when they match exactly, because a mask there fails the schema and the
original is used. A secret that cannot take a mask refuses the output under
every setting. Refusals: Bash and Read answer a minimal schema-valid output,
others keep their shape with exact enum values only.
Also: an unreadable config layer no longer counts as deny, multi-line string
spellings of deny count, vim's other swap names and Kate's are editor files,
the heuristic warning moves to additionalContext, and PreToolUse answers
quietly for tools it has no rules for.
One non-UTF-8 .env.swp blocked everything a checkout sent across a link, and would
withhold every tool output under deny. A discovered *.swp, *.swo, *.swn, *.swx or
*~ that cannot be read or parsed is now passed over under every setting. One that
can be parsed stays known to the redactor. .bak, .env.gpg and [[file]] overrides
keep the rule.
PostToolUse replaced nothing when a secret file or the config failed. Under deny
it now puts a refusal naming the file in place of the output, in the tool's own
shape: Claude Code ignores a replacement that does not match a built-in tool's
schema. PreToolUse answers deny for a config or rules it cannot load or apply.
A config that cannot be loaded leaves the setting unknown: a layer with a line
setting deny counts, a layer whose bytes cannot be read counts as deny, and
anything else stays open as today.
Parse errors keep the format and line number and drop the parser's text.
I-2: Sieve::load sets on_parse_error to Deny whatever the root says, so fermata's
default no longer fails open and its print of the failing line is not reached. A
[[file]] override now honours Deny too: it only printed a warning under every setting,
a second way open the review did not name. M-3: a to id the built-in rules call a
secret refuses the message, and the reason does not quote it.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
OutboundFilter over dirigent_fermata runs in LinkTransport before the cap:
known values of the sender's checkout and the config dir, then the scanner's
High findings, over body, error, persona and as_of project. A root that cannot
be read refuses the message; the reason names no path because it can cross. A
card loses that agent's title and project instead. The instance's own text
crosses a broken config with the built-in rules only, as an asker has no
timeout. Fermata's walker no longer enters skipped directories, which it
walked per message otherwise.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Realign fermata around redaction (PostToolUse) as the primary security
layer, with access control (PreToolUse) as supplementary write/bash
protection. Remove botignore.toml — policy rules now live in .botsecrets
[policy] section. Add fermata.toml as an alias for .botsecrets.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
New user-friendly README modeled after sandcage's layout (Why / Quick Start /
How It Works), plus four focused docs under docs/:
- commands.md — full CLI reference with options, exit codes, examples
- configuration.md — .botignore, botignore.toml, .botsecrets reference
- security-model.md — the Reveal Triangle and defense-in-depth layers
- threat-model.md — L0-L6 coverage, honest limitations, pairing guidance
All Dirigent/monorepo internals stripped — ready for standalone export.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Walk-up: .botignore no longer stops the search but is remembered as a
fallback when no strong marker (.git, botignore.toml, .botignore.toml)
is found — prevents fail-open regression for projects without .git
- Extract inline SVGs to policy-layers.svg and architecture.svg
- READMEs reference SVGs via <img> tags
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- fermata: position as security layer, add policy protection layers SVG,
update walk-up docs to match code change
- dirigate: clarify Dirigent Protocol as ACP superset with parity goal
- anth: tools-first structure (anth_usage then anth_bear), library second
- dirigent: link to tool repos instead of install instructions, add
architecture SVG, under-construction notice
- purge all localsettings references from examples
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Only .git, botignore.toml, and .botignore.toml define project boundaries.
A bare .botignore is a policy file, not a root marker.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Rewrote both the monorepo and export READMEs with a punchy tagline, status
table, realistic before/after scenarios (including the bash bypass case), full
configuration reference, and Claude Code hook integration guide.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Adds license (MIT OR Apache-2.0), repository (placeholder TODO URL),
readme, keywords, categories, rust-version, dual LICENSE files, and a
README install section. Adds a regression test asserting these fields
remain present so future edits cannot silently break cargo publish.
`cargo install --path crates/dirigent_fermata --features cli` produces
a working `fermata` binary; `cargo publish --dry-run` is clean.
Move all 29 workspace members from packages/<name>/ to crates/<name>/.
Updates: workspace Cargo.toml (members + path deps), justfile, root
CLAUDE.md, scripts/build/CARGO_INSTALL.md, docs/architecture/crates.md
(renamed from packages.md), structural references in docs/architecture
and docs/configuration, per-crate CLAUDE.md self-references. Historical
plans, reports, and building/ docs are left untouched.
No behavior change; just check-all stays green and fermata tests pass.