Agent skill

Source Leak Hunt

by uphiago in uphiago/recon-skills

Mass scan for exposed env files, backups, and git configs. An agent skill from uphiago/recon-skills.

MITAuto-check: notesDevOps & Cloud

Install Source Leak Hunt

skills CLI
$ npx skills add uphiago/recon-skills --skill source-leak-hunt -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install uphiago/recon-skills source-leak-hunt --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/uphiago/recon-skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/recon/source-leak-hunt .claude/skills/source-leak-hunt && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
source-leak-hunt
GitHub stars
1.3k
Token cost
~2.2k tokens
SKILL.md length
427 words
Files
1
Skills in repo
23
Repo updated
First seen
Licence
MIT

At a glance

Mass scan for exposed env files, backups, and git configs. An agent skill from uphiago/recon-skills.

  • Works in 5 steps: Parallel Mass Scan → Extract Credentials from Leaked Files → Find Targets with Multiple Leaks… → …
  • Tasks that involve Backup and disaster recovery
  • SKILL.md covers When to Use, Prerequisites, How to Run and Quick Reference, plus 3 more sections
  • Calls curl and git; needs DB_PASSWORD and AUTH_KEY

What it does

Source Leak Hunt is an agent skill from uphiago/recon-skills. Mass scan for exposed env files, backups, and git configs.

Its SKILL.md is about 2.2k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts. Compatibility notes: Requires curl, grep

It sits in DevOps & Cloud, covering Backup and disaster recovery. It works with Git, PHP, Docker and SQL. The repository describes itself as: Recon & pentest skill pack. CORS, XSS, SQLi, SSRF, RCE, WordPress, MCP, cloud, subdomain takeover, and more. Field-tested. MIT. Full write-up at hiago.sh. The licence is MIT.

When your agent uses it

  • Tasks that involve Backup and disaster recovery

Example prompts

  • “/source-leak-hunt”

Requirements

  • Docker
  • A credential in AUTH_KEY
  • Compatibility (from SKILL.md): Requires curl, grep

Workflow steps

5 steps, taken from the step headings in SKILL.md.

  1. Parallel Mass Scan
  2. Extract Credentials from Leaked Files
  3. Find Targets with Multiple Leaks (Deep-Dive Candidates)
  4. Backup File Discovery
  5. Google Services Leak Dorking

What it can do on your machine

Read from SKILL.md and the folder at commit 1260244. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • curl
    • git

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use curl and git, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names these keys or tokens, usually read from environment variables:

    • DB_PASSWORD
    • AUTH_KEY

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

  • Compatibility

    Requires curl, grep

    From compatibility in the SKILL.md frontmatter.

Context cost

Source Leak Hunt loads about 2.2k tokens when it runs. Until then it costs about 19 tokens; SKILL.md has 427 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~19
When it runs · the whole SKILL.md, loaded when a task matches
~2.2k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check: notes

