secret-warn

Solid

Use when adding or tuning edit-time secret and code-injection guardrails or security hooks in Claude Code, or on mentions of secret detection, API key safety, hardcoded or leaked keys (AWS, Stripe, GCP, OpenAI, Anthropic, GitHub, Slack, JWT, PEM, .env), gitleaks-style or pre-commit secret scanning, false positives or allowlists, unsafe pipe-to-shell or MCP server installs, or prompt injection in audited third-party content (README, AGENTS.md). Not for full security audits, pen testing, or DLP.

AI & Automation 36 stars 35 forks Updated yesterday MIT

Install

View on GitHub

Quality Score: 81/100

Stars 20%
52
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# secret-warn — real-time edit-time security guardrails Catches secrets and unsafe patterns the moment a Claude Code agent writes them, not after the fact. Public substrate version (MIT). Free to install, free to extend. ## What it does | Trigger | Severity | Action | |---|---|---| | API key in file (Stripe, AWS, GCP, OpenAI, Anthropic, GitHub, Slack) | block (exit 2) | Edit rejected | | PEM-encoded private key block | block | Edit rejected | | High-entropy assignment to a key-named variable | warn (exit 1) | Advisory, edit proceeds | | Python dynamic-codegen on a user-input-suggesting name | warn | Advisory | | Subprocess with shell-mode + variable expansion | warn | Advisory | | Curl/wget pipe-to-shell from a non-allowlisted host | block | Edit rejected | | Prompt-injection cue in *audited third-party content* (ignore-previous, role-override, exfil, system-impersonation, paste-and-run) | warn (flag-before-read) | Specimen flag via `audited_content_scan.py` — never an edit-time block | All patterns are stored base64-encoded in `hooks/pattern_registry.json` so the registry file itself doesn't trip pattern-matching tools that scan the repo. This is intentional — see [Design note: self-trigger safety](#design-note-self-trigger-safety) below. ## Install ```bash bash skills/secret-warn/install.sh ``` The installer: - Copies `hooks/secret_warn.py` + `hooks/audited_content_scan.py` to `~/.claude/secret-warn/` - Copies `hooks/pattern_registry.json` to the same location - Merg...

Details

Author
mycelium-hq
Repository
mycelium-hq/ai-brain-starter
Created
5 months ago
Last Updated
yesterday
Language
Python
License
MIT

Integrates with

Bundled in these plugins

Similar Skills

Semantically similar based on skill content — not just same category

AI & Automation Listed

scan-secrets

Blocks known credential patterns -- vendor key prefixes, private-key blocks, and key/token/password assignments -- at two enforcement points: at commit (the git hook, over staged changes) and at agent tool-use (the mcp-gateway / agent write guard, over a tool call's arguments), so a secret is caught as the agent writes it, before it ever reaches a commit. Matched by pattern, not by entropy analysis. Best-effort guard; not a replacement for a dedicated secret scanner.

1 Updated yesterday
open-coder-ai
AI & Automation Listed

code-safety

trigger: secrets, eval/exec, unsanitized SQL, hallucinated dependencies. avoid: committing credentials, adding unverified packages, executing dynamic code. Install scan-secrets for the enforced counterpart of the secret slice (a commit-time gate), and verify-dependency-exists for the dependency slice (opt-in: disabled by default, needs a curated allowlist); the eval/exec and unsanitized-SQL guidance stays advisory (no diff-time gate can decide whether dynamic execution or a query string is unsafe).

1 Updated yesterday
open-coder-ai
AI & Automation Solid

secret-scanner

Static secret/token scanning for codebases and git repos: detects leaked credentials (AWS, GitHub, OpenAI, Anthropic, Stripe, Google, Slack, private keys, JWTs) using gitleaks v8.30.1 pattern table + Shannon entropy gating + allowlist noise filters. Stdlib-only Python script with JSON/Markdown/text reports, redaction, CI exit-code gate.

5 Updated today
bestdeejay-design