Skip to content

v7.33.1

Choose a tag to compare

@github-actions github-actions released this 01 Dec 09:56
· 1 commit to main since this release
f9431d2

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 is Write, Edit, MultiEdit or NotebookEdit (any letter case), or that names no tool,
    and that has no string path in file_path, path, notebook_path or edits[].file_path was allowed by both
    protect-trusted-paths.cjs and enforce-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 missing tool_input. An empty path
    is denied too; before, enforce-writes-scope.cjs denied it and protect-trusted-paths.cjs allowed 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 carry file_path or notebook_path. The change sets what happens when Claude Code
    renames a field, and when another harness that reads .claude/settings.json starts 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 Read and Bash
    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 new guard-pathless-write.test.cjs runs 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.cjs allows a path holding a NUL byte that protect-trusted-paths.cjs denies. 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_CLI is
    unchanged.