hunt-source-leak
Fungsinya
Tool ini mencari informasi sensitif yang mungkin tidak sengaja terekspos di website. Tool ini mencari file yang berisi source code, rahasia seperti kata sandi dan API key, atau detail tentang cara kerja API sebuah situs.
Kapan dipakai
- βSaat Anda adalah profesional keamanan yang menguji perlindungan sebuah website.
- βUntuk memeriksa apakah informasi rahasia telah bocor di sebuah website.
- βDalam lingkungan pengujian yang terkontrol untuk memahami bagaimana informasi bisa terekspos.
Link skill
https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/hunt-source-leak/SKILL.mdSalin lalu tempelkan ke AI Anda (Claude, ChatGPT, atau Cursor) dan minta AI mengikuti instruksinya.
Cara pakai
Cara paling mudah: salin pesan ini dan tempelkan ke AI Anda. AI akan membaca skill dan mengikuti instruksinya.
Pesan siap tempel
Untuk Claude Code, Codex, atau Cursor: jalankan di folder proyek, lalu skill langsung terpasang.
Unduh SKILL.md lalu taruh di folder skill agen Anda.
Contoh permintaan ke AI
βCari kebocoran source code dan rahasia pada example.comβ
5 skill baru setiap minggu. 1 menit baca.
Cara kerjanya
Tool ini mencoba mengakses path umum tempat informasi sensitif biasanya disimpan. Tool ini memeriksa file seperti '.env' (yang bisa berisi kata sandi), '.js.map' (yang bisa mengungkap source code lengkap), dan 'swagger.json' (yang mendeskripsikan API).
Konten teknis (SKILL.md asli)
Teks asli dari pembuat, dalam bahasa Inggris, langsung dari 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
β¦
Pertanyaan umum
Apa itu file '.js.map' dan mengapa berbahaya?
File ini membantu browser men-debug kode JavaScript. Namun, file ini bisa digunakan untuk merekonstruksi source code asli (TypeScript/ES6), yang berpotensi mengungkap rahasia seperti API key dan logika internal.
Apa itu 'swagger.json' atau 'openapi.json'?
File ini mendeskripsikan cara kerja sebuah API (Application Programming Interface). File ini berisi daftar semua 'titik masuk' (endpoint), data yang diharapkan, dan respons yang dikembalikan, sehingga berpotensi mengungkap rute internal dan detail autentikasi.
Apakah saya bisa menggunakan ini di website mana saja?
Tidak. Penggunaan tool ini hanya untuk tujuan edukasi atau penilaian keamanan yang resmi. Anda harus memiliki izin tertulis yang jelas dari pemilik sistem sebelum menggunakannya. Penyalahgunaan adalah tindakan ilegal.
Detail
Deskripsi asli dari pembuat
Hunt source code and build artifact leakage
Popularitas
- Bintang GitHub
- 48k
- Peringkat
- #4901
- Lisensi
- MIT
- Diperbarui
- 15/10/2026
Komentar
- β¦
Skill lain dari repositori ini
00-andruia-consultant
48kMembantu agent Anda memulai atau meningkatkan proyek AI. Agent menganalisis kode, menyarankan tools, dan membuat rencana aksi dalam bahasa Spanyol.
007
48kMemungkinkan agent Anda melakukan audit keamanan dan threat modeling. Berguna untuk melindungi proyek dari serangan dan celah keamanan.
10-andruia-skill-smith
48kMembantu agent Anda membuat atau meningkatkan tools AI. Agent mendefinisikan cara kerja tools, menulis dokumentasi, dan memvalidasi strukturnya.
20-andruia-niche-intelligence
48kMemungkinkan agent Anda membuat ringkasan industri tertentu. Berguna untuk memahami konteks, aturan, pola penggunaan, dan risiko proyek dengan sumber terpercaya.
Skill serupa
graincrawl
394kMemungkinkan agent Anda mencari catatan dan transkrip rapat Granola yang tersimpan, memeriksa seberapa baru datanya, dan menghitungnya dalam periode tertentu.
notcrawl
394kMemungkinkan agent Anda mencari salinan tersimpan dari ruang kerja Notion, mencari halaman dan database, serta mengekspor halaman ke file Markdown.
knowledge-entities
394kMembantu agent Anda mengidentifikasi orang, perusahaan, dan proyek, lalu menulis halaman profil berisi sumber untuk mereka di Knowledge vault Anda.