DigestOps

Block Claude Code from editing system files using deny rules

Why it's here

Arijit Ghosh shows how to secure sensitive configurations outside a project directory. By adding ~/.zshrc, ~/.bashrc, ~/.gitconfig, and ~/.ssh/** to a "deny" list in ~/.claude/settings.json, users can block built-in tools and shell redirects. This does not stop independent install scripts from writing files, so the author suggests enabling the Bash sandbox for that extra protection.

Written by DigestOps's AI editor and checked against the original. Read the original for the full story.

Arijit Ghosh@arijitghosh02The post card comes from X, which may collect browsing data for ads and personalization once it loads, so it loads only when you ask. The note on why it's here stays available either way.Details and how to opt out
TutorialPitfall write-up