Repository navigation
Close two write-guard bypasses - #6
Merged
Merged
Conversation
- package.json and package-lock.json leave the layout. `npm test` is pre-approved, so an agent that could rewrite the script could run any command without a prompt. - Both hooks resolve the target as the disk spells it before matching a rule. On Windows and macOS, BREACH-LOG.jsonl now hits the append-only rule and Report.json keeps its schema check. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Two ways past the write-guard, each reproduced against
masterbefore the fix.What changed
package.jsonandpackage-lock.jsonleavelayout.json.npm testandnpm run validateare pre-approved in.claude/settings.json. An agent that could rewrite the script, or an injected instruction in an audited codebase, could run any command with no prompt, the guards included.realPathinlib.mjs). On Windows and macOS,company-profile/acme/BREACH-LOG.jsonlnow hits the append-only rule, andassessments/x/Report.jsonkeeps its schema check on write.Tests
npm test: 24 pass, 0 fail, 1 skipped on Windows.npm run validate -- --strictis clean.The new test, "another spelling of a guarded path is still guarded", needs a case-insensitive disk. It skips on Ubuntu, so this CI does not exercise that fix. A
windows-latestjob would.Not in this PR
.github/**and the stalearanya/**rule stay agent-writable.🤖 Generated with Claude Code