hunt-source-leak
Helps your agent find source code or build artifact leaks. This is important for protecting a software's intellectual property.
What it does
This tool searches for sensitive information that might have been accidentally exposed on websites. It looks for files containing source code, secrets like passwords and API keys, or details about how a site's API works.
When to use it
- ✓When you are a security professional testing a website's protection.
- ✓To check if confidential information has been leaked on a website.
- ✓In controlled testing environments to understand how information is exposed.
Example of what to ask your AI
“Hunt for source code leaks and secrets on example.com”
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 attempts to access common paths where sensitive information might reside. It checks for files like '.env' (which can contain passwords), '.js.map' (which can reveal full source code), and 'swagger.json' (which describes the API).
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 hunt-source-leakOr download just the file:
curl -L https://raw.githubusercontent.com/sickn33/agentic-awesome-skills/main/plugins/agentic-awesome-skills-claude/skills/hunt-source-leak/SKILL.md -o SKILL.mdTechnical content (original SKILL.md)
Original text by the author, straight from 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
…
FAQ
What are '.js.map' files and why are they dangerous?
These are files that help browsers debug JavaScript code. However, they can be used to reconstruct the original source code (TypeScript/ES6), potentially revealing secrets like API keys and internal logic.
What is 'swagger.json' or 'openapi.json'?
These are files that describe how an API (Application Programming Interface) works. They list all the 'entry points' (endpoints), the data they expect, and what they return, potentially exposing internal routes and authentication details.
Can I use this on any website?
No. The use of this tool is strictly for educational purposes or authorized security assessments. You must have explicit, written permission from the system owner before using it. Misuse is illegal.
Details
Original description by the author
Hunt source code and build artifact leakage
Popularity
- GitHub stars
- 48k
- Ranking position
- #3287
- 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
deep-research
Lets your agent research topics in depth, gathering information from multiple sources. It cites sources and indicates confidence levels. Ideal for deep dives or investigations.
affaan-m/ECC
research-ops
Lets your agent find current facts and information. It uses public research and the context you provide to give evidence-based answers.
affaan-m/ECC
scientific-thinking-literature-review
Helps your agent conduct systematic reviews of scientific literature. It's useful for compiling and understanding research on a topic.
affaan-m/ECC