js-secrets-audit
Skill3 starsChanged 32 days agoMITView on GitHub
Use when reviewing JavaScript bundles, source maps, frontend configuration, or generated assets for exposed credentials and internal endpoints.
In this repository22 other files it gives its agents.
- AGENTS.mdAGENTS.md
- skills/general/code-reviewer/AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- fastify-best-practicesSkill
- agent-toolkit-maintainerSkill
- onboard-repoSkill
- docker-patternsSkill
- accessibilitySkill
- code-reviewerSkill
- thermo-nuclear-code-quality-reviewSkill
- brag-slimSkill
- biome-formattingSkill
- instagram-public-researchSkill
- research-data-collectionSkill
- api-security-auditSkill
- cicd-security-auditSkill
- cloud-misconfiguration-auditSkill
- llm-agent-security-auditSkill
- security-auditSkill
- source-leak-auditSkill
- ariadne-prdSkill
- ariadneSkill
The file
We split this skill into the rules it gives an agent
2 rules. About 0 are common, 1 is distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 25
Search for high-signal patterns: private-key headers, bearer tokens, JWT shapes, cloud access-key prefixes, database URLs, webhook secrets, …
- Very specific: line 45
Use only a short prefix/suffix or a one-way fingerprint, for example sk_live_••••••••9f2a.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
JavaScript Secrets Audit
Inspect browser-delivered JavaScript and source maps for values that grant privilege or reveal sensitive internal systems. Public configuration is not automatically a secret, and all findings must be redacted.
When to Use
- Reviewing a frontend build before release.
- Investigating a suspected API key, JWT, private URL, or source-map exposure.
- Auditing generated assets from a local build or authorized staging site.
Procedure
- Inventory emitted JS, maps, HTML bootstraps, runtime config, and public environment variables. Prefer local build output.
- Search for high-signal patterns: private-key headers, bearer tokens, JWT shapes, cloud access-key prefixes, database URLs, webhook secrets, and internal hostnames. Treat regex matches as leads.
- Classify each value: public identifier, publishable key, short-lived token, privileged credential, personal data, or internal endpoint.
- Confirm only through source/config ownership and documentation. Never call a matched service, decode a real token, or test a credential.
- Report path, bundle offset/source line, secret class, masked fingerprint, exposure scope, and rotation/removal action.
- Rebuild with proper environment separation, remove maps or sensitive config, invalidate caches, rotate credentials when needed, and rescan.
Evidence Gate
Regex alone is insufficient. A finding needs ownership/context showing that the value is sensitive or that the endpoint exposes protected functionality. Never place the value in reports, snapshots, tickets, chat, or terminal output.
Safe Masking
Use only a short prefix/suffix or a one-way fingerprint, for example
sk_live_••••••••9f2a; preserve enough context for the owner to locate it.
Common Mistakes
- Reporting every Firebase/Supabase/public client key as a vulnerability.
- Assuming minification makes a secret safe.
- Downloading source maps from unrelated deployments.
- Testing a suspected credential instead of rotating it through the owner.
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.

