Skip to content

Commit 05098fc

Browse files
richter83-starBrian Richterclaude
authored
DX hardening, cbh packaging, and Claude-OSINT integration (#43)
* fix(dx): harden install, package cbh as pipx-installable, fix broken commands Addresses 6 P1 defects from a DX review (solo bug-bounty hunter persona): - install: .gitattributes (eol=lf) + CRLF self-heal in install.sh; INSTALL uses bash form - cli: package cbh as a real pip/pipx console-script (pyproject.toml + cbh/ package + bundled cbh/data/skill_index.json fallback + scripts/gen_skill_index.py); scripts/cbh.py kept as a clone shim; recon writes to ./recon when installed - commands: add /scope backed by a new deterministic engine/scope.py CLI (was called mandatory in /hunt but missing); reframe /token-scan, /intel, /surface so the skill path is primary and missing helper scripts are clearly optional - docs: install capability matrix (plugin vs clone vs pipx); reconcile the authorization story in /hunt (don't ingest the SOW document != skip scope verification) Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * feat(skills): consolidate recon skills as canonical (integration Phase 1) BugHunter becomes the source of truth for the two recon skills shared with Claude-OSINT (which now re-exports them). - offensive-osint: port h1_reference.py (HackerOne hacktivity agent) + dashboard.py (local recon console) + assets/ font from Claude-OSINT (CRLF->LF); documented in references/helpers-and-automation.md sec 49-50 + SKILL.md router. references/ split kept; OSINT's recent change was dashboard-only so no SKILL.md content delta. - osint-methodology: keep BugHunter's expanded version (1703 vs 455 lines, supersedes OSINT's); bump version 2.1 -> 2.3 to pass OSINT's 2.2. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * fix(dx): correct CRLF docs + scope.py footguns (post-verification) A 20-agent adversarial verification found the install.sh CRLF self-heal was non-functional (bash parse-aborts on the CRLF case statement before the guard runs) and the docs over-promised it; plus two fail-safe scope.py footguns. - install.sh: remove the dead self-heal block (.gitattributes is the real fix); INSTALL.md now tells the truth (renormalize an existing CRLF checkout manually) - engine/scope.py: keep bullets under nested ### sub-headings (was dropping in-scope assets under default-deny); --in-scope/--out-of-scope are now repeatable flags so a target placed after them is no longer swallowed - commands/scope.md: inline example uses repeated --in-scope flags - .gitignore: anchor scope.md -> /scope.md so it no longer shadows commands/scope.md Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * feat(skills): add triggers frontmatter to offensive-osint offensive-osint lacked the `triggers:` field that osint-methodology already has and that the sibling Claude-OSINT repo's frontmatter lint requires (>=5). Added the 127-entry recon trigger list so the skill is internally consistent and Claude-OSINT can re-export it without CI failure. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * feat(install): install manifest + safe --uninstall + skip-identical (Phase 3) Coexistence with the sister bundle Claude-OSINT: each install now records a manifest of its footprint so uninstall removes only its own files and keeps any skill the other bundle still owns (the two shared recon skills). - install.sh: write ~/.claude/.skill-manifests/claude-bughunter.txt; --uninstall removes tracked skills/commands/hunt.sh + rc line but keeps shared-owned skills; skip re-copying a skill/command already present and identical (no last-installer-wins clobber) - INSTALL.md: replace the unsafe rm -rf ~/.claude/skills advice with --uninstall - README: document safe coexistence with Claude-OSINT Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * feat(cbh): recon->hunt manifest contract (integration Phase 4) The data handoff between recon and hunt: cbh recon emits recon/<target>/manifest.json, which cbh surface and the hunt scaffold consume. Turns the conceptual 'OSINT recons, BugHunter hunts' into a real, tested contract. - cbh recon: emit manifest.json (schema 1.0) -- assets + ranked_surface (P1/P2/Kill via host heuristic + classify) + counts; secrets[]/identity_fabric{} left for the offensive-osint skill's deeper probes to append (shared-container design) - cbh surface <target>: new subcommand -- read the manifest, print the ranked surface - hunt.sh: ingest a manifest (2nd arg / $HUNT_MANIFEST / ./recon/<target>/) to seed scope.md (live hosts) + notes.md (ranked surface) - docs/recon-manifest.md + recon-manifest.schema.json: the contract spec - docs/cbh-cli.md, commands/surface.md: document the surface subcommand + manifest Round-trip verified end-to-end (synthetic + a real 'cbh recon example.com'). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * feat(dx): P2 backlog — --no-shell flag, supply-chain trust section, feedback template - install.sh: add --no-shell (don't touch shell rc; print the source line to add); the default path now also echoes the exact line it appended (T2) - SECURITY.md: 'Verifying what you install' supply-chain trust section — leans on the existing skill-lint CI, with an explicit 'what this does NOT prove' disclaimer and pin-to-reviewed-commit guidance, no malware-scanner theater (T13) - add .github/ISSUE_TEMPLATE/dx_feedback.yml — low-friction 'skill didn't trigger / first-hunt' DX feedback form (T14) Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Brian Richter <richter83.star@gmail.com> Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent 780caf7 commit 05098fc

