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.
By hrmtzMITIn 1 marketplace
Defense-in-depth hooks for Claude Code: credential leak prevention, dangerous bash command guard, admission-keyword workflow reminders.
Claude loads one when your task matches it, or you run it by name.
2 cautions to review before installing
A hook runs when Claude uses the Bash tool
A hook runs when Claude writes or edits files
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.
Executables (bin/) — files in this plugin's bin/ directory are added to the Bash tool's PATH while the plugin is enabled.
A defense-in-depth set of Claude Code hooks against credential leaks and workflow lapses. The full wired set is in hooks/hooks.json (authoritative — the count lives there, deliberately not copied into prose that would drift); this README documents the original core trio in detail, but the plugin has grown well beyond it (credential scrubbers, branch-policy / rotation-propagation / 真田 auto-backup guards, session-context rails, and a Stop/SubagentStop security-review depth gate — sr_depth_gate.py, which blocks a /security-review no-findings verdict when a changed file was never opened with Read — etc.).
Codex and other terminal UIs emit explicit links with OSC 8. tmux 3.4 and
later preserves them when its outer-terminal feature set includes
hyperlinks. The SessionStart tmux_hyperlink_guard.sh hook adds that feature
to the running tmux server idempotently.
For the feature to be present on the first client attached after a tmux server
restart, keep the same declaration in ~/.tmux.conf:
set -as terminal-features ",*:hyperlinks"
After adding it to an already running server, detach and reattach once if the current client was created before the feature was declared. In WezTerm, the configured mouse modifier may still be required when opening a link.
credential_value_scrub.sh — PostToolUse / BashScans every Bash tool output for credential value patterns. If matched, sanitizes the active session jsonl in-place with sed -i (replacing the value with <REDACTED>) and emits a warning to Claude.
Pattern catalog (extend in the script):
sk-ant-*, sk-or-*, sk_live_* — Anthropic / OpenRouter / Stripetskey-* — Tailscale auth keysAKIA[0-9A-Z]{16} — AWS access keyseyJ... — JWT (Turso etc.)gh[ps]_* — GitHub tokensPOSTGRES_PASSWORD=, PGPASSWORD=, ANTHROPIC_API_KEY=, OPENAI_API_KEY=, GEMINI_API_KEY=, CF_API_TOKEN= — common env-var-shaped leaksAllowlist filters out placeholders (<REDACTED>, placeholder, example, changeme, <your-key>, YOUR_*).
Important: This hook is backward-only damage control. It sanitizes the session jsonl after the leak. You still need to rotate the credential — the value may have already flowed into log shippers, prompt caches, or telemetry.
Incident issue filing is disabled by default for public installs. To opt in:
export HARNESS_CREDENTIAL_LEAK_ISSUES=1
export CREDENTIAL_LEAK_ISSUE_REPO=owner/repo
Autonomous credential rotation is also disabled unless HARNESS_AUTOROTATE_SCRIPT
points to an operator-owned runbook. Optional notification/comment destinations:
HARNESS_AUTOROTATE_DISCORD_CHANNEL and HARNESS_AUTOROTATE_ISSUE_REPO.
bash_command_guard.sh — PreToolUse / BashBlocks dangerous Bash commands before they run, with a deny response and an explanation of the safer alternative.
Block catalog:
sops -d / sops --decrypt → use sops edit or sops exec-env <file> <cmd>docker inspect --format '{{.Config.Env}}' → exposes all container envenv | grep KEY/TOKEN/PASSWORD/SECRET → use env | cut -d= -f1 for key names onlybash -x ... printf $VAR → bash -x expands env vars into transcriptcat .env* / cat .aws/credentials → plaintext exposurehead/tail *.enc.yaml → reading sops-encrypted files as plaincurl -H "Authorization: Bearer <inline-token>" → cmdline retentionrclone --s3-access-key-id <inline> → cmdline retentioncurl '...?api_key=...' → URL query lands in server logstail rclone.conf / .netrc / .aws/credentialsReturns permissionDecision: deny via hookSpecificOutput. The user / Claude sees the block reason and rewrites the command.
admission_reminder.sh — UserPromptSubmitWhen the user prompt OR the last 3 assistant turns contain certain admission keywords, injects a reflexive procedure into context as additionalContext.
Pattern catalog (excerpt):
| Trigger | Reminder |
|---|---|
リーク | leak | credential.*leak | password.*expos | api.*key.*出 | sanitize active jsonl + rotate + log to memory |
沈黙 | silent | broadcast.*忘 | 沈黙.*\dh | lead role status broadcast required (mailbox tail + 4-item broadcast set) |
todo | あとで | メモ | 忘れ.*ない | gh issue create externalize, don't keep in head |
壊れ | broken | 復元.*でき | persistent backup path reminder |
(issue|memory|todo|タスク).*(化|登録).*(しとく|する).*\? | autonomy-scope tasks: just do it, don't ask permission |
ちょうど書いた直後.*違反 | memory 化した瞬間 | recursive meta-violation → structural fix urgent |
連発 | systematic.*failure | N 回目 | recurrence detected → hook / wrapper required |
放置 | やってない | 抜けて | 忘れて | unfinished work admission → catch up before user calls it out |
Some patterns are project-specific (memory file names, mailbox path) — feel free to fork and adapt the REMINDERS dict for your own workflow.
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 hrmtz/claude-harness --plugin harness-corePlugins from other owners that cover similar ground