mirror of
https://github.com/elementalsouls/Claude-BugHunter.git
synced 2026-11-24 20:30:23 +01:00
* feat(skills): 71 -> 82 skills — add 9, expand 11, dedup dispatch, YAML/portability fixes New skills (9): hunt-jwt-crypto, hunt-rag-vector, hunt-shadow-api, hunt-captcha-bypass, hunt-clickjacking, hunt-html-injection, hunt-forgot-password, hunt-exceptional-conditions, ios-redteam-pipeline. Plus hunt-spa-api, recon-scope-triage. Expanded 11 existing skills with verified technique content (sqli, ssti, xss, csrf, rce, session, mfa-bypass, race-condition, cache-poison, brute-force, api-misconfig). Dedup (description-scoping only, bodies untouched): jwt-crypto as JWT-crypto owner; differentiate bb-local-toolkit from bug-bounty; scope sqli/nosqli, auth-bypass/saml, cache-poison/host-header, report-writing+security-arsenal/triage-validation, spa-api. Fix 2 YAML parse blockers (clickjacking, html-injection); genericize lab/harness coupling and client-neutral placeholders for cross-harness portability; fold hunt-ai-attacks into hunt-llm-ai; regenerate cbh skill index (82 skills). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * docs: update skill count 71 -> 82 in banner and README Banner (banner-v2.svg): 3 count references (hero text, big SKILLS number, harness caption) — number-only change, layout/width preserved, valid XML. README: 5 references incl. vendored-foundation '8 of 71' -> '8 of 82'. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * docs: sync skill count 71 -> 82 across docs + regenerate catalog - Regenerate docs/skills.md catalog (82 skills, all 11 new rows, grouped) via gen_skill_catalog.py; add ios-redteam-pipeline to the enterprise group set. - Update count refs: INSTALL.md, docs/index.md (48->57 hunt sub-stack), docs/multi-harness.md (x3), docs/credits.md, docs/architecture.md. - Recompute origin/community/vendored breakdown 43/20/8 -> 54/20/8 (all 11 additions are original work); credits total 71 -> 82. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * docs(architecture): slot 11 new skills into phase tables - Add 9 new hunt-* to Phase 3 hunt list (48 -> 57) - Add ios-redteam-pipeline to enterprise layer (7 -> 8); update iOS 'gap' note - Add recon-scope-triage to Phase 2 Recon - Sub-counts synced: 57-skill hunt sub-stack, 8-skill enterprise layer Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Sachin Sharma <sachin.lucideus@gmail.com> Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
118 lines
4.4 KiB
Python
118 lines
4.4 KiB
Python
#!/usr/bin/env python3
|
|
"""
|
|
gen_skill_catalog.py — generate docs/skills.md from every skill's frontmatter.
|
|
|
|
Keeps the public skill catalog in sync with what's actually on disk. Run after
|
|
adding/editing skills:
|
|
|
|
python3 scripts/gen_skill_catalog.py
|
|
|
|
Reads name/description/report_count from each skills/<name>/SKILL.md and writes a
|
|
searchable, grouped catalog page (Jekyll front matter included for the docs site).
|
|
Stdlib only.
|
|
"""
|
|
import os
|
|
import re
|
|
|
|
REPO = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
|
|
SKILLS_DIR = os.path.join(REPO, "skills")
|
|
OUT = os.path.join(REPO, "docs", "skills.md")
|
|
|
|
# Grouping by name prefix / known membership. Order defines section order.
|
|
GROUPS = [
|
|
("Hunt — web app vuln classes", lambda n: n.startswith("hunt-")),
|
|
("Enterprise platform attack", lambda n: n in {
|
|
"m365-entra-attack", "okta-attack", "cloud-iam-deep", "vmware-vcenter-attack",
|
|
"enterprise-vpn-attack", "apk-redteam-pipeline", "ios-redteam-pipeline",
|
|
"supply-chain-attack-recon", "meme-coin-audit", "web3-audit"}),
|
|
("Recon & OSINT", lambda n: "osint" in n or "recon" in n or n == "security-arsenal"),
|
|
("Methodology & mindset", lambda n: n in {
|
|
"bb-methodology", "bug-bounty", "bb-local-toolkit", "redteam-mindset"}),
|
|
("Reporting & validation", lambda n: n in {
|
|
"report-writing", "triage-validation", "bugcrowd-reporting", "evidence-hygiene",
|
|
"redteam-report-template", "mid-engagement-ir-detection"}),
|
|
]
|
|
|
|
|
|
def parse_frontmatter(path):
|
|
name = desc = ""
|
|
report_count = None
|
|
with open(path, encoding="utf-8") as fh:
|
|
raw = fh.read()
|
|
if not raw.startswith("---"):
|
|
return None
|
|
lines = raw.split("\n")
|
|
for i in range(1, len(lines)):
|
|
if lines[i].strip() == "---":
|
|
break
|
|
m = re.match(r"^(name|description|report_count):\s*(.*)$", lines[i])
|
|
if m:
|
|
k, v = m.group(1), m.group(2).strip()
|
|
if len(v) >= 2 and v[0] == v[-1] and v[0] in "\"'":
|
|
v = v[1:-1].strip()
|
|
if k == "name":
|
|
name = v
|
|
elif k == "description":
|
|
desc = v
|
|
elif k == "report_count":
|
|
report_count = v
|
|
return {"name": name, "description": desc, "report_count": report_count}
|
|
|
|
|
|
def first_sentence(text, limit=240):
|
|
text = text.strip()
|
|
cut = re.split(r"(?<=[.。])\s", text, maxsplit=1)[0]
|
|
if len(cut) > limit:
|
|
cut = cut[:limit].rsplit(" ", 1)[0] + "…"
|
|
return cut
|
|
|
|
|
|
def main():
|
|
skills = []
|
|
for d in sorted(os.listdir(SKILLS_DIR)):
|
|
sp = os.path.join(SKILLS_DIR, d, "SKILL.md")
|
|
if os.path.isfile(sp):
|
|
fm = parse_frontmatter(sp)
|
|
if fm and fm["name"]:
|
|
skills.append(fm)
|
|
|
|
assigned = set()
|
|
sections = []
|
|
for title, pred in GROUPS:
|
|
members = [s for s in skills if s["name"] not in assigned and pred(s["name"])]
|
|
for s in members:
|
|
assigned.add(s["name"])
|
|
if members:
|
|
sections.append((title, members))
|
|
leftover = [s for s in skills if s["name"] not in assigned]
|
|
if leftover:
|
|
sections.append(("Other", leftover))
|
|
|
|
total = len(skills)
|
|
with open(OUT, "w", encoding="utf-8") as out:
|
|
out.write("---\n")
|
|
out.write("title: Skill catalog\n")
|
|
out.write("nav_order: 2\n")
|
|
out.write("description: Searchable index of every skill in the bundle.\n")
|
|
out.write("---\n\n")
|
|
out.write("# Skill catalog\n\n")
|
|
out.write(f"All **{total} skills** in the bundle, grouped by domain. "
|
|
"Each auto-loads when your prompt matches its trigger keywords — "
|
|
"no need to invoke by name. Use your browser's find (⌘/Ctrl-F) "
|
|
"or the docs search box.\n\n")
|
|
out.write("> Generated by `scripts/gen_skill_catalog.py` — do not edit by hand.\n\n")
|
|
for title, members in sections:
|
|
out.write(f"## {title} ({len(members)})\n\n")
|
|
out.write("| Skill | What it does | Reports |\n")
|
|
out.write("|---|---|---|\n")
|
|
for s in sorted(members, key=lambda x: x["name"]):
|
|
rc = s["report_count"] or "—"
|
|
desc = first_sentence(s["description"]).replace("|", "\\|")
|
|
out.write(f"| `{s['name']}` | {desc} | {rc} |\n")
|
|
out.write("\n")
|
|
print(f"Wrote {OUT} — {total} skills across {len(sections)} sections.")
|
|
|
|
|
|
if __name__ == "__main__":
|
|
main()
|