Skip to content

feat: deny only named protected targets and secret output - #66

Merged
liby merged 3 commits into
mainfrom
feat/deny-only-explicit-effects
Nov 21, 2026
Merged

liby merged 3 commits into
mainfrom
feat/deny-only-explicit-effects

Conversation

@liby

@liby liby commented Nov 21, 2026

Copy link
Copy Markdown
Member

A usage audit found about 0.6% of tool results denied, and in samples almost none of the hidden-search, inline-mention or coverage refusals were real hits. The guard now denies a call only when it reaches a recognized protected target with an operation that exposes it, or when a command explicitly prints a secret. Unknown programs, unmodelled shell syntax and targets the guard cannot resolve no longer block; they are left to operating system read restrictions. A checker fault, a malformed event or the deadline still blocks.

The release notes list what v0.8.18 users will notice: which calls now pass and should move to runtime read restrictions if they relied on the guard, which stay refused, and the six retired reason IDs. Every denial now ends with Triggered by and the path or program that matched.

One named file in another app's container may now be read, written or inspected by a program that reads only the paths it names, since that raises at most one permission prompt. Programs that can list or recurse into a directory operand, globs, run-time paths and a working directory inside a container stay refused. A target in a container is checked against both its own protection and App Data's, so a key or .env there is refused as a credential read and listing a container's .ssh stays refused.

The second commit removes the mechanisms that only carried a decision nothing makes any more: the execution-owner requirement, the structured-only parser arm, and the coverage recovery. Native refusals (input size, nesting, relative cwd, invalid UTF-8) get their own Refused outcome. The third commit rewrites AGENTS.md, the README and the setup guide's known limits for the new boundary.

Replaying 178,187 logged tool calls as data, blocked calls fall from 2,105 under v0.8.18 to 185, and no call is newly blocked. Each new or changed rule was ablated toward the weaker decision and a fixture row failed before it was restored. Rare spellings found in review, such as curl's -v --no-verbose or Ruby's -n after the script name, are documented as known limits rather than given new mechanisms.

liby added 3 commits November 21, 2026 19:57
A usage audit across two machines found about 0.6% of tool results
denied, and in samples almost none of the hidden-search, inline-mention
or coverage refusals were real hits. The guard now blocks a call only
when it reaches a recognized protected target with an operation that
exposes it, or when a command explicitly prints a secret. Unknown
programs, unmodelled shell syntax and possible indirect reads end
inspection without a denial; checker faults (a crash, a malformed event,
the deadline) still block.

- Each denial names what triggered it (`Triggered by ...`): the path,
  or the program that prints a secret, so the agent can see what the
  rule matched.
- Coverage gaps (unsupported syntax, executor divergence, inspection
  budgets, unresolved targets) no longer refuse the call. Lines before a
  multi-line syntax error are still checked, since Bash runs them. A
  loop past the inspection budget stops repeating, but the statements
  after it are still checked once, because an exhausted budget now lets
  the call proceed.
- Inline interpreter code is data: the code scanner, its
  `inline_credential_file` reason and its `printenv` detection are
  removed.
- Operands of unknown programs, an interpreter script's arguments, and
  the operands of `cargo run` and words after cargo's `--` are names
  rather than reads; only modelled readers read their operands.
- A hidden recursive search of a public root is no longer refused. Such
  a walk is checked through the names its filters bound, and a filter
  that only shares a suffix with a credential name, such as `*.json*`,
  does not name it. Walks rooted at a credential directory stay denied,
  and their advice now suggests listing the directory or reading a
  non-secret file in it by name.
- A single named App Data path may be read, written, changed or
  inspected by a program that reads only the paths it names, such as
  `cat`, `sed`, `jq` or `tee`. Programs that can list or recurse into a
  directory operand (`ls`, `rg`, `grep -r`, `zgrep`, `diff`,
  `openssl`), listings, walks, globs and run-time names in a container,
  a working directory inside one, and scans from the home directory or
  ~/Library stay denied. A target in a container is checked against
  both its own protection and App Data's: a key, environment or store
  file there is refused as a credential read, and listing a container's
  `.ssh` stays refused although `.ssh` listings are otherwise allowed.
  `rm` walks only with a recursive option and `ln` never walks.
- `curl -v` and `--trace` are denied only when the command line passes
  a credential input, and the denial says it matched such an input;
  `.ssh` metadata and listings are allowed; `git -C / log` is not a
  broad scan; sed script text and `ls -d` operands are not reads.
- `env | cut` stays denied, now with advice to list names with
  `compgen -e`.

Replaying 178,187 logged tool calls as data, blocked calls fall from
2,105 under v0.8.18 to 185, and no call is newly blocked.
Since coverage gaps stopped refusing calls, several mechanisms only
carried a decision nothing makes any more.

- The execution-owner requirement and its `execution_owner_unavailable`
  reason are removed; nothing in the package enabled it.
- The structured-only parser arm is removed, so the parser selector,
  which had a single value left, is gone from the evaluator, tests and
  the development example's input.
- Native refusals (input size, nesting depth, relative cwd, invalid
  UTF-8) get their own `Refusal` type and `Outcome::Refused`, while
  `CoverageInsufficient` now always proceeds. `Disposition` and the
  always-empty coverage recovery are removed, and the refusal messages
  match exhaustively instead of falling back to sentences for gaps that
  can no longer refuse.
- Tests that built refusals production cannot produce, and a fixture
  assertion helper no row used, are removed.

Wire output is unchanged: replaying 50,336 logged calls, including
every call the previous build blocked, gives the same verdicts.
The setup guide, README and contributor instructions still described
the conservative refusals the guard no longer makes, so readers would
expect unknown programs and unmodelled syntax to be blocked, and an
agent following AGENTS.md would treat such a pass as a fail-open and
add a refusal back.

- AGENTS.md states the boundary: only a recognized protected target
  with an exposing operation, or secret output, denies; gaps proceed
  and checker faults block. It also rules out an `ask` decision or a
  model judge, and its ablation example no longer assumes unknown
  programs are the stricter fallback.
- docs/setup.md rewrites how the guard decides and its known limits for
  the new boundary, including which work bounds leave only one command
  unchecked and which end the check, and lists the refusals of calls
  that name no protected file.
- The unreleased notes tell v0.8.18 users which calls now pass, which
  stay refused, and which reason IDs are retired.
@liby
liby merged commit d505574 into main Nov 21, 2026
5 checks passed
@liby
liby deleted the feat/deny-only-explicit-effects branch November 21, 2026 12:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant