Skip to content

fix(sandbox): drop deny rules that file permission checks never match - #1122

Merged
potiuk merged 1 commit into
apache:mainfrom
potiuk:fix/sandbox-dead-deny-rules
Aug 29, 2026
Merged

fix(sandbox): drop deny rules that file permission checks never match#1122
potiuk merged 1 commit into
apache:mainfrom
potiuk:fix/sandbox-dead-deny-rules

Conversation

@potiuk

@potiuk potiuk commented Aug 29, 2026

Copy link
Copy Markdown
Member

Summary

  • Write(.claude/settings.json) and Write(.claude/settings.local.json) looked like they
    guarded those two files, but file permission checks only match Edit(path) rules — a
    Write(...) deny rule is inert. Both paths are already covered by the Edit(...) deny rules
    immediately above, which apply to every file-editing tool, so removing the dead pair loses no
    protection and stops the settings block from implying a guard that was not there.
  • Mirrors the removal into tools/sandbox-lint/expected.json, as every change to the live
    sandbox must be (docs/security/threat-model.md mitigation M.29).

Type of change

  • Cross-cutting (RFC, AGENTS.md, sandbox, privacy-LLM)

Test plan

  • prek run --all-files passes
  • uv run pytest passes in tools/sandbox-lint — the baseline-vs-live drift check is the
    gate that catches an unmirrored settings change, and it fails without the expected.json
    half of this commit.

RFC-AI-0004 compliance

  • Sandbox — strictly removes inert rules; no path gains write access that did not
    already have it.

Notes for reviewers

  • Worth confirming the premise rather than the diff: if Write(path) deny rules are honoured
    somewhere I have not found, these two should stay and the Edit(...) pair is the redundant
    one. The behaviour I relied on is that file permission checks match only Edit(path), which
    covers all file-editing tools including Write.

`Write(.claude/settings.json)` and `Write(.claude/settings.local.json)`
looked like they guarded those two files, but file permission checks only
match `Edit(path)` rules — a `Write(...)` deny rule is inert. Both paths are
already covered by the `Edit(...)` deny rules immediately above, which apply
to every file-editing tool, so removing the dead pair loses no protection
and stops the settings block from implying a guard that was not there.

Mirrors the removal into the sandbox-lint baseline, as every change to the
live sandbox must be (docs/security/threat-model.md mitigation M.29).
@potiuk
potiuk merged commit 7322af4 into apache:main Aug 29, 2026
10 checks passed
@potiuk
potiuk deleted the fix/sandbox-dead-deny-rules branch August 29, 2026 18:12
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