Skip to main content
skill CX Codex

insecure-source-code-management — Claude Code skill: install & guide

Detects exposed .git, .svn, and .hg repositories along with leaked .env files. Guides extraction workflows during authorized security tests.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add yaklang/hack-skills --skill insecure-source-code-management -a claude-code
Open on GitHub

What insecure-source-code-management does

The skill provides workflows to detect and extract exposed version-control metadata and configuration files. It covers high-value probe paths including /.git/HEAD, /.svn/wc.db, /.hg/requires, and .DS_Store. It also recommends specific open-source dumpers such as arthaud/git-dumper, GitTools, and svn-extractor for rebuilding project trees.

HTTP status interpretation matters here. A 403 status on /.git/ confirms the route exists even if directory listing is blocked. If direct requests to /.git/config return 200, the repository remains extractable file by file. The instructions restrict actions strictly to authorized engagements, treating exposed credentials as sensitive.

What it helps with

  • detect exposed .git, .svn, .hg, and .bzr metadata on web roots
  • distinguish 403 directory access blocks from true 404 missing routes
  • recover source trees from open repos using git-dumper and GitTools
  • locate dangling archive backups and exposed .env configuration files

Example prompts for the agent

  • Check this target domain for exposed .git directories and configuration files
  • The /.git/ directory returned 403 but HEAD returned 200. How should I dump it?
  • Generate a probe list for exposed SVN and Mercurial metadata files

How to install insecure-source-code-management

1Skills CLI (Vercel)

npx skills add yaklang/hack-skills --skill insecure-source-code-management -a claude-code

2Manually: put the files in place

~/.claude/skills/insecure-source-code-management/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/insecure-source-code-management/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about insecure-source-code-management

How to install insecure-source-code-management in Claude Code?

Run npx skills add yaklang/hack-skills --skill insecure-source-code-management -a claude-code. You can also reference the file directly at ~/.claude/skills/insecure-source-code-management/SKILL.md.

What does insecure-source-code-management do?

It guides coding agents through probing, identifying, and recovering exposed version control trees and sensitive configuration artifacts during authorized assessments.

Why does a 403 response on /.git/ matter during testing?

A 403 response often confirms that the directory exists on the web server. If targeted subpaths like /.git/HEAD or /.git/config return 200, the repository can still be recovered.

Source text

SKILL.md · MIT
---
name: insecure-source-code-management
description: >-
  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.
---

# 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](../recon-for-sec/SKILL.md) and [recon-and-methodology](../recon-and-methodology/SKILL.md) when those skills exist in the workspace.

## 0. QUICK START

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

```http
/.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

- **`/.git/HEAD`** — valid repo often returns plain text like:

```text
ref: refs/heads/main
```

- **`/.git/config`** — may expose `remote.origin.url`, user identity, or embedded credentials.
- **`/.git/index`**, **`/.git/objects/`** — partial object store access enables reconstruction with the right tools.

### 403 vs 404

- **`404`** — path likely absent or fully blocked at the edge.
- **`403` on `/.git/`** — directory may **exist** but listing is denied; still try direct file URLs:

```http
/.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)

- **`arthaud/git-dumper`** — dumps reachable `.git` tree when individual files are fetchable.
- **`internetwache/GitTools`** — Dumper, Extractor, Finder modules for partial/corrupt dumps.
- **`WangYihang/GitHacker`** — alternative recovery when standard dumpers miss edge cases.

### 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

- **SVN before 1.7**: **`/.svn/entries`** — XML or text metadata listing paths and revisions.
- **SVN ≥ 1.7**: **`/.svn/wc.db`** — SQLite working copy database (`PRAGMA table_info` after download).

Example probe:

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

### Recovery

- **`anantshri/svn-extractor`** — automated extraction from exposed `.svn`.
- **Manual**: download `wc.db`, query with `sqlite3` for file paths and checksums, then request **`/.svn/pristine/`** blobs if exposed.

---

## 3. MERCURIAL EXPOSURE

### Detection

- **`/.hg/requires`** — small text file listing repository features; confirms Mercurial metadata.

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

### Recovery

- **`sahildhar/mercurial_source_code_dumper`** — dumps repository when store paths are reachable.

---

## 4. OTHER LEAKS

### Bazaar (Bzr)

- Probe **`/.bzr/README`** and **`/.bzr/branch-format`** for Bazaar metadata.

### macOS `.DS_Store`

- **`/.DS_Store`** can encode directory and filename listings.
- Tools: **`gehaxelt/ds-store`**, **`lijiejie/ds_store_exp`** — parse `.DS_Store` offline.

### Backup and config artifacts

Probe (adjust for app root and naming conventions):

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

### Web server misconfiguration signal (example: NGINX)

- **`location /.git { deny all; }`** — may return **403** for `/.git/` while still allowing or denying specific subpaths depending on rules.
- **403 on a protected location** can **confirm the route exists**; always distinguish from **404** on non-existent paths.

---

## 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

- From **[recon-for-sec](../recon-for-sec/SKILL.md)** — scope-safe discovery, crawling, and fingerprinting before deep VCS tests.
- From **[recon-and-methodology](../recon-and-methodology/SKILL.md)** — structured methodology and evidence handling.

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

© yaklang · MIT · yaklang/hack-skills

Similar skills

All skills for Security →

From the same set93

subdomain-takeover A playbook for finding dangling CNAME, NS and MX records and claiming the resources behind them. Useful for pentests and bug bounty work. CX Codex +1 3,600installs http-host-header-attacks Playbook for HTTP Host header attacks: password reset poisoning, cache poisoning, routing SSRF, and virtual host bypass. Useful for auditing applications that trust incoming headers. CX Codex +1 3,600installs web-cache-deception This skill guides checks for cached authenticated pages and cache poisoning conditions. Use it when auditing a CDN, reverse proxy, or application cache. CX Codex +1 3,600installs mobile-ssl-pinning-bypass A playbook for bypassing SSL pinning in mobile apps: Android and iOS methods plus framework-specific tricks for Flutter, React Native and Xamarin. CX Codex +1 3,600installs crlf-injection A playbook for CRLF injection: smuggling carriage-return and line-feed characters into response headers, redirects and logs. Useful when scanners miss it. CX Codex +1 3,600installs symbolic-execution-tools A symbolic execution playbook that keeps your agent's angr, Z3 and Unicorn scripts from breaking on state setup and missing libc hooks. CX Codex +1 3,600installs browser-exploitation-v8 A playbook for exploiting JavaScript engine bugs: JIT type confusion, bounds elimination, V8 sandbox bypass. Built for CTF work and Chrome bug analysis. CX Codex +1 3,600installs csp-bypass-advanced A skill for picking apart Content Security Policy: which directives the policy leaves open and how data leaves the page without JavaScript. CX Codex +1 3,600installs

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor