Files
davila7__claude-code-templates/cli-tool/components/hooks/security/env-file-protection.json
Dani 36fa6dbd5d feat: Add supply-chain-guard skill, worktree commands, security hooks, and updated catalog
New components:
- supply-chain-guard skill (security): npm/PyPI/CI supply chain scanner with IOC database
- worktree-guide skill: parallel development with git worktrees
- dependabot-review skill: automated Dependabot PR management
- worktree-check/cleanup/deliver/init commands (git-workflow)
- edit-audit-log hook (development-tools)
- env-file-protection and force-push-blocker hooks (security)

Also includes:
- Regenerated components.json catalog (docs + dashboard)
- TinyFish featured page updates and logo
- .vercelignore and dashboard .gitignore updates
2026-03-31 21:13:20 -04:00

18 lines
683 B
JSON

{
"description": "Prevent writing to .env files using the if condition for lightweight filtering. Blocks any Write tool call targeting .env* files, protecting secrets from accidental overwrites. Uses the if field to avoid spawning a process unless the file pattern matches.",
"hooks": {
"PreToolUse": [
{
"matcher": "Write",
"hooks": [
{
"type": "command",
"if": "Write(.env*)",
"command": "echo '{\"hookSpecificOutput\":{\"hookEventName\":\"PreToolUse\",\"permissionDecision\":\"deny\",\"permissionDecisionReason\":\"Writing to .env files is blocked by hook\"}}'"
}
]
}
]
}
}