Repository navigation
fix(claude): drop the :* suffix from the rm -rf /* deny rule - #249
Merged
Merged
Conversation
A trailing :* is shorthand for a trailing space-star, so Bash(rm -rf /*:*) was parsed as a literal prefix and matched nothing useful, and Claude Code warned about it at startup. Bash(rm -rf /*) is the only form that covers rm -rf /*; it also denies any rm -rf on an absolute path. Co-Authored-By: Claude Fable 5.1 <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.
Why
Claude Code warns at startup:
Per the permissions docs, a trailing
:*is shorthand for a trailing*, and*has no escape in Bash rules. So the old line could never match the literal commandrm -rf /*, which was its intent.What
home/dot_claude/settings.json.tmpl, deny list:Tradeoff
Bash(rm -rf /*)has no space before the*, so it matchesrm -rf /followed by anything, includingrm -rf /tmp/build. This is the only rule shape that coversrm -rf /*; if the broad deny gets in the way, the alternative is to delete the line.Verification
chezmoi diff ~/.claude/settings.jsonshows the one-line rule change (plus unrelated pre-existing drift from Claude Code's own writes to the deployed file). Not applied yet; the startup warning should disappear afterchezmoi applyand a restart.🤖 Generated with Claude Code