Repository navigation
v7.33.1
Fixed
-
Both write guards now deny a write call that carries no path they can read, instead of allowing it (CORE-628).
A call whose tool name isWrite,Edit,MultiEditorNotebookEdit(any letter case), or that names no tool,
and that has no string path infile_path,path,notebook_pathoredits[].file_pathwas allowed by both
protect-trusted-paths.cjsandenforce-writes-scope.cjs: their per-path decision ran over zero paths and passed.
That covered a path sent under another key (target_file, say), a number, and a missingtool_input. An empty path
is denied too; before,enforce-writes-scope.cjsdenied it andprotect-trusted-paths.cjsallowed it. Both guards
now exit 2 with a fixed message that echoes nothing from the payload. No Claude Code route to these payloads is known,
since its four write tools always carryfile_pathornotebook_path. The change sets what happens when Claude Code
renames a field, and when another harness that reads.claude/settings.jsonstarts the guards with its own payload:
one that sends the path under another key is now denied every write, where before it was allowed every write without
a word.A tool name outside the four is still allowed unread, so a guard wired under a wider matcher leaves
ReadandBash
alone; a harness that starts the guards under another name for its write tool gets no protection from them.
pharn/LIMITS.md§7 states that bound with the measured before/after table, measured in a dev checkout and in an
installed project. The newguard-pathless-write.test.cjsruns one table of 20 payloads against both guards in both
postures and asserts the expected exit code and that both guards agree. Each denied payload has a twin with a readable
in-scope path that must be allowed, so the deny is attributed to the missing path. Against the 7.33.0 guards the
table's deciding tests fail.One difference between the guards was found and left as it was: in an installed project with no scope and no open
run,enforce-writes-scope.cjsallows a path holding a NUL byte thatprotect-trusted-paths.cjsdenies. The test
records it as the table's one exception.Why patch: a correction to shipped guard behaviour. No contract, field or wiring changed, and
MIN_CLIis
unchanged.