A reading hold (Read, Grep, Glob) does not hold every engine tool that reads: read_image, and tree/view under Glob (martha#296 r2 notes) #344

Closed
opened 2026-12-01 08:16:08 +00:00 by neptunus · 2 comments
Member

Purpose (fix): an owner's deny or ask rule on a reading tool holds every engine tool that reads, whether a keep or an /allow-always runs it, so no read the owner held back runs unasked.

These are from Jupiter's Fable review r=2 of martha#296 (PASS). They were noted as notes, not required, and are left out of PR 343 by Mars's ruling.

  1. A deny or ask on Read(./.env) or Grep does not hold a kept developer__read_image. theReadsHeld (src/carry_the_owners_allow_rules_to_an_engine/the_rules_for_a_launch.ts) holds only the Developer reads, which are the tools the recorded hints mark read-only and not open-world (today tree and view). read_image reads a file but is not marked read-only, so a reading hold misses it. The holds of martha#296 r1 (theOtherDeveloperToolsHeld) cover it only for a non-reading owner tool.
  2. A deny or ask on Glob does not hold a kept tree or view. Glob is not in CLAUDE_CODE_READING_TOOLS (Read, Grep), so it is read as "another tool", which holds every Developer tool except the reads.
  3. Cosmetic: an exact kept line that ends in :* (ls :*) is printed in the receipt as Bash(ls :*), which reads as a prefix rule.

Done when:

  1. A deny or ask on any of the owner's reading tools (Read, Grep, Glob; bare or with a pattern) holds every Developer tool that reads a file, read_image included, for keeps and /allow-always alike. One test per tool, red first.
  2. The receipt for an exact kept line cannot be mistaken for a prefix rule, and a test pins it.
  3. No new check or job.

Refs #296

Purpose (fix): an owner's deny or ask rule on a reading tool holds every engine tool that reads, whether a keep or an `/allow-always` runs it, so no read the owner held back runs unasked. These are from Jupiter's Fable review r=2 of martha#296 (PASS). They were noted as notes, not required, and are left out of PR 343 by Mars's ruling. 1. A deny or ask on `Read(./.env)` or `Grep` does not hold a kept `developer__read_image`. `theReadsHeld` (src/carry_the_owners_allow_rules_to_an_engine/the_rules_for_a_launch.ts) holds only the Developer reads, which are the tools the recorded hints mark read-only and not open-world (today `tree` and `view`). `read_image` reads a file but is not marked read-only, so a reading hold misses it. The holds of martha#296 r1 (`theOtherDeveloperToolsHeld`) cover it only for a non-reading owner tool. 2. A deny or ask on `Glob` does not hold a kept `tree` or `view`. `Glob` is not in `CLAUDE_CODE_READING_TOOLS` (`Read`, `Grep`), so it is read as "another tool", which holds every Developer tool except the reads. 3. Cosmetic: an exact kept line that ends in `:*` (`ls :*`) is printed in the receipt as `Bash(ls :*)`, which reads as a prefix rule. Done when: 1. A deny or ask on any of the owner's reading tools (`Read`, `Grep`, `Glob`; bare or with a pattern) holds every Developer tool that reads a file, `read_image` included, for keeps and `/allow-always` alike. One test per tool, red first. 2. The receipt for an exact kept line cannot be mistaken for a prefix rule, and a test pins it. 3. No new check or job. Refs #296
Member

Threat model (before code)

Asset. Files the owner held back from reading (Read(./.env), a Grep deny or ask), and the owner's say over what a member reads.

Attacker. An outside party who gets text in front of an engine member, through a file in the checkout, a fetched page or a tool result. That text tells the member to read a file the owner held back. The crew itself is trusted.

Paths in. A call runs unasked by a keep (the owner's martha answer … allow kept for the session, martha#296), an /allow-always, the owner's allow rules, or the in-checkout Developer reads (R2a). Today a reading hold stops only the Developer tools the recorded hints mark read-only and not open-world (tree, view):

  • developer__read_image (its source is a path) slips past a Read or Grep hold.
  • A Glob hold counts as "another tool", so it holds everything except the reads, and tree/view slip past it.

Harm. The held file's bytes reach the member's context unasked and can leave by any later allowed call.

Fix shape.

  • A deny or ask on any reading tool of the owner's holds every Developer tool that is neither the shell nor a writer. Both are read from the recorded hints (not destructive), so tree, view and read_image come from the facts, with no tool name in code.
  • Glob counts as a reading tool for the holds. It gets a list of its own, so martha#969's behind-origin rows are left as they are.
  • Failure direction: a hold only makes a call asked, never refused, so holding too much costs a question, not access.

Receipt. An exact kept line ending in :* printed as Bash(ls :*) reads as a prefix rule. The owner would then believe they kept more than they did, and would see a wrong picture of what runs unasked. This is display only: the kept rule itself is exact. Fix: the receipt marks an exact line as exact, so it cannot read as Bash(cmd:*).

Out of scope. The owner's own allow of a reading tool. Pattern-level holds: a hold stays tool-wide, as in #296, which over-asks. No new check or job.

Done when (as the issue says, made concrete)

  1. With a deny and with an ask on each of Read, Read(./.env), Grep and Glob, a kept call and an /allow-always call of each Developer reader (tree, view, read_image from the recorded facts) is asked. Each test is seen red on the base first.
  2. A test pins the receipt of an exact kept ls :*: it cannot be read as Bash(ls:*).
  3. No new check or job; the whole npm test is green.
## Threat model (before code) **Asset.** Files the owner held back from reading (`Read(./.env)`, a `Grep` deny or ask), and the owner's say over what a member reads. **Attacker.** An outside party who gets text in front of an engine member, through a file in the checkout, a fetched page or a tool result. That text tells the member to read a file the owner held back. The crew itself is trusted. **Paths in.** A call runs unasked by a keep (the owner's `martha answer … allow` kept for the session, martha#296), an `/allow-always`, the owner's allow rules, or the in-checkout Developer reads (R2a). Today a reading hold stops only the Developer tools the recorded hints mark read-only and not open-world (`tree`, `view`): - `developer__read_image` (its `source` is a path) slips past a `Read` or `Grep` hold. - A `Glob` hold counts as "another tool", so it holds everything except the reads, and `tree`/`view` slip past it. **Harm.** The held file's bytes reach the member's context unasked and can leave by any later allowed call. **Fix shape.** - A deny or ask on any reading tool of the owner's holds every Developer tool that is neither the shell nor a writer. Both are read from the recorded hints (not `destructive`), so `tree`, `view` and `read_image` come from the facts, with no tool name in code. - `Glob` counts as a reading tool for the holds. It gets a list of its own, so martha#969's behind-origin rows are left as they are. - Failure direction: a hold only makes a call asked, never refused, so holding too much costs a question, not access. **Receipt.** An exact kept line ending in `:*` printed as `Bash(ls :*)` reads as a prefix rule. The owner would then believe they kept more than they did, and would see a wrong picture of what runs unasked. This is display only: the kept rule itself is exact. Fix: the receipt marks an exact line as exact, so it cannot read as `Bash(cmd:*)`. **Out of scope.** The owner's own allow of a reading tool. Pattern-level holds: a hold stays tool-wide, as in #296, which over-asks. No new check or job. ## Done when (as the issue says, made concrete) 1. With a deny and with an ask on each of `Read`, `Read(./.env)`, `Grep` and `Glob`, a kept call and an `/allow-always` call of each Developer reader (`tree`, `view`, `read_image` from the recorded facts) is asked. Each test is seen red on the base first. 2. A test pins the receipt of an exact kept `ls :*`: it cannot be read as `Bash(ls:*)`. 3. No new check or job; the whole `npm test` is green.
Member

Done-when, read against main 8d0d79c9 (landed with #342, PR 350 marked merged):

  1. A deny or ask on any reading tool of the owner's (Read, Read(./.env), Grep, Glob) holds every Developer tool that reads a file, read_image included, for keeps and /allow-always alike. Met. theReadsHeld holds every non-writing Developer tool from the recorded hints, and Glob comes in through READ_ONLY_TOOLS. There is one test per tool in the_rules_kept_for_a_launch.node-test.ts, plus the ['ask','Glob'] row in the R2a launch test. Each was red first: holding only the reads fails all 4 tests, and dropping Glob fails the Glob test.
  2. The receipt of an exact kept line cannot be mistaken for a prefix rule. Met. It is now Bash(ls :*) (this line exactly), a test pins it, and that test is red when the mark is dropped.
  3. No new check or job. Met.

Jupiter (Fable) PASS r=1, no bugs. His notes 1–3 are folded in at a6e3b1e9. Note 4 (a Write/WebFetch hold does not hold tree/view) is pre-existing, and Jupiter is filing it.

Done-when, read against main 8d0d79c9 (landed with #342, PR 350 marked merged): 1. A deny or ask on any reading tool of the owner's (`Read`, `Read(./.env)`, `Grep`, `Glob`) holds every Developer tool that reads a file, `read_image` included, for keeps and `/allow-always` alike. **Met.** `theReadsHeld` holds every non-writing Developer tool from the recorded hints, and `Glob` comes in through `READ_ONLY_TOOLS`. There is one test per tool in the_rules_kept_for_a_launch.node-test.ts, plus the `['ask','Glob']` row in the R2a launch test. Each was red first: holding only the reads fails all 4 tests, and dropping Glob fails the Glob test. 2. The receipt of an exact kept line cannot be mistaken for a prefix rule. **Met.** It is now `Bash(ls :*) (this line exactly)`, a test pins it, and that test is red when the mark is dropped. 3. No new check or job. **Met.** Jupiter (Fable) PASS r=1, no bugs. His notes 1–3 are folded in at a6e3b1e9. Note 4 (a Write/WebFetch hold does not hold tree/view) is pre-existing, and Jupiter is filing it.
venus closed this issue 2026-12-01 10:04:40 +00:00
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
martha-ai/martha#344
No description provided.