Skip to content

fix: exclude the read tools from the file rules that name an edit - #4

Merged
akarshtechsuite merged 1 commit into
mainfrom
fix/file-rules-exclude-reads
Sep 29, 2026
Merged

akarshtechsuite merged 1 commit into
mainfrom
fix/file-rules-exclude-reads

Conversation

@akarshtechsuite

Copy link
Copy Markdown
Contributor

Eleven file-channel rules constrained only the
path, so a Grep that found a matched file and a Read that opened it each asked for approval before the edit did. Each now excludes {Read,Grep} in none_of — a read deny-list rather than a write allow-list, so an unknown file tool on a matched path still matches. se.credential-file and block-env-file-read are unchanged.

Eleven file-channel rules constrained only the path, so a Grep that found a
matched file and a Read that opened it each asked for approval before the edit
did. Each now carries `{ kind: "execute_tool", label: "{Read,Grep}" }` in
`none_of`.

Named as a deny-list rather than an `any_of` over the write tools: several file
tools reach this channel and an unknown one carrying a `file_path` reaches it
too, so a write allow-list would let a new tool through unseen, while a read
deny-list leaves an unknown tool matched.

`se.credential-file` and `block-env-file-read` are unchanged. For a credentials
file the read is the harm its title names, and the dotenv rule already pins its
own tool family.

Each changed rule gains `allow` fixtures naming `Read` and `Grep`, and the
`file()` fixture helper's tool argument is now part of what a fixture proves
rather than documentation of it.

Co-Authored-By: Claude <noreply@anthropic.com>
@akarshtechsuite
akarshtechsuite merged commit f5ae8f8 into main Sep 29, 2026
3 checks passed
github-actions Bot pushed a commit that referenced this pull request Sep 29, 2026
## [0.2.1](v0.2.0...v0.2.1) (2026-09-29)

### Bug Fixes

* exclude the read tools from the file rules that name an edit ([#4](#4)) ([f5ae8f8](f5ae8f8))

Co-Authored-By: Claude <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown

🎉 This PR is included in version 0.2.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant