hunt-source-leak
Qué hace
Esta skill busca archivos públicos por error, como source maps, archivos de entorno, especificaciones de API y carpetas de git. Es para reconocimiento autorizado al inicio de una prueba de seguridad.
Cuándo usarla
- ✓Cuando empiezas una prueba de seguridad y quieres comprobar si hay filtraciones públicas rápidas.
- ✓Cuando un sitio tiene paquetes JavaScript y podrían estar expuestos sus source maps.
- ✓Cuando una carpeta .env o .git pública podría revelar secretos.
Link de la skill
https://github.com/elementalsouls/Claude-BugHunter/blob/main/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
“Antes de empezar la prueba de seguridad, ¿puedes comprobar si nuestro sitio filtra archivos de configuración, source maps o documentos de API?”
5 skills nuevas por semana. 1 minuto de lectura.
Cómo funciona
El agente solicita una lista de rutas habituales de filtración y comprueba cuáles devuelven archivos. Informa de lo que revela cada archivo expuesto y de su gravedad.
Contenido técnico (SKILL.md original)
Texto original del autor, en inglés, directo de GitHub.
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
JS_URL="https://$TARGET/static/js/main.abc123.js"
MAP_URL="${JS_URL}.map"
curl -s "$MAP_URL" | python3 -c "
import sys, json, os
data = json.load(sys.stdin)
sources = data.get('sources', [])
contents = data.get('sourcesContent', [])
for i, (src, content) in enumerate(zip(sources, contents)):
if content:
path = '/tmp/sourcemap_extract/' + src.replace('../','').replace('./',''). replace('webpack://','')
os.makedirs(os.path.dirname(path), exist_ok=True)
with open(path, 'w') as f:
f.write(content)
print(f'[+] Extracted: {src}')
"
# Step 4: Grep extracted source for secrets
grep -r "API_KEY\|SECRET\|PASSWORD\|TOKEN\|PRIVATE" /tmp/sourcemap_extract/ 2>/dev/null
grep -r "process\.env\." /tmp/sourcemap_extract/ 2>/dev/null | grep -v "NEXT_PUBLIC_" | head -20
grep -r "http://internal\|localhost\|127\.0\.0\.1\|10\.\|172\.
Preguntas frecuentes
¿Por qué comprobar esto primero?
La skill indica que estas comprobaciones rápidas suelen revelar hallazgos graves en pocas peticiones.
¿Qué es un source map?
Es un archivo que puede reconstruir el código fuente legible a partir de un script compilado de una web.
¿Puede ser arriesgada una carpeta .git expuesta?
Sí. La skill indica que una carpeta .git pública puede exponer el historial completo del código, incluidos secretos antiguos.
Detalles
Descripción original del autor
Hunt source code and build artifact leakage — JavaScript source maps (.js.map) reconstructing TypeScript/ES6 source, Swagger/OpenAPI JSON endpoint discovery, .env/.git exposure, webpack chunks with hardcoded secrets, robots.txt/security.txt recon, build-info files, asset-manifest.json API route discovery, .DS_Store file listing. Use at the START of every recon session — these findings often unlock the entire attack surface.
Popularidad
- Estrellas en GitHub
- 5,4 mil
- Posición en el ranking
- #14933
- Licencia
- MIT
- Actualizada
- 2/11/2026
Comentarios
- …
Más skills de este repositorio
apk-redteam-pipeline
5,4 milAyuda a tu agente a probar una app de Android en busca de debilidades de seguridad, desde encontrar el archivo APK y descompilarlo hasta buscar secretos expuestos.
bugcrowd-reporting
5,4 milAyuda a tu agente a escribir mejores informes de vulnerabilidades para Bugcrowd, eligiendo la categoría adecuada y respondiendo a las objeciones de fuera de alcance.
cloud-iam-deep
5,4 milAyuda a tu agente a comprobar a qué puede acceder una credencial de nube encontrada en AWS, Azure o Google Cloud, durante una prueba de seguridad autorizada.
enterprise-vpn-attack
5,4 milAyuda a tu agente a revisar equipos VPN y de acceso remoto de Cisco, Fortinet, Citrix y otros en busca de debilidades conocidas, durante una prueba autorizada.
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.