Available in
Marketplaces, most starred first
Tags
Add to README
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
Marketplaces, most starred first
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
Marketplaces, most starred first
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
Run automatically on Claude Code events. Claude doesn't decide.
1 caution to review before installing
A hook runs when Claude uses the Bash tool
Static checks of hooks, mods, MCP servers and commands. Not a security audit.
1 marketplace, most starred first
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
PreToolUse hook на Bash: блокує запис у .env* через шелл (редирект,
tee, cp/mv, sed -i, truncate/dd), включно з $IFS-обходом пробілу
й записом через node -e/python3 -c inline-код. Permission deny на
Write/Edit не бачить файл, який створює сам шелл — цей хук закриває саме
цю діру.
Що НЕ робить: це sanity-net проти необережності агента, не security-межа проти свідомого обходу (quote-fragmentation, base64/XOR-обфускація regex не ловить — для цього потрібен парсинг шелу, не текстовий патерн).
claude --plugin-dir ./plugins/block-env-writes
—
—
| Event | Що робить |
|---|---|
PreToolUse (matcher Bash) | ${CLAUDE_PLUGIN_ROOT}/hooks/block-env-writes.mjs — exit 2 і пояснення в stderr, якщо команда пише в .env* (крім .env.example/.sample/.template/.dist) |
Без LLM, найшвидше — прогнати ізольований тест (21 кейс: позитивні, негативні, межові):
bash ./hooks/test-block-env-writes.sh
Наскрізно, в реальній сесії з інстальованим плагіном — попроси Claude
echo X=1 > .env і подивись на ЗАБЛОКОВАНО: у відповіді.
Built from public signals: copy clicks on this site, GitHub stars and activity, the README and the manifest. Not a security audit or an endorsement.
npx claudepluginhub r1ckshot/team-marketplace --plugin block-env-writesPlugins from other owners that cover similar ground