hunt-source-leak
Qué hace
Esta herramienta busca información sensible que podría haberse expuesto por error en sitios web. Busca archivos con código fuente, secretos como contraseñas y claves de API, o detalles sobre cómo funciona la API de un sitio.
Cuándo usarla
- ✓Cuando eres un profesional de seguridad que prueba la protección de un sitio web.
- ✓Para comprobar si se ha filtrado información confidencial en un sitio web.
- ✓En entornos de prueba controlados para entender cómo se expone la información.
Link de la skill
https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/hunt-source-leak/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
“Busca filtraciones de código fuente y secretos en example.com”
5 skills nuevas por semana. 1 minuto de lectura.
Cómo funciona
La herramienta intenta acceder a rutas habituales donde podría estar la información sensible. Comprueba archivos como '.env' (que puede contener contraseñas), '.js.map' (que puede revelar el código fuente completo) y 'swagger.json' (que describe la API).
Contenido técnico (SKILL.md original)
Texto original del autor, en inglés, directo de GitHub.
⚠️ AUTHORIZED USE ONLY This skill is for educational purposes or authorized security assessments only. You must have explicit, written permission from the system owner before using this tool. Misuse of this tool is illegal and strictly prohibited.
Mandatory confirmation gate Before running any command that probes, exploits, changes, persists on, extracts data from, or attempts credential access against a target:
- Ask the user to state the exact target URL, IP, account, or resource.
- Ask the user to confirm written authorization and the permitted scope.
- Show the exact command(s) and explain their expected effect.
- Wait for explicit confirmation in the current conversation.
Without that confirmation, remain read-only and provide defensive guidance only. Prefer a sandbox, disposable VM, or controlled lab.
HUNT-SOURCE-LEAK — Source Code & Build Artifact Leakage
Crown Jewel Targets
Source map exposing TypeScript source = see all API routes, auth logic, secrets. Swagger/OpenAPI JSON = complete API surface map.
Highest-value findings:
.js.mapsource maps — reconstruct full TypeScript/ES6 source code → find hardcoded API keys, internal endpoints, auth logic bypassesswagger.json/openapi.json— complete REST API specification with all endpoints, parameters, auth schemes, and internal route names.env/.env.production— APP_KEY, DB_PASSWORD, API_KEY, SECRET_KEY in plaintext.git/exposure —git clonethe entire source history → all past hardcoded secretsasset-manifest.json/_next/static/— all JS bundle paths → systematic source map discoverybuild-info/info.json— git commit hash, build timestamp, dependency versions → CVE targeting
Phase 1 — Quick Wins (Run First)
# These 10 requests take <30 seconds and often yield Critical findings
for PATH in \
"/.env" \
"/.env.production" \
"/.env.local" \
"/.git/HEAD" \
"/swagger.json" \
"/api/swagger.json" \
"/v1/swagger.json" \
"/openapi.json" \
"/api/openapi.json" \
"/api-docs"; do
STATUS=$(curl -s -o /tmp/sl_test -w "%{http_code}" "https://$TARGET$PATH")
if [ "$STATUS" = "200" ]; then
echo "[+] HIT: https://$TARGET$PATH"
head -5 /tmp/sl_test
echo "---"
fi
done
Phase 2 — Source Map Discovery
Always resolve the CURRENT build hash before testing, and again before re-verifying. Bundle filenames are content-hashed, so they rotate on every deploy. A
.mapURL recorded yesterday can 404 today while the map is still fully exposed under a new name. A 404 at the old URL is not remediation — it is a new build.# ALWAYS derive the hash live, never reuse a recorded URL HASH=$(curl -s "https://$TARGET/" | grep -oE 'main\.[a-f0-9]+\.js' | head -1) curl -s -o /dev/null -w '%{http_code} %{size_download} %{content_type}\n' \ "https://$TARGET/static/js/${HASH}.map"Lesson from an authorized engagement. A large production map was found at
main.<hashA>.js.map. On re-verification that URL returned a small HTML soft-404 and the finding was nearly closed as fixed. The bundle had rotated tomain.<hashB>.js— and the map was still published atmain.<hashB>.js.map, same size. Nothing had been remediated.Tell the client this explicitly in the report: redeploying does not fix source map exposure. Only
GENERATE_SOURCEMAP=false(or stripping.mapat deploy) plus a CDN purge closes it. A team that redeploys and re-checks the old link will wrongly declare victory.Same rule applies to any content-hashed artifact: chunk files, CSS maps,
asset-manifest.json, and staging equivalents.
# Step 1: Get asset manifest to find all JS bundle paths
curl -s "https://$TARGET/asset-manifest.json" | python3 -m json.tool 2>/dev/null
curl -s "https://$TARGET/static/js/main.*.js" 2>/dev/null | head -3
# Next.js
BUILD_ID=$(curl -s https://$TARGET/ | grep -oP '"buildId":"\K[^"]+')
curl -s "https://$TARGET/_next/static/$BUILD_ID/_buildManifest.js" | head -5
# Step 2: For each JS bundle, check for source map reference at end of file
for JS_URL in $(curl -s https://$TARGET/ | grep -oP 'src="[^"]*\.js"' | sed 's/src="//;s/"//'); do
LAST_LINE=$(curl -s "https://$TARGET$JS_URL" | tail -1)
echo "$LAST_LINE" | grep -q "sourceMappingURL" && echo "[+] Source map: $JS_URL"
done
# Step 3: Download and reconstruct source from .map files
…
Preguntas frecuentes
¿Qué son los archivos '.js.map' y por qué son peligrosos?
Son archivos que ayudan a los navegadores a depurar código JavaScript. Sin embargo, pueden usarse para reconstruir el código fuente original (TypeScript/ES6), revelando posiblemente secretos como claves de API y la lógica interna.
¿Qué son 'swagger.json' u 'openapi.json'?
Son archivos que describen cómo funciona una API (interfaz de programación de aplicaciones). Enumeran todos los 'puntos de entrada' (endpoints), los datos que esperan y lo que devuelven, y pueden exponer rutas internas y detalles de autenticación.
¿Puedo usar esto en cualquier sitio web?
No. El uso de esta herramienta es estrictamente para fines educativos o evaluaciones de seguridad autorizadas. Necesitas permiso explícito y por escrito del propietario del sistema antes de usarla. El uso indebido es ilegal.
Detalles
Descripción original del autor
Hunt source code and build artifact leakage
Popularidad
- Estrellas en GitHub
- 48 mil
- Posición en el ranking
- #4901
- 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
graincrawl
394 milPermite que tu agente busque tus notas y transcripciones guardadas de reuniones de Granola, revise qué tan recientes son y las cuente en un periodo.
notcrawl
394 milPermite que tu agente busque en una copia guardada de tu espacio de Notion, consulte páginas y bases de datos y exporte páginas a archivos Markdown.
knowledge-entities
394 milAyuda a tu agente a identificar personas, empresas y proyectos, y después a redactar páginas de perfil con fuentes en tu bóveda de Knowledge.