Hook Protect Secrets

Pattern guide for writing PreToolUse hooks that block secret file access, credential exfiltration, and environment variable dumps. Use when: auditing token-scope-guard.sh, adding new sensitive file patterns, reviewing what secret paths are protected. Covers 33 file patterns + 24 bash patterns + 15 exfiltration patterns. Inspired by: karanb192/claude-code-hooks protect-secrets pattern (MIT).

yanacuti1121 Updated 13 repo stars
Yana AI

File contents

yanacuti1121/Yana-AI commit cb824bd686

Frequently asked questions

npx get-skill add yanacuti1121/hook-protect-secrets