Leaked Environment Variables
SkillDev toolsLeaked-secrets is a skill for AI agents that scans client-side JavaScript, HTML source, and git history for exposed credentials. It helps developers find accidentally shipped API keys, passwords, and tokens before someone else does.
Use Leaked Environment Variables in Claude, ChatGPT or Ahel Desktop
Free. Sign in, add Leaked Environment Variables and connect your AI. About a minute.
Also: Claude Code · Cursor · Codex
Then ask your AI: use the Leaked Environment Variables skill
Details
Instructions available. Your AI can read the instructions. Execution depends on the setup they require.
Account requirements not reviewed. Check the skill instructions before use; ahel provides instructions and does not run this skill.
No other account needed.
Have an AI agent that supports loading skills.
What your AI can do with it
- Scan client-side JavaScript for exposed API keys, passwords, and tokens
- Review HTML source for accidentally exposed credentials
- Search git history for committed secrets and tokens
Getting started
- Have an AI agent that supports loading skills.
- Add the leaked-secrets skill to the agent's available skills.
- Ask the agent to review a front-end codebase or git history for exposed credentials.
What this skill tells your AI
The instructions your AI receives, as published by thedaviddias/front-end-checklist in skills/leaked-secrets/SKILL.md and read by ahel’s review.
An API key embedded in client-side JavaScript gives anyone with a browser devtools tab full access to your cloud services, databases, or third-party APIs — leading to data breaches, unexpected charges, or account takeover.
Quick Reference
- Any secret in client-side JavaScript is publicly readable — treat all front-end code as public
- In Next.js, only variables prefixed with
NEXT_PUBLIC_are exposed to the browser — never put secrets in these - Common leak locations:
.envfiles committed to git, hardcoded API keys in JS bundles, service account credentials inwindow.__INITIAL_STATE__ - Use
git log -S 'keyword'to search git history for previously committed secrets; rotate any found secrets immediately - Tools: GitLeaks, TruffleHog, GitHub Secret Scanning can detect leaks in repositories automatically
Check
Scan the page HTML source and JavaScript bundles for patterns that look like secrets: API keys, tokens, passwords, private keys, connection strings, or credentials. Check for common patterns like sk_, pk_, AIza, ghp_, AKIA, and base64-encoded strings in unusual contexts.
Fix
Move all secrets server-side. Replace client-exposed credentials with server-side API proxies. Rotate any leaked credentials immediately — treat them as compromised. Implement git-secrets or a pre-commit hook to prevent future leaks.
Explain
Explain why client-side JavaScript is public code, how secrets leak into bundles, what the impact of a leaked API key is, and how to architect applications to keep secrets server-side.
Code Review
Review server config, headers, forms, and integration points related to Leaked Environment Variables. Flag exact responses, cookies, or browser behaviors that violate the rule, and verify them against the effective production-like response.
For full implementation details, code examples, and framework-specific guidance,
see references/rule.md.
Rule page: https://frontendchecklist.io/en/rules/security/leaked-secrets
Signals
- GitHub stars
- 74k
- Forks
- 7k
- Last commit
- Oct 2026
ahel review
K1binfo
installs-packages (in references/rule.md)
Automated review, not a security audit. Ruleset v1+k2.
Questions
- What does it look for?
- Exposed credentials in client-side JavaScript, HTML source, or git history, including API keys, passwords, and tokens.
- When should it be used?
- When reviewing client-side JavaScript, HTML source, or git history for exposed credentials, API keys, or tokens.
Advanced
- Item type
- skill
- Key
leaked-secrets- Source
- github.com/thedaviddias/front-end-checklist
github.com/thedaviddias/front-end-checklist
Related picks
Skill · naodeng
The pick for Secretssecrets-with-git-crypt
Skill · derailed-dash
The pick for Secretsowasp-security
Skill · davila7
The pick for Web (OWASP)security-and-hardening
Skill · addyosmani
The pick for Web (OWASP)clerk-nextjs-patterns
Skill · clerk
The pick for Next.jslogs-nextjs
Skill · posthog
The pick for Next.js