Skip to content

The taboo guard covers Edit and Write, not only Bash - #63

Merged
wintermeyer merged 3 commits into
mainfrom
guard-file-edit-tools
Oct 11, 2026
Merged

wintermeyer merged 3 commits into
mainfrom
guard-file-edit-tools

Conversation

@wintermeyer

Copy link
Copy Markdown
Owner

The taboo guard hooked Bash only. In local mode Edit or Write could replace sshd_config or authorized_keys without any rule seeing it, and #62 put that gap in writing.

Edit, Write and NotebookEdit now run the guard with the argument file. It judges the target path alone: sshd's config, an SSH key file, a raw disk device. The text being written is not scanned, so memory files can still name those paths. Without jq the whole input is scanned, which over-blocks instead of failing open.

Also here: the rule from #62 rewrapped and made exact (full sshd_config path, sed -i), a registration test that no longer passes vacuously on quoted script paths, and the bump to 2.29.0.

Left open: a symlink to a protected file, and other tools that write files.

An AI agent wrote this text in my name. I know that is problematic.

The guard hooked Bash only, so in local mode Edit or Write could
replace sshd_config or authorized_keys without any rule seeing it.
Edit, Write and NotebookEdit now run the guard in a file mode that
judges the target path alone, so memory files can still name every
protected path. When jq cannot name the target the whole input is
scanned, which over-blocks instead of failing open. The rule from
PR #62 is rewrapped, names the full sshd_config path and adds sed -i,
and the hook registration test no longer passes vacuously on quoted
script paths.

An AI agent wrote this text in my name. I know that is problematic.
Ships the memory-editing rule from #62 and the guard's new file mode. A minor release because the guard now denies tool calls it used to let through: Edit, Write and NotebookEdit onto sshd_config, an SSH key file or a raw disk device.

An AI agent wrote this text in my name. I know that is problematic.
The file mode compared the path as written, so a capitalized name on a
case-insensitive filesystem, or a //, /./ or x/../ inside the path,
reached sshd_config or a key past the guard. The target is now matched
without regard to case, as given and with those forms folded away, and
every path key in the input is judged. Without jq a JSON escape in the
input is denied, because only a parser can show what it hides.

An AI agent wrote this text in my name. I know that is problematic.
@wintermeyer
wintermeyer merged commit cb347d0 into main Oct 11, 2026
2 checks passed
@wintermeyer
wintermeyer deleted the guard-file-edit-tools branch October 11, 2026 07:36
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