From Dev.to
Stop Claude Code from running sudo with a PreToolUse hook
A shell allow-list can already keep Claude Code off destructive commands and force-push. It often still leaves sudo. Once the model has root, a "quick fix" can change system packages, rewrite /etc, or...
