client-secret-exposure-audit
Qué hace
Esta herramienta revisa sitios web para comprobar si información sensible, como contraseñas o claves de API, se ha expuesto por error en el código que el navegador puede ver. Busca estas filtraciones en archivos JavaScript, HTML y archivos de configuración que no deberían ser públicos.
Cuándo usarla
- ✓Antes de publicar un sitio web, para asegurarte de que no hay contraseñas ni claves secretas visibles.
- ✓Al revisar un sitio que ya existe, para encontrar posibles filtraciones de datos.
- ✓Cuando quieras comprobar que los archivos importantes de configuración o de código fuente no son accesibles públicamente.
Link de la skill
https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/client-secret-exposure-audit/SKILL.mdCópialo y pégalo en tu IA (Claude, ChatGPT o Cursor) pidiéndole que siga las instrucciones.
Cómo usar
La forma más fácil: copia el mensaje y pégalo en tu IA. Ella lee la skill y sigue las instrucciones.
Mensaje listo para pegar
Para Claude Code, Codex o Cursor: ejecútalo en la carpeta del proyecto y la skill queda instalada.
Descarga el SKILL.md y ponlo en la carpeta de skills de tu agente.
Ejemplo de qué pedirle a la IA
“Revisa el sitio web example.com para ver si hay secretos expuestos.”
5 skills nuevas por semana. 1 minuto de lectura.
Cómo funciona
La herramienta descarga los archivos que el sitio web muestra normalmente a cualquier visitante. Después busca patrones de contraseñas, claves de API u otros datos sensibles en esos archivos, incluyendo código JavaScript, comentarios HTML y archivos de configuración.
Contenido técnico (SKILL.md original)
Texto original del autor, en inglés, directo de 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
…
Preguntas frecuentes
¿Se puede usar esto para atacar otros sitios web?
No, esta herramienta solo sirve para revisar sitios web que tienes permiso para probar. No intenta aprovechar vulnerabilidades ni modifica nada.
¿Qué son los 'secretos expuestos'?
Son datos confidenciales, como contraseñas, claves de API o tokens, que acaban en el código del lado del cliente (lo que ve el navegador) y que cualquiera puede leer.
¿Qué tipo de archivos revisa?
Revisa archivos JavaScript, etiquetas HTML (incluidas las meta etiquetas y los comentarios) e intenta acceder a archivos de configuración habituales, como .env, package.json, Dockerfile, etc.
Detalles
Descripción original del autor
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.
Popularidad
- Estrellas en GitHub
- 48 mil
- Posición en el ranking
- #4154
- Licencia
- MIT
- Actualizada
- 15/10/2026
Comentarios
- …
Más skills de este repositorio
00-andruia-consultant
48 milAyuda a tu agente a iniciar o mejorar proyectos de IA. Analiza código, sugiere herramientas y crea planes de acción en español.
007
48 milPermite que tu agente realice auditorías de seguridad y modelado de amenazas. Es útil para proteger proyectos contra ataques y vulnerabilidades.
10-andruia-skill-smith
48 milAyuda a tu agente a crear o mejorar herramientas de IA. Define cómo funcionan, escribe la documentación y valida la estructura.
20-andruia-niche-intelligence
48 milPermite que tu agente cree un resumen de un sector específico. Es útil para entender su contexto, normas, patrones de uso y riesgos, usando fuentes fiables.
Skills parecidas
reverse-engineer-anything
422 milAyuda a tu agente a revisar apps y paquetes ya publicados para explicar sus funciones, comparar versiones o guiar una reconstrucción, usando la herramienta REA.
1password
394 milAyuda a tu agente a instalar la CLI de 1Password, iniciar sesión y leer o inyectar secretos sin imprimir sus valores en el chat.
healthcheck
394 milAyuda a tu agente a auditar el ordenador o servidor que ejecuta OpenClaw en busca de riesgos de seguridad, como SSH, cortafuegos, actualizaciones y copias de seguridad, y después sugerir arreglos seguros.