30 files changed

Lines changed: 3213 additions & 801 deletions

.gitattributes

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Normalize line endings so shell/Python entrypoints stay LF on every platform.
2+
# Without this, a Windows checkout (incl. WSL on a Windows-mounted drive) can
3+
# land CRLF in the scripts and break the installer with `env: 'bash\r': ...`.
4+
* text=auto eol=lf
5+
6+
# Executable text MUST be LF regardless of platform.
7+
*.sh text eol=lf
8+
*.py text eol=lf
9+
*.bash text eol=lf
10+
11+
# Treat known binary assets as binary (no eol munging).
12+
*.svg binary
13+
*.png binary
14+
*.jpg binary
15+
*.jpeg binary
16+
*.gif binary
17+
*.ico binary
18+
*.cast binary
19+
*.woff2 binary
20+
*.woff binary
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: 💬 DX feedback (skill didn't trigger / first-hunt experience)
2+
description: A skill didn't load when you expected it, install/onboarding tripped you up, or you want to share how your first hunt went.
3+
title: "[dx] <short summary>"
4+
labels: ["dx-feedback"]
5+
body:
6+
- type: markdown
7+
attributes:
8+
value: |
9+
Quick, low-friction feedback on the developer experience — onboarding, install, or skill triggering. Helps us tune description keywords and the getting-started flow. **Anonymize all target data.**
10+
- type: dropdown
11+
id: area
12+
attributes:
13+
label: What's this about?
14+
options:
15+
- A skill didn't trigger when I expected it to
16+
- Install / onboarding friction
17+
- First-hunt experience (good or bad)
18+
- cbh CLI behavior
19+
- Other DX feedback
20+
validations:
21+
required: true
22+
- type: textarea
23+
id: what
24+
attributes:
25+
label: What happened?
26+
description: For a non-triggering skill, paste the prompt you used and which skill you expected to load. For install/onboarding, what step and what you saw.
27+
validations:
28+
required: true
29+
- type: textarea
30+
id: expected
31+
attributes:
32+
label: What did you expect instead?
33+
validations:
34+
required: false
35+
- type: input
36+
id: env
37+
attributes:
38+
label: Environment (optional)
39+
description: Harness (Claude Code / OpenCode / Codex / Hermes), OS, install path (plugin vs clone), cbh version.
40+
validations:
41+
required: false

.gitignore

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ evidence/
2828
findings/
2929
submissions.txt
3030
notes.md
31-
scope.md
31+
/scope.md
3232
CLAUDE.md.local
3333
targets/
3434

@@ -48,6 +48,10 @@ __pycache__/
4848
*.pyc
4949
.venv/
5050
venv/
51+
# packaging build output (cbh is pip/pipx installable)
52+
build/
53+
dist/
54+
*.egg-info/
5155

5256
# Node (if anyone adds tooling later)
5357
node_modules/

INSTALL.md

Lines changed: 20 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,15 @@ cd Claude-BugHunter
3737
## Step 2 — Run the installer
3838

3939
```bash
40-
chmod +x scripts/install.sh
41-
./scripts/install.sh
40+
bash scripts/install.sh
4241
```
4342

43+
> On Windows/WSL, the repo ships a `.gitattributes` that forces LF line endings, so a
44+
> **fresh clone installs cleanly**. If you have an **existing** checkout that already
45+
> picked up CRLF (cloned before this `.gitattributes`), normalize it once with
46+
> `git add --renormalize . && git checkout .` (or just re-clone) — a CRLF-corrupted
47+
> shell script aborts with a `syntax error` and cannot fix itself.
48+
4449
This copies:
4550
- All 71 skills → `~/.claude/skills/`
4651
- All 15 slash commands → `~/.claude/commands/`
@@ -192,24 +197,21 @@ Then go find a real program and put it to work. See [USAGE.md](USAGE.md) for the
192197

193198
## Uninstall
194199

195-
To remove everything this repo installed:
200+
The installer writes a manifest of exactly what it placed (under
201+
`~/.claude/.skill-manifests/claude-bughunter.txt`). Remove that footprint — and
202+
**only** that footprint — with:
196203

197204
```bash
198-
# Remove all bundled skills (this removes EVERY skill in ~/.claude/skills,
199-
# including any you added manually — be selective if needed)
200-
# rm -rf ~/.claude/skills
201-
202-
# Or remove only the originals contributed by this repo:
203-
rm -rf ~/.claude/skills/bugcrowd-reporting
204-
rm -rf ~/.claude/skills/evidence-hygiene
205+
bash scripts/install.sh --uninstall
206+
```
205207

206-
# Remove all bundled commands
207-
# rm -rf ~/.claude/commands
208+
This removes the bundle's skills, slash commands, the `hunt.sh` script, and its
209+
shell-rc source line. Skills you also installed from the **sister bundle**
210+
[Claude-OSINT](https://github.com/elementalsouls/Claude-OSINT)`offensive-osint`
211+
and `osint-methodology` — are **kept** if Claude-OSINT's manifest still claims them,
212+
so uninstalling one bundle never breaks the other. (Install backups under
213+
`~/.claude/install-backups/` are left in place; delete them manually if you want.)
208214

209-
# Remove the hunt shell command
210-
rm -f ~/.claude/scripts/hunt.sh
211-
sed -i.bak '/claude\/scripts\/hunt.sh/d' ~/.zshrc
215+
If you installed via the **plugin** instead of the script: `/plugin uninstall claude-bughunter@elementalsouls`.
212216

213-
# Remove Burp MCP entry
214-
claude mcp remove burp
215-
```
217+
Burp MCP, if you wired it, is removed separately: `claude mcp remove burp`.

README.md

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,18 @@ cd Claude-BugHunter
5353
bash scripts/install.sh # copies skills + commands into ~/.claude/
5454
```
5555

56+
**What each install path gives you:**
57+
58+
| Path | 71 skills + 15 slash commands | `cbh` CLI | `hunt` scaffolder |
59+
|---|---|---|---|
60+
| **A — plugin** | ✅ namespaced under `claude-bughunter:` | ➕ separate `pipx install` | ❌ clone-only |
61+
| **B — copy install** | ✅ copied into `~/.claude/` | ✅ from the clone | ✅ from the clone |
62+
63+
The plugin is the fastest path to the skills + slash commands. The terminal-native
64+
`cbh` runner installs standalone — `pipx install git+https://github.com/elementalsouls/Claude-BugHunter`
65+
— so plugin users can add it without a full clone (see [`cbh` CLI](docs/cbh-cli.md)).
66+
The `hunt` engagement scaffolder ships with the clone (Option B).
67+
5668
That's it. Open Claude Code and describe what you're testing in plain English — the right skill loads automatically, no invocation by name:
5769

5870
```text
@@ -249,7 +261,7 @@ Operational tradecraft accumulated across bug-bounty engagements and authorized
249261

250262
**Author:** [ElementalSoul](https://github.com/elementalsouls) · GenAI Security Research
251263

252-
**Sister project:** [Claude-OSINT](https://github.com/elementalsouls/Claude-OSINT) — paired skills for the recon phase that this bundle picks up after.
264+
**Sister project:** [Claude-OSINT](https://github.com/elementalsouls/Claude-OSINT) — paired skills for the recon phase that this bundle picks up after. Its two recon skills (`offensive-osint`, `osint-methodology`) are **canonically maintained here** and re-exported there, so the two are byte-identical. **Installing both is safe:** each bundle's `install.sh` records a manifest, the script skips re-copying an identical skill, and `--uninstall` keeps any skill the other bundle still owns — uninstalling one never breaks the other.
253265

254266
**Vendored foundation:** [shuvonsec/claude-bug-bounty](https://github.com/shuvonsec/claude-bug-bounty) — methodology, validation, reporting, payload library (8 of 71 skills + 15 slash commands)
255267

SECURITY.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,24 @@ The reasoning: internal-AD attacks against monitored corporate networks have a f
4848

4949
If you reach domain-admin-class objectives during an engagement, the bundle's external-perimeter chain ends at "credential discovered + access verified" — handoff to specialist internal-RT tooling (Impacket, NetExec, CrackMapExec, Rubeus, Certify, BloodHound) is intentionally outside the bundle's scope.
5050

51+
## Verifying what you install (supply-chain trust)
52+
53+
You are installing 71 `SKILL.md` files plus shell and Python helpers into your AI agent's context. Agent Skills are third-party code — treat them like any dependency you run. Independent research (Snyk "ToxicSkills", 2026) found prompt injection in a meaningful fraction of public skills, so verification matters.
54+
55+
**What we do on our side:**
56+
57+
- **CI gate on every skill change**[`.github/workflows/skill-lint.yml`](.github/workflows/skill-lint.yml) runs `scripts/lint_skills.py` on each PR: it validates `SKILL.md` structure against `CONTRIBUTING.md` and scans for leaked secrets and client/engagement identifiers.
58+
- **Pinned, reviewable provenance** — installing via the **plugin marketplace** pins each release to a specific commit SHA and runs Anthropic's automated screening. From a clone you can pin yourself: `git checkout <tag-or-commit>` before `bash scripts/install.sh`.
59+
- **No network calls at install time**`install.sh` only copies local files and (unless `--no-shell`) appends one `source` line to your shell rc, which it prints back to you.
60+
61+
**What this does NOT prove — read this:**
62+
63+
- The lint is a **structural + secrets/identifier** check. It is **not** a malware or prompt-injection detector and makes no claim to catch a malicious skill. A clean lint means "well-formed, no obvious leaked secret" — nothing more.
64+
- **Review before you trust.** The `SKILL.md` files and bundled scripts (`skills/*/scripts/`, `scripts/`) are plain text — skim them before installing, paying attention to anything that fetches from the network or executes shell.
65+
- **Pin to a reviewed tag/commit** rather than tracking `main`, so an upstream change can't alter what runs in your agent without your say-so.
66+
67+
If you find a skill or script in this repo that could be abused, see **Reporting a security issue** below.
68+
5169
## Reporting a security issue in this repo
5270

5371
If you discover a security issue in **this repository itself** (not in a target you're hunting):

cbh/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
"""claude-bughunter CLI package."""
2+
__version__ = "2.1.0"

0 commit comments

Comments
 (0)