mirror of
https://github.com/elementalsouls/Claude-BugHunter.git
synced 2026-11-24 20:30:23 +01:00
* 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>
49 lines
1.6 KiB
Python
49 lines
1.6 KiB
Python
#!/usr/bin/env python3
|
|
"""
|
|
gen_skill_index.py — build cbh/data/skill_index.json from the repo.
|
|
|
|
The `cbh` CLI needs two things at runtime: each skill's `description:` frontmatter
|
|
(for `cbh classify`'s matcher) and the list of disclosed-report filenames (shown as
|
|
pointers). When `cbh` is pip-installed without the full repo, it falls back to this
|
|
generated index instead of reading skills/ and docs/disclosed-reports/ directly.
|
|
|
|
Run after adding/editing skills:
|
|
python3 scripts/gen_skill_index.py
|
|
"""
|
|
from __future__ import annotations
|
|
import json
|
|
import re
|
|
from pathlib import Path
|
|
|
|
REPO = Path(__file__).resolve().parent.parent
|
|
SKILLS = REPO / "skills"
|
|
REPORTS = REPO / "docs" / "disclosed-reports"
|
|
OUT = REPO / "cbh" / "data" / "skill_index.json"
|
|
|
|
DESC_RE = re.compile(r"^description:\s*(.+?)(?=\n[a-z_]+:|^---|\Z)", re.M | re.S)
|
|
|
|
|
|
def main() -> int:
|
|
skills: dict[str, str] = {}
|
|
for d in sorted(SKILLS.iterdir()):
|
|
sm = d / "SKILL.md"
|
|
if not d.is_dir() or not sm.exists():
|
|
continue
|
|
m = DESC_RE.search(sm.read_text(encoding="utf-8"))
|
|
if m:
|
|
desc = m.group(1).strip().strip('"').strip("'").strip()
|
|
skills[d.name] = desc[:2000]
|
|
|
|
reports = sorted(p.name for p in REPORTS.glob("hunt-*.md")) if REPORTS.exists() else []
|
|
|
|
OUT.parent.mkdir(parents=True, exist_ok=True)
|
|
OUT.write_text(json.dumps(
|
|
{"skills": skills, "reports": reports}, indent=1, sort_keys=True) + "\n",
|
|
encoding="utf-8")
|
|
print(f"wrote {OUT.relative_to(REPO)} — {len(skills)} skills, {len(reports)} reports")
|
|
return 0
|
|
|
|
|
|
if __name__ == "__main__":
|
|
raise SystemExit(main())
|