client-secret-exposure-audit
Lets your agent check for exposed secrets in web applications. It looks for API keys, tokens, or sensitive information in the code.
What it does
This tool checks websites to see if sensitive information, like passwords or API keys, has been accidentally exposed in the code that the browser can see. It looks for these leaks in JavaScript files, HTML, and in configuration files that shouldn't be public.
When to use it
- ✓Before launching a website, to ensure no passwords or secret keys are visible.
- ✓When reviewing an existing site to find potential data leaks.
- ✓When you need to check if important configuration or source files are not publicly accessible.
Example of what to ask your AI
“Check the website example.com for exposed secrets.”
Want more? Open the sections below.
How to use
The easiest way: copy the message below and paste it into Claude, ChatGPT, Cursor or any AI. It reads the skill and follows the instructions.
Skill link
Ready-to-paste message
How it works
The tool downloads files that the website normally shows to any visitor. It then searches for patterns of passwords, API keys, or other sensitive data within these files, including JavaScript code, HTML comments, and configuration files.
Installation
Easiest way: copy the skill link and paste it into Claude, ChatGPT or Cursor asking it to follow the instructions.
In the terminal (Claude Code, Codex, Cursor), in your project folder:
npx skills add sickn33/agentic-awesome-skills --skill client-secret-exposure-auditOr download just the file:
curl -L https://raw.githubusercontent.com/sickn33/agentic-awesome-skills/main/plugins/agentic-awesome-skills-claude/skills/client-secret-exposure-audit/SKILL.md -o SKILL.mdTechnical content (original SKILL.md)
Original text by the author, straight from GitHub.
Client-Side Secret & Sensitive-File Exposure Audit
Overview
Modern web apps ship a lot of code and config to the browser. When credentials
leak into that client-visible surface — hardcoded in JavaScript, tucked into HTML
meta/data-* attributes or comments, or served as raw source/config/deploy
files that were never meant to be public — anyone can read them with curl and a
browser. This skill is a defensive, read-only workflow for finding that class
of exposure on a web app you are authorized to assess.
It maps to OWASP A02:2021 Cryptographic Failures (sensitive data exposure), A05:2021 Security Misconfiguration, and CWE-798 (hardcoded credentials), CWE-200 (sensitive information exposure), CWE-540 (source code in a production build). It only fetches resources the server already hands to any anonymous visitor — it does not exploit, brute-force, or mutate anything.
When to Use This Skill
- Use when you need to check whether a deployed site leaks API keys, tokens, or passwords in its client-side bundle before shipping or during a review.
- Use when working with a static/SPA deployment (Vercel, Netlify, Nginx, S3, GitHub Pages) and you want to confirm no source/config/deploy files are publicly reachable.
- Use when the user asks to "find secrets," "audit exposed files," "check the JS/HTML for credentials," or run a lightweight sensitive-data-exposure pass on a URL they own or are authorized to test.
- Do not use this to attack third-party sites. See Security & Safety Notes.
How It Works
Set the target once. Every command below reads only what the server serves publicly.
BASE="https://TARGET.example" # authorized target, no trailing path
WORK="$(mktemp -d)"; cd "$WORK"
Step 1: Fetch the page and inspect response headers
curl -s -D headers.txt -o body.html "$BASE/"
cat headers.txt
Flag on the headers:
access-control-allow-origin: *— permissive CORS (worse when paired with credentials).- Missing
Content-Security-Policy,X-Frame-Options/frame-ancestors,X-Content-Type-Options: nosniff,Referrer-Policy,Permissions-Policy. - Missing/weak
Strict-Transport-Security. Server/framework version banners that fingerprint the stack.
Step 2: Grep the HTML for secrets and sinks
grep -inE "secret|passwd|password|api[_-]?key|apikey|token|bearer|authorization|\
akia|sk_live|sk_test|pk_live|whsec_|ghp_|aiza|private[_-]?key|mongodb(\+srv)?://|\
data-[a-z-]*(secret|token|key|access)" body.html
grep -inE "<!--" body.html # read every HTML comment
grep -ioE '<meta[^>]+>' body.html # meta tags often carry keys/ids
grep -ioE '<script[^>]+src="[^"]+"' body.html # enumerate JS bundles
Secrets hide in data-* attributes, <meta> tags, hidden <div>s, and
<!-- comments --> at least as often as in scripts.
Step 3: Pull every JavaScript bundle and scan it
# extract script srcs, resolve relative paths against $BASE, fetch and scan
grep -ioE 'src="[^"]+\.js"' body.html | sed -E 's/^src="//; s/"$//' \
| while read -r p; do
u="$p"; case "$p" in http*) ;; /*) u="$BASE$p";; *) u="$BASE/$p";; esac
f="js_$(echo "$p" | tr '/:' '__')"
curl -s "$u" -o "$f" && echo "== $u =="
done
grep -rinE "secret|password|api[_-]?key|token|bearer|sk_(live|test)|pk_(live|test)|\
whsec_|akia|aiza|jwt|signing[_-]?key|admin[_-]?token|mongodb|redis://" js_* 2>/dev/null
Also scan any sourcemaps (*.js.map) — they can rebuild original source with
comments intact.
Step 4: Probe for publicly reachable source / config / deploy files
SPAs often have a catch-all rewrite that returns index.html for unknown paths,
so compare response sizes — a path whose size differs from the SPA fallback
is a real, distinct file.
FALLBACK=$(curl -s "$BASE/____nope____$RANDOM" | wc -c) # SPA fallback size
for p in /.env /.env.local /.env.production /.git/config /.git/HEAD \
/package.json /package-lock.json /vercel.json /.vercel/project.json \
/Dockerfile /docker-compose.yml /wrangler.toml /.gitignore \
/server/index.js /src/config/app.config.js /config.js \
/src/services/payment.service.js /webpack.config.js /next.config.js; do
read -r code size < <(curl -s -o /dev/null -w "%{http_code} %{size_download}" "$BASE$p")
[ "$code" = "200" ] && [ "$size" != "$FALLBACK" ] && echo "REAL FILE $code $size $p"
done
…
FAQ
Can this be used to attack other websites?
No, this tool is only for checking websites you have permission to test. It does not attempt to exploit vulnerabilities or modify anything.
What are 'exposed secrets'?
These are confidential pieces of information, like passwords, API keys, or tokens, that end up in the client-side code (what the browser sees) and can be read by anyone.
What kinds of files does it check?
It checks JavaScript files, HTML tags (including meta tags and comments), and attempts to access common configuration files like .env, package.json, Dockerfile, etc.
Details
Original description by the author
Audit a deployed web app for secrets exposed to the browser: hardcoded API keys/tokens in JS, secrets in HTML meta/attributes/comments, publicly reachable source/config/deploy files, and header/CORS misconfig.
Popularity
- GitHub stars
- 48k
- Ranking position
- #2540
- License
- MIT
- Updated
- 10/15/2026
Comments
- …
More skills from this repository
00-andruia-consultant
Helps your agent start or improve AI projects. It analyzes code, suggests tools, and creates action plans in Spanish.
sickn33/agentic-awesome-skills
007
Lets your agent perform security audits and threat modeling. It's useful for protecting projects against attacks and vulnerabilities.
sickn33/agentic-awesome-skills
10-andruia-skill-smith
Helps your agent create or improve AI tools. It defines how tools work, writes documentation, and validates the structure.
sickn33/agentic-awesome-skills
20-andruia-niche-intelligence
Lets your agent create a summary about a specific industry. It's useful for understanding the context, rules, usage patterns, and risks of a project, using reliable sources.
sickn33/agentic-awesome-skills
Similar skills
django-security
Helps your agent implement security practices in Django applications. It focuses on authentication, authorization, and prevention against common attacks, ensuring more secure code.
affaan-m/ECC
laravel-security
Helps your agent secure Laravel applications against threats. Implements security practices for authentication, authorization, and common attack prevention.
affaan-m/ECC
module-regression
Helps your agent manage changes in large projects. Ensures code changes in one part don't break other parts.
affaan-m/ECC