Issue closed - please delete
Status Fixed / completed
Maintainer reply None cached
Activity 4 comments · opened Mar 19, 2026 · closed Mar 29, 2026
This issue was created automatically without the account owner's consent. All content has been removed for privacy reasons. Please delete this issue entirely. Thank you.
4 Comments
This is exactly the scenario that destructive-guard hooks are designed to prevent. A PreToolUse hook can block file operations targeting paths outside the project directory:
Settings:
This blocks any recursive/force deletion that targets absolute paths, home directory paths, or parent directory escapes. It also specifically blocks deletion of macOS system directories like Desktop, Applications, Library, and Keychain.
For a comprehensive setup,
npx cc-safe-setupinstalls 8 safety hooks including a destructive-guard that catches dangerous patterns automatically.This catastrophe would have been prevented by a hook that blocks filesystem-wide destructive commands:
This blocks
rm -rf,find -delete,sudo rm,dd of=/dev/, and recursivechmod/chownon root — all the vectors that could wipe a Mac filesystem.exit 2prevents bash from running the command. The hook runs at the process level — Claude cannot bypass it.Please delete this issue entirely. It was created automatically by a Claude Code instance without the user's knowledge or consent, and contained private business information (client names, repository details). The account owner requests complete removal of this issue including all comments. Thank you.
This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.