The automated check noted patterns worth knowing about, such as sudo or a known installer.

  • NoteMentions a .env fileSKILL.md:21
    s scanning for exposed sensitive files (`.env`, `.git/config`, `wp-config.php.bak`, `debug.log`, `backup.sql`, `phpinfo.
  • NoteMentions a .env fileSKILL.md:41
    for path in .env .git/config wp-config.php.bak debug.log backup.sql info.php phpinfo.php \
  • NoteMentions a .env fileSKILL.md:42
    .env.backup .env.local .env.production wp-config.php~ .git/HEAD .backup.sql \
  • NoteMentions a .env fileSKILL.md:54
    | `.env` | DB creds, API keys, app secrets | Critical |
  • NoteMentions a .env fileSKILL.md:62
    | `.env.backup` / `.env.local` | Same as .env, alternate names | Critical |
  • NoteMentions a .env fileSKILL.md:78
    ".env"
  • NoteMentions a .env fileSKILL.md:85
    ".env.backup"
  • NoteMentions a .env fileSKILL.md:86
    ".env.local"
  • NoteMentions a .env fileSKILL.md:87
    ".env.production"
  • NoteMentions a .env fileSKILL.md:102
    PATTERNS[".env"]='DB_|APP_|_KEY|_SECRET|DATABASE|PASSWORD|TOKEN'

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from uphiago/recon-skills at commit 1260244, republished under its MIT licence (© uphiago). 427 words, ~2,219 tokens.

Download SKILL.mdSave it as .claude/skills/source-leak-hunt/SKILL.md (or your agent's skills folder).
name
source-leak-hunt
description
Mass scan for exposed env files, backups, and git configs.
compatibility
Requires curl, grep
version
1.1.0
revision_date
2026-07-25
license
MIT
platforms
linux
tags
recon, source-leak, exposure, secrets, wordpress
category
recon
related_skills
wp-mass-recon, js-secrets-extraction, error-log-mining, phpinfo-to-rce, deep-invade

Source Leak Hunt Skill

Mass scanning for exposed sensitive files (.env, .git/config, wp-config.php.bak, debug.log, backup.sql, phpinfo.php, Dockerfile, etc.) with content-based false positive filtering. Source leaks are the second most common finding (~7% of targets) after WordPress user enumeration.

When to Use

  • After skill_view(name='wp-mass-recon') confirms a target is alive.
  • Broad scanning across a batch of domains.
  • When probing for credential exposure that enables deeper access.
  • Complementing skill_view(name='js-secrets-extraction') for client-side secrets.

Prerequisites

  • terminal with curl.
  • List of live URLs (output from httpx or wp-mass-recon Phase 1).
  • Persistence: output directory at $OUTDIR/leaks/.

How to Run

bash
# Quick scan single target (20 paths)
TARGET="https://example.com"
for path in .env .git/config wp-config.php.bak debug.log backup.sql info.php phpinfo.php \
  .env.backup .env.local .env.production wp-config.php~ .git/HEAD .backup.sql \
  docker-compose.yml Dockerfile .DS_Store robots.txt sitemap.xml; do
  code=$(curl -sk -o /dev/null -w "%{http_code}" --max-time 5 --connect-timeout 5 "$TARGET/$path")
  [[ "$code" == "200" ]] && echo "HTTP 200: $TARGET/$path"
  sleep 0.2
done

Quick Reference

PathWhat It ExposesSeverity
.envDB creds, API keys, app secretsCritical
wp-config.php.bakMySQL root password, saltsCritical
.git/configRepository URL, credentialsHigh
debug.logPHP errors, server paths, SQL queriesHigh
backup.sqlFull database dumpCritical
info.php / phpinfo.phpPHP config, disable_functions, server envHigh
docker-compose.ymlService architecture, env varsMedium
DockerfileBuild config, exposed portsLow
.env.backup / .env.localSame as .env, alternate namesCritical
wp-config.php~Vim swap of wp-configCritical
.DS_StoreDirectory listing (macOS)Low
error_logPHP error log (can be multi-MB, full of paths/queries)High

Procedure

Step 1 — Parallel Mass Scan
bash
#!/bin/bash
URLS_FILE="$1"   # One URL per line
OUTDIR="$OUTDIR/leaks"
mkdir -p "$OUTDIR"

PATHS=(
  ".env"
  ".git/config"
  "wp-config.php.bak"
  "debug.log"
  "backup.sql"
  "info.php"
  "phpinfo.php"
  ".env.backup"
  ".env.local"
  ".env.production"
  "wp-config.php~"
  ".git/HEAD"
  "docker-compose.yml"
  "Dockerfile"
  ".DS_Store"
  "robots.txt"
  "sitemap.xml"
  "error_log"
  "wp-content/debug.log"
  ".backup.sql"
)

# Content verification patterns (avoids SPA catch-all false positives)
declare -A PATTERNS
PATTERNS[".env"]='DB_|APP_|_KEY|_SECRET|DATABASE|PASSWORD|TOKEN'
PATTERNS["wp-config.php.bak"]='DB_NAME|DB_PASSWORD|AUTH_KEY'
PATTERNS[".git/config"]='\[core\]'
PATTERNS["debug.log"]='PHP|ERROR|WARNING|Stack trace'
PATTERNS["backup.sql"]='CREATE TABLE|INSERT INTO|DROP TABLE'
PATTERNS["info.php"]='PHP Version|phpinfo'
PATTERNS["phpinfo.php"]='PHP Version|phpinfo'
PATTERNS[".env.backup"]='DB_|APP_|_KEY|_SECRET'
PATTERNS[".env.local"]='DB_|APP_|_KEY|_SECRET'
PATTERNS[".env.production"]='DB_|APP_|_KEY|_SECRET'
PATTERNS["wp-config.php~"]='DB_NAME|DB_PASSWORD'
PATTERNS["error_log"]='PHP|ERROR|Stack trace'

scan_target() {
  local url="$1"
  local domain
  domain=$(echo "$url" | sed 's|https\?://||' | sed 's|/.*||')

  for path in "${PATHS[@]}"; do
    local full_url="${url}/${path}"
    local code
    code=$(curl -sk -o /tmp/leak_check_$$.tmp -w "%{http_code}" --max-time 5 --connect-timeout 5 "$full_url" 2>/dev/null)

    if [[ "$code" == "200" ]]; then
      local content
      content=$(head -c 2000 /tmp/leak_check_$$.tmp 2>/dev/null)
      local pattern="${PATTERNS[$path]}"

      if [[ -n "$pattern" ]] && echo "$content" | grep -qiE "$pattern"; then
        echo "[LEAK] $full_url (VERIFIED: $path)"
        echo "$full_url" >> "$OUTDIR/${domain}_leaks.txt"
        cp /tmp/leak_check_$$.tmp "$OUTDIR/${domain}_${path//\//_}.content" 2>/dev/null
      elif [[ -z "$pattern" ]]; then
        # No pattern check — just log HTTP 200 (e.g., robots.txt)
        local size=$(wc -c < /tmp/leak_check_$$.tmp)
        if [[ "$size" -gt 50 ]]; then
          echo "[INFO] $full_url (HTTP 200, ${size} bytes)"
          echo "$full_url" >> "$OUTDIR/${domain}_leaks.txt"
        fi
      fi
    fi
    sleep 0.3
  done
  rm -f /tmp/leak_check_$$.tmp
}

export -f scan_target
export OUTDIR
export PATHS

# Run 30 parallel workers
cat "$URLS_FILE" | xargs -P 30 -I {} bash -c 'scan_target "{}"'

echo "[+] Done. Results in $OUTDIR/"
Step 2 — Extract Credentials from Leaked Files
bash
# From .env files
grep -rhE '(DB_|APP_|_KEY|_SECRET|DATABASE|PASSWORD|TOKEN|SECRET)=' $OUTDIR/leaks/*.env*.content 2>/dev/null | sort -u

# From wp-config backups
grep -rhE 'DB_NAME|DB_USER|DB_PASSWORD|DB_HOST|AUTH_KEY' $OUTDIR/leaks/*wp-config* 2>/dev/null

# From .git/config
grep -rh 'url = ' $OUTDIR/leaks/*.git_config.content 2>/dev/null

# From SQL dumps
grep -rhE 'CREATE TABLE|INSERT INTO' $OUTDIR/leaks/*backup* $OUTDIR/leaks/*.sql* 2>/dev/null | head -20
Step 3 — Find Targets with Multiple Leaks (Deep-Dive Candidates)
bash
for f in $OUTDIR/leaks/*_leaks.txt; do
  count=$(wc -l < "$f")
  [[ "$count" -ge 3 ]] && echo "$(basename "$f" _leaks.txt): $count leaks"
done | sort -t: -k2 -rn
Show full SKILL.md (224 more words)Show less

Pitfalls

  • SPA catch-all false positives over 70% of results without filtering. Single-page apps return HTTP 200 with index.html for any path. Content verification is mandatory.
  • CloudFront/S3 error pages. Some CDNs return 200 with an XML error body for missing files. Check content type and body.
  • Truncated content on large files. error_log files can be 1.7MB+. Fetch in chunks or use curl -r 0-5000 for sampling.
  • git/HEAD false positive. Some themes/setups have .git/HEAD returning 200 with a legitimate git hash. Verify .git/config first.
  • Parked/for-sale domains return HTTP 200 for every path. Generic parking pages serve content for /.env, /.git/config, /info.php, etc. with no error handling — every path returns 200 with the same landing page. Detect these by checking if multiple unrelated paths return identical content (same body hash, same <title>, or same keyword like "for sale" or "parked"). Add early-exit: if /robots.txt and /.env both return 200 with near-identical HTML, mark domain as parked and skip further source-leak checks.

Verification

  • Every .env leak MUST contain at least one of: DB_, APP_, _KEY, _SECRET, PASSWORD, TOKEN.
  • Every wp-config.php.bak leak MUST contain DB_NAME and DB_PASSWORD.
  • Every .git/config leak MUST contain [core] section header.
  • Every SQL backup MUST contain DDL (CREATE TABLE) or DML (INSERT INTO) statements.
  • Log all verified leaks with timestamp and HTTP response size.
Phase 6 — Backup File Discovery
bash
# bfac — multi-level backup file detection
bfac --url https://target.com \
  --detection-technique all \
  --level 3 \
  --exclude-status-codes 404,500

# Wayback Machine — historical sensitive files
waybackurls https://target.com | grep -iE \
  "\.(xls|xlsx|csv|sql|db|bak|backup|old|tar\.gz|tgz|zip|7z|rar|pdf|pem|key|crt|env|json|yml|yaml|conf|config|git|htpasswd|log|dump|DS_Store)" \
  | sort -u > sensitive_wayback.txt

# Check which are still accessible
cat sensitive_wayback.txt | httpx -silent -mc 200 -o accessible_sensitive.txt

# Common backup patterns to probe
for ext in bak old backup zip tar.gz tgz sql dump; do
  curl --max-time 30 --connect-timeout 10 -skI "https://target.com/backup.$ext" | head -1
  curl --max-time 30 --connect-timeout 10 -skI "https://target.com/site.$ext" | head -1
  curl --max-time 30 --connect-timeout 10 -skI "https://target.com/target.$ext" | head -1
  sleep 0.3
done
Phase 7 — Google Services Leak Dorking
bash
# Google Sheets — internal spreadsheets often left public
# Manual search:
# site:docs.google.com/spreadsheets "target.com"
# site:docs.google.com/spreadsheets "@target.com"
# site:docs.google.com/spreadsheets "password" "target.com"

# Google Drive files
# site:drive.google.com "target.com" "confidential"

# Firebase/Firestore URLs in public search results
# site:firebaseio.com "target.com"
# site:firestore.googleapis.com "target-app"

# GCP buckets
# site:storage.googleapis.com "target"
# site:storage.cloud.google.com "target"

© uphiago, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in recon/source-leak-hunt of uphiago/recon-skills.

Open the folder on GitHubat commit 1260244

Compare with similar skills

Source Leak Hunt next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Source Leak Hunt compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Source Leak Hunt this skilluphiago/recon-skills1.3k—~2.2kAutomated safety check: NotesMIT
Infrastructure Setuppavel-molyanov/molyanov-ai-dev297—~1.9kAutomated safety check: NotesMIT
Deploying Postgres K8saiskillstore/marketplace430—~2kAutomated safety check: PassNone
Scanning Containers With Trivy In Cicdmukul975/Anthropic-Cybersecurity-Skills34k—~2.7kAutomated safety check: PassApache-2.0
Frontmcp Production Readinessagentfront/frontmcp146—~6.5kAutomated safety check: PassApache-2.0
Cloud Infra Supply Chainzhaji2333/CkSKILLS114—~688Automated safety check: WarnMIT

Similar skills

  • Infrastructure Setup

    pavel-molyanov/molyanov-ai-dev

    Provides project infrastructure conventions and review criteria for local setup, Docker, Git hooks, CI/CD, service delivery, release artifacts, monitoring, backups, and operations.

    297 GitHub stars~1.9k tokensUpdated 1 mo ago
    DevOps & CloudAuto-check: notes
  • Deploying Postgres K8s

    aiskillstore/marketplace

    Deploys PostgreSQL on Kubernetes using the CloudNativePG operator with automated failover.

    430 GitHub stars~2k tokensUpdated today
    DevOps & CloudAuto-check passed
  • Scanning Containers With Trivy In Cicd

    mukul975/Anthropic-Cybersecurity-Skills

    Integrates Aqua Security's Trivy scanner into CI/CD pipelines to detect OS package and application dependency CVEs, Dockerfile misconfigurations, and issues in filesystems or git repositories, and…

    34k GitHub stars~2.7k tokensUpdated 1 mo ago
    DevOps & CloudAuto-check passed
  • Pre-production audit, hardening, and go-live checklists for FrontMCP servers.

    146 GitHub stars~6.5k tokensUpdated 2 days ago
    DevOps & CloudAuto-check passed
  • Cloud Infra Supply Chain

    zhaji2333/CkSKILLS

    当目标涉及云资产(对象存储/云元数据/Serverless)、容器/K8s、运维面板(宝塔/Grafana/Zabbix/Jenkins/GitLab/Nacos等)、消息队列/缓存中间件、CI/CD流水线、第三方回调集成、依赖组件CVE、信息泄露配置时调用。负责未授权访问、弱口令、云配置错误、供应链漏洞与敏感信息挖掘。

    114 GitHub stars~688 tokensUpdated 24 days ago
    DevOps & CloudAuto-check: warnings
  • Performing Container Security Scanning With Trivy

    mukul975/Anthropic-Cybersecurity-Skills

    Runs Trivy across every target type it supports - container images, filesystems, Git repositories, and Kubernetes clusters - for OS and dependency vulnerabilities, IaC misconfiguration, exposed…

    34k GitHub stars~818 tokensUpdated 1 mo ago
    DevOps & CloudAuto-check passed

More from uphiago/recon-skills

All 23 skills in this repo
  • Flags API endpoints whose data or actions look like they should need a login but currently don't, as part of authorized security testing.

    1.3k GitHub stars~2k tokensUpdated 1 mo ago
    Auto-check passed
  • Error Log Mining

    uphiago/recon-skills

    Mine errorlog for creds, paths, SQL when leak hunt finds. An agent skill from uphiago/recon-skills.

    1.3k GitHub stars~3.3k tokensUpdated 1 mo ago
    Auto-check passed
  • JS Secrets Extraction

    uphiago/recon-skills

    Analyze JS bundles and source maps for hardcoded secrets, API keys, JWTs, and internal endpoints

    1.3k GitHub stars~2.6k tokensUpdated 1 mo ago
    Auto-check passed
  • Recon Playbook

    uphiago/recon-skills

    A skill your agent uses when starting or restructuring an authorized external web and API assessment.

    1.3k GitHub stars~1.9k tokensUpdated 1 mo ago
    Auto-check passed
  • Web Enumeration

    uphiago/recon-skills

    Sensitive file scanning, path traversal bypass, vHost enum, .env extract, log mining, Varnish detect

    1.3k GitHub stars~2.8k tokensUpdated 1 mo ago
    Auto-check: notes
  • 401 403 Bypass Techniques

    uphiago/recon-skills

    A skill your agent uses when protected HTTP routes return 401 or 403.

    1.3k GitHub stars~3.1k tokensUpdated 1 mo ago
    Auto-check passed

Works with

Questions about Source Leak Hunt

What does Source Leak Hunt do?

Mass scan for exposed env files, backups, and git configs. An agent skill from uphiago/recon-skills. Source Leak Hunt is an agent skill from uphiago/recon-skills. Mass scan for exposed env files, backups, and git configs.

When should I use Source Leak Hunt?

Source Leak Hunt fits situations like: tasks that involve Backup and disaster recovery.

How do I install Source Leak Hunt in Claude Code?

Run `npx skills add uphiago/recon-skills --skill source-leak-hunt -a claude-code`. Or copy the skill folder (recon/source-leak-hunt in uphiago/recon-skills) into .claude/skills/source-leak-hunt in your project. Claude Code loads it when a task matches its description.

How do I install Source Leak Hunt in Codex?

Run `npx skills add uphiago/recon-skills --skill source-leak-hunt -a codex`. Or copy the skill folder (recon/source-leak-hunt in uphiago/recon-skills) into .agents/skills/source-leak-hunt in your project. Codex loads it when a task matches its description.

Can I use Source Leak Hunt in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add uphiago/recon-skills --skill source-leak-hunt -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/source-leak-hunt, .gemini/skills/source-leak-hunt, .github/skills/source-leak-hunt and .opencode/skills/source-leak-hunt in your project.

What does Source Leak Hunt need to run?

Going by SKILL.md and its folder, Source Leak Hunt needs the command-line tools its instructions call (curl and git) and credentials named DB_PASSWORD and AUTH_KEY. Our summary lists: Docker; A credential in AUTH_KEY. Compatibility (from SKILL.md): Requires curl, grep.

Does Source Leak Hunt access the network?

SKILL.md contains no URLs. Its commands use curl and git, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Source Leak Hunt safe to install?

Our automated static check of SKILL.md found notes only (mentions a .env file), nothing it rates as a warning. It is not a guarantee. Review the folder before installing.

What licence does Source Leak Hunt use?

Source Leak Hunt is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Source Leak Hunt use?

About 2.2k tokens (SKILL.md is roughly 8.9k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Source Leak Hunt?

Skills that share tags, products or a category with Source Leak Hunt: Infrastructure Setup (pavel-molyanov/molyanov-ai-dev, 297 stars), Deploying Postgres K8s (aiskillstore/marketplace, 430 stars), Scanning Containers With Trivy In Cicd (mukul975/Anthropic-Cybersecurity-Skills, 34k stars) and Frontmcp Production Readiness (agentfront/frontmcp, 146 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Source Leak Hunt?

uphiago (a GitHub user) maintains it in uphiago/recon-skills, which has 1,293 GitHub stars. The repository holds 23 skills in this directory. The repository was last updated on September 1, 2026.

Source: uphiago/recon-skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.