feat: secret-detection and sensitive-file-guard hooks (#3)

This commit is contained in:
duthaho
2026-07-17 06:29:17 +07:00
committed by GitHub
parent f9841971cc
commit 8710df2704
8 changed files with 256 additions and 8 deletions
+12
View File
@@ -11,6 +11,18 @@
"script": "block-dangerous-commands.cjs",
"description": "Blocks rm -rf /, force push to main, hard reset, DROP TABLE, etc."
},
"detect-secrets": {
"event": "PreToolUse",
"matcher": "Write|Edit",
"script": "detect-secrets.cjs",
"description": "Blocks writes containing secret-looking content (API keys, tokens, private key blocks)"
},
"guard-sensitive-files": {
"event": "PreToolUse",
"matcher": "Write|Edit",
"script": "guard-sensitive-files.cjs",
"description": "Blocks edits to .env files, key material (.pem/.key/id_rsa), and credential dotfiles"
},
"notify": {
"event": "Notification",
"matcher": "",