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 cb824bd 2.3 KB Updated 2 repo stars

File contents

yanacuti1121/Yana-AI/tree/main/core/skills/hook-protect-secrets commit cb824bd686

Frequently asked questions

npx skillmds add yanacuti1121/hook-protect-secrets