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 ViderStarv1.0.0MITIn 1 marketplace
Deterministic secret protection for coding agents: a hook that denies a commit or push whose diff contains a credential, and a scanner plus skill for the secrets already in the repository, with a masked report and a rotation checklist.
Claude loads one when your task matches it, or you run it by name.
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.
Stop a coding agent from committing secrets — and clean up the ones that are already in.
A Claude Code plugin. The pieces are dependency-free Python scripts, so they work outside Claude Code too.
"Never commit secrets" in CLAUDE.md is advice, and advice gets skipped: the model is
mid-task, the diff is large, the line looks like configuration. This reads the diff that is
actually about to be committed or pushed and denies on a match. It is not persuasion, it is
a gate.
-----BEGIN ... PRIVATE KEY-----)user:password inside a URL — the classic pip-index and database-DSN leakos.getenv("DB_PASSWORD", "...") — the pattern that
keeps a rotated credential silently alivePlaceholders (<your token>, ${VAR}, changeme), comparisons and reads from the
environment are not flagged.
| Piece | When it runs |
|---|---|
hooks/secrets-guard.py | PreToolUse on Bash. On git commit it reads the staged diff, on git push everything not yet upstream. A match is denied with the offending lines masked. |
scripts/secrets_scan.py | On demand. Scans tracked files and, with --history, added lines in past commits. Prints a masked Markdown table and a rotation checklist. Exits 1 on findings, so it gates CI. |
secrets-cleanup skill | Teaches the agent the workflow: scan, never echo values, rotate at the service, replace with a no-default env read, file the ticket, re-scan. |
claude plugin marketplace add ViderStar/secrets-guard
claude plugin install secrets-guard@secrets-guard
The hook needs no configuration. The scanner:
python3 scripts/secrets_scan.py ~/code/my-repo
python3 scripts/secrets_scan.py ~/code/my-repo --history --commits 300 --out findings.md
In CI:
- run: python3 scripts/secrets_scan.py . || exit 1
~/.config/secrets-guard/patterns.json:
{
"placeholders": ["acme-demo-key"],
"ignore_regexes": ["EXAMPLE_[A-Z]+", "tests/fixtures/"]
}
Two shapes are skipped on purpose, because they are where false positives come from:
a key: value whose value contains whitespace (English prose about the word "secret" —
"a webhook URL is itself a secret: whoever knows it can post"), and a value that is a
function call or attribute lookup (client_secret = vault.get("app")). A real secret in
YAML or JSON never contains a space, and a literal is not a call.
Bypass at commit time, when you are sure it is a false positive:
SECRETS_GUARD_ALLOW=1 git commit -m "add the sample config"
Every bypass — and every case where the hook could not determine the diff and let the
command through — is appended to ~/.config/secrets-guard/secrets-guard.log. Failing open
is deliberate: a guard that wedges someone's work gets uninstalled.
Deleting the line does not protect anything. The value is in the history of everyone who
cloned the repository, and git log -p is one command. A committed secret has to be
rotated at the service that issued it. The scanner's checklist says this every time
because it is the step that gets skipped.
MIT.
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 viderstar/secrets-guard --plugin secrets-guardPlugins from other owners that cover similar ground