secret-gate
Skill0 starsChanged 3 months agoMITView on GitHub
Blocks credentials from entering code, diffs, or agent output. Scans files or a unified diff for known key formats (AWS, GitHub, OpenAI/Anthropic-style, Slack, GCP, private keys, JWTs, assigned passwords) plus high-entropy assigned strings — offline, stdlib-only, no gitleaks binary. Use as a pre-commit gate on agent-written diffs, before pasting config into a session, or in CI.
- Reads credentials
In this repository69 other files it gives its agents.
- AGENTS.mdAGENTS.md
- skills/AGENTS.mdAGENTS.md
- skills/ultimate-browsing/engine/AGENTS.mdAGENTS.md
- 3d-designSkill
- algorithmic-artSkill
- api-testerSkill
- apple-suiteSkill
- appshotSkill
- astra-initSkill
- blindspotSkill
- changelog-genSkill
- claim-auditSkill
- code-reviewSkill
- comment-checkerSkill
- context-budgetSkill
- cron-auditSkill
- css-pro-tipsSkill
- designSkill
- diff-reviewSkill
- doc-readerSkill
- domain-modelingSkill
- env-gateSkill
- ext-scaffoldSkill
- gate-graphSkill
- gh-address-commentsSkill
- gh-fix-ciSkill
- git-masterSkill
- graph-toolsSkill
- grillingSkill
- herdrSkill
- image-genSkill
- json-diffSkill
- linus-levelSkill
- log-analyzerSkill
- log-deviationSkill
- lsp-setupSkill
- merge-quizSkill
- nbj-write-clearlySkill
- net-probeSkill
- open-loopsSkill
- portfolio-auditSkill
- pro-reviewSkill
- proxmox-veSkill
- remove-ai-slopsSkill
- repo-auditSkill
- resume-auditSkill
- sec-headersSkill
- seo-auditSkill
- session-finderSkill
- session-handoffSkill
- session-rulesSkill
- skill-auditSkill
- skill-creatorSkill
- skill-decaySkill
- skill-optimizerSkill
- skill-pickerSkill
- skill-syncSkill
- social-researchSkill
- subscription-auditSkill
- sys-healthSkill
- The first 60 shown.
The file
Files
Secret Gate
An agent with your .env in context will eventually write it somewhere it
should not go. This gate catches the leak before it lands.
Commands
python3 scripts/secret_gate.py src/ config.py # scan files/dirs
git diff | python3 scripts/secret_gate.py --diff # only added lines
git diff --cached | python3 scripts/secret_gate.py --diff # pre-commit
python3 scripts/secret_gate.py --diff --json < changes.patch
python3 scripts/secret_gate.py --history --repo . # git-guardian mode: scan commit history
python3 scripts/secret_gate.py --history --repo . --max-commits 500Exit 1 on any finding — wire it straight into pre-commit or CI.
Detects
- Structured keys: AWS (
AKIA...), GitHub (ghp_/github_pat_), OpenAI/ Anthropic-style (sk-,sk-ant-), Slack (xox?-), GCP (AIza...), Stripe (sk_live_/rk_live_), SendGrid (SG....), npm, PyPI, Discord, basic-auth URIs - Private key blocks, JWTs
- Assigned passwords/secrets:
password = "...",api_key: '...' - High-entropy strings assigned to secret-shaped names (Shannon entropy > 4.0)
Suppression
- Inline: append
gitleaks:allow,secret-gate:allow, orpragma: allowlist secretto a known-safe line. - Placeholder values (
example,changeme,<your-key>,${VAR}) are skipped automatically. --allow REGEX(repeatable) for project-wide allowlists.
Pairs with
comment-checker (same diff-mode contract), skill-audit (scan skills you
install, not just code you write).
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

