Insecure source code management

From ShulkwiSEC/bb-huge · View interactive version

Insecure source code management is an AI agent skill from the GitHub repository ShulkwiSEC/bb-huge. Source control and artifact exposure (.git, .svn, .hg, backups, .env). Use when recon finds VCS paths, 403 on hidden dirs, or backup/config leaks during authorized testing.

How to use this skill

Skill file

SKILL: Insecure Source Code Management

AI LOAD INSTRUCTION: This skill covers detection and recovery of exposed version-control metadata, common backup artifacts, and related misconfigurations. Use only in authorized assessments. Treat recovered credentials and URLs as sensitive; do not exfiltrate real data beyond scope. For broad discovery workflow, cross-load recon-for-sec and recon-and-methodology when those skills exist in the workspace.

0. QUICK START

High-value paths to probe first (GET or HEAD, respect rate limits):

/.git/HEAD
/.git/config
/.svn/entries
/.svn/wc.db
/.hg/requires
/.bzr/README
/.DS_Store
/.env

Routing note: quickly probe these paths first; for full recon workflow, load methodology from recon-for-sec and recon-and-methodology before deeper testing.


1. GIT EXPOSURE

Detection

ref: refs/heads/main

403 vs 404

/.git/HEAD
/.git/config
/.git/logs/HEAD
/.git/refs/heads/main

A 403 on the directory plus 200 on HEAD strongly indicates exposure.

Recovery tools (open source)

Key files to prioritize

| Path | Why it matters |

|------|----------------|

| .git/config | Remotes, credentials, hooks paths |

| .git/logs/HEAD | Commit history, reflog-style leakage |

| .git/refs/heads/* | Branch tips, commit SHAs |

| .git/packed-refs | Packed branch/tag refs |

| .git/objects/** | Object blobs for reconstruction |


2. SVN EXPOSURE

Detection

Example probe:

GET /.svn/entries HTTP/1.1
GET /.svn/wc.db HTTP/1.1

Recovery


3. MERCURIAL EXPOSURE

Detection

GET /.hg/requires HTTP/1.1
GET /.hg/store/ HTTP/1.1

Recovery


4. OTHER LEAKS

Bazaar (Bzr)

macOS `.DS_Store`

Backup and config artifacts

Probe (adjust for app root and naming conventions):

/.env
/backup.zip
/backup.tar.gz
/wwwroot.rar
/backup.sql
/config.php.bak
/.config.php.swp

Web server misconfiguration signal (example: NGINX)


5. DECISION TREE

  1. Probe /.git/HEAD → ref: refs/heads/ pattern? → run git-dumper / GitTools / GitHacker; review config and logs/HEAD for secrets.
  2. Else probe /.svn/wc.db or entries → success? → svn-extractor or manual wc.db + pristine recovery.
  3. Else probe /.hg/requires → success? → mercurial dumper.
  4. Else probe /.bzr/README → Bazaar tooling or manual path walk.
  5. Parallel: fetch /.DS_Store, /.env, common backup extensions on app root and parent paths.
  6. Interpret status codes: 403 on directory + 200 on specific files → treat as high priority for file-by-file extraction.

6. RELATED ROUTING

Note: coordinate with recon skills—set scope and request rate first, then run targeted VCS/backup validation.

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.