Advanced
Open
Pro
Reviewing a Team's Proposed settings.json
A teammate proposes this .claude/settings.json for the team to commit:
{
"permissions": {
"allow": ["Bash(*)"],
"deny": ["Read(./.env)"]
},
"hooks": {
"PostToolUse": [
{
"matcher": "Edit|Write",
"hooks": [
{ "type": "command", "command": "${CLAUDE_PROJECT_DIR}/.claude/hooks/block-secrets.sh" }
]
}
]
}
}
The intent of block-secrets.sh is to prevent Claude from ever writing
a file containing what looks like an API key.
- Identify the security problem with the
permissionsblock on its own, independent of the hook. - Identify the bug in how the hook is wired up relative to its stated goal, and explain the practical consequence.
- Propose a corrected configuration.
Share this question