secret-guard
May 16, 2026 · View on GitHub
secret-guard
Block leaked API keys before they hit origin. Pattern + entropy. Redacted output.
TL;DR:
/secret-guard→ scans your staged diff for AWS / GitHub / Slack / Stripe / Google API keys, JWTs, private keys, and high-entropy base64 strings. Blocks the commit before the secret leaves your machine.
Writing
- 🗡️ Çift Yüzlü Katana: Yapay Zeka Dönüşümlerinin Gerçekçi Bir Analizi — AI transformations realistic analysis. The 5 illusions that compound into expensive, fragile systems.
- 📄 LinkedIn Articles — All published articles
- 📊 LinkedIn Documents — Research papers and technical documents
Dev.to
- Why AI Agents Fail?
- We Ship to Production Without Tests. Here's How It Destroyed Us.
- I built a product in one AI session. Here's the system that made it ship right.
- Remote Work Didn't Break Productivity — It Broke Human Connection
- Hermes vs OpenClaw: Which AI assistant would you actually trust?
- Strategic LLM Adoption: A Director's Guide to Fine-Tuning Models
- The Context Window Lie: Why Your LLM Remembers Nothing
- Stop Your AI Agent From Building Tools That Already Exist
- Why Versioned SQL Beats Vector RAG for Agent Memory Systems
- I Got Access to 136 AI Models for Free — NVIDIA NIM API Deep Dive
- Your Agent Isn't Reflecting. It's Performing Reflection.
- How I Stopped My AI Agent From Reinventing the Wheel
Writing
-
✍️ Dev.to · TuracTheThinker — Technical articles on AI, agentic systems, and production engineering
-
📄 LinkedIn Articles — Industry insights and analysis
-
📊 LinkedIn Documents — Research papers and technical documents
-
🗡️ Çift Yüzlü Katana: Yapay Zeka Dönüşümlerinin Gerçekçi Bir Analizi — AI transformations realistic analysis. The 5 illusions that compound into expensive, fragile systems. (LinkedIn, 2026)
Install (Claude Code + pre-commit)
git clone https://github.com/mturac/pluginpool-secret-guard ~/.claude/plugins/secret-guard
To wire as a pre-commit hook:
cp ~/.claude/plugins/secret-guard/hooks/pre-commit .git/hooks/pre-commit
chmod +x .git/hooks/pre-commit
Writing
-
✍️ Dev.to · TuracTheThinker — Technical articles on AI, agentic systems, and production engineering
-
📄 LinkedIn Articles — Industry insights and analysis
-
📊 LinkedIn Documents — Research papers and technical documents
-
🗡️ Çift Yüzlü Katana: Yapay Zeka Dönüşümlerinin Gerçekçi Bir Analizi — AI transformations realistic analysis. The 5 illusions that compound into expensive, fragile systems. (LinkedIn, 2026)
Quick start
/secret-guard # scan staged diff
python3 scripts/guard.py # same, directly
python3 scripts/guard.py --files src/config.py .env # scan specific files
python3 scripts/guard.py --allowlist .secretignore # suppress known false positives
Writing
-
✍️ Dev.to · TuracTheThinker — Technical articles on AI, agentic systems, and production engineering
-
📄 LinkedIn Articles — Industry insights and analysis
-
📊 LinkedIn Documents — Research papers and technical documents
-
🗡️ Çift Yüzlü Katana: Yapay Zeka Dönüşümlerinin Gerçekçi Bir Analizi — AI transformations realistic analysis. The 5 illusions that compound into expensive, fragile systems. (LinkedIn, 2026)
Flags
| Flag | Default | Description |
|---|---|---|
--files F… | staged diff | Scan specific files instead of the staged diff |
--allowlist PATH | none | Regexes (one per line) that suppress matching findings |
--format | json | json or md |
Writing
-
✍️ Dev.to · TuracTheThinker — Technical articles on AI, agentic systems, and production engineering
-
📄 LinkedIn Articles — Industry insights and analysis
-
📊 LinkedIn Documents — Research papers and technical documents
-
🗡️ Çift Yüzlü Katana: Yapay Zeka Dönüşümlerinin Gerçekçi Bir Analizi — AI transformations realistic analysis. The 5 illusions that compound into expensive, fragile systems. (LinkedIn, 2026)
Detected patterns
| Rule | Match |
|---|---|
| AWS Access Key ID | AKIA[0-9A-Z]{16} |
| GitHub PAT | gh[pousr]_[A-Za-z0-9]{36,} |
| Slack token | xox[abpr]-[A-Za-z0-9-]{10,} |
| Stripe key | `sk_(live |
| Google API key | AIza[0-9A-Za-z_-]{35} |
| JWT | eyJ…\.eyJ…\.… |
| Private key | -----BEGIN … PRIVATE KEY----- |
| Generic high-entropy | base64-ish ≥32 chars, Shannon entropy ≥ 4.5 |
Writing
-
✍️ Dev.to · TuracTheThinker — Technical articles on AI, agentic systems, and production engineering
-
📄 LinkedIn Articles — Industry insights and analysis
-
📊 LinkedIn Documents — Research papers and technical documents
-
🗡️ Çift Yüzlü Katana: Yapay Zeka Dönüşümlerinin Gerçekçi Bir Analizi — AI transformations realistic analysis. The 5 illusions that compound into expensive, fragile systems. (LinkedIn, 2026)
Example output (markdown)
# secret-guard report
| file | line | rule | snippet |
|---|---|---|---|
| src/config.py | 12 | aws-access-key | AKIA… |
| .env | 4 | stripe-key | sk_l… |
Note: snippets are always rule + first 4 chars + … — never the full secret.
Writing
-
✍️ Dev.to · TuracTheThinker — Technical articles on AI, agentic systems, and production engineering
-
📄 LinkedIn Articles — Industry insights and analysis
-
📊 LinkedIn Documents — Research papers and technical documents
-
🗡️ Çift Yüzlü Katana: Yapay Zeka Dönüşümlerinin Gerçekçi Bir Analizi — AI transformations realistic analysis. The 5 illusions that compound into expensive, fragile systems. (LinkedIn, 2026)
Exit codes
| Code | Meaning |
|---|---|
0 | Clean — no secrets found |
1 | At least one finding (commit is blocked when used as a hook) |
Writing
-
✍️ Dev.to · TuracTheThinker — Technical articles on AI, agentic systems, and production engineering
-
📄 LinkedIn Articles — Industry insights and analysis
-
📊 LinkedIn Documents — Research papers and technical documents
-
🗡️ Çift Yüzlü Katana: Yapay Zeka Dönüşümlerinin Gerçekçi Bir Analizi — AI transformations realistic analysis. The 5 illusions that compound into expensive, fragile systems. (LinkedIn, 2026)
Safety guarantees
test_redaction_contains_only_rule_and_first_fourasserts the raw secret never appears in JSON or markdown output.test_files_mode_does_not_crash_on_non_utf8ensures non-UTF-8 / binary files are skipped, not crashed on.
Writing
-
✍️ Dev.to · TuracTheThinker — Technical articles on AI, agentic systems, and production engineering
-
📄 LinkedIn Articles — Industry insights and analysis
-
📊 LinkedIn Documents — Research papers and technical documents
-
🗡️ Çift Yüzlü Katana: Yapay Zeka Dönüşümlerinin Gerçekçi Bir Analizi — AI transformations realistic analysis. The 5 illusions that compound into expensive, fragile systems. (LinkedIn, 2026)
Limitations
- Pattern lists drift; submit PRs for new providers.
- Entropy heuristic produces some false positives on minified bundles — use
--allowlistto suppress. - Doesn't scan repo history; pair with
git-secretsortrufflehogfor that.
Writing
-
✍️ Dev.to · TuracTheThinker — Technical articles on AI, agentic systems, and production engineering
-
📄 LinkedIn Articles — Industry insights and analysis
-
📊 LinkedIn Documents — Research papers and technical documents
-
🗡️ Çift Yüzlü Katana: Yapay Zeka Dönüşümlerinin Gerçekçi Bir Analizi — AI transformations realistic analysis. The 5 illusions that compound into expensive, fragile systems. (LinkedIn, 2026)
Examples
Step-by-step walkthroughs with real input fixtures and the helper's actual output live in examples/. Three or four scenarios per plugin — from the happy path to the edge cases the test suite guards.
Writing
-
✍️ Dev.to · TuracTheThinker — Technical articles on AI, agentic systems, and production engineering
-
📄 LinkedIn Articles — Industry insights and analysis
-
📊 LinkedIn Documents — Research papers and technical documents
-
🗡️ Çift Yüzlü Katana: Yapay Zeka Dönüşümlerinin Gerçekçi Bir Analizi — AI transformations realistic analysis. The 5 illusions that compound into expensive, fragile systems. (LinkedIn, 2026)
Part of the pluginpool family
Ten focused Claude Code plugins for everyday productivity: commit-narrator · pr-storyteller · test-gap · deps-doctor · env-lint · secret-guard · standup-gen · todo-harvest · flaky-detector · changelog-forge
Writing
-
✍️ Dev.to · TuracTheThinker — Technical articles on AI, agentic systems, and production engineering
-
📄 LinkedIn Articles — Industry insights and analysis
-
📊 LinkedIn Documents — Research papers and technical documents
-
🗡️ Çift Yüzlü Katana: Yapay Zeka Dönüşümlerinin Gerçekçi Bir Analizi — AI transformations realistic analysis. The 5 illusions that compound into expensive, fragile systems. (LinkedIn, 2026)
License
MIT — see LICENSE. Contributions welcome.