mirror of
https://github.com/elementalsouls/Claude-BugHunter.git
synced 2026-11-24 20:30:23 +01:00
Governance fix (Security): the autopilot ledger (engine/memory.py) wrote host/url findings, negatives, and per-target rollups to the shared ~/.claude/bughunter/memory/ store on EVERY run, while its reads were already gated behind --use-memory. That asymmetry persisted target-identifying data by default. record_finding and record_run are now gated behind --use-memory too: a default run pools NOTHING target-identifying across engagements. Opt-in --use-memory preserves the ledger and /pickup exactly as before — no behaviour removed, no data relocated. Confirmed no other default-on reader breaks (/pickup, /remember, /autopilot docs updated to say recall is opt-in). New (Added): engine/attack_metrics.py + --use-metrics. A leak-proof, per-operator store of GENERIC COUNTERS ONLY — attempts/successes/cost keyed by tech-stack signature + vuln-class (+ generic technique) — that never stores a host, url, payload, or body (fail-closed allowlist). On a new target it ranks class suggestions by past hit-rate in arsenal.md; advisory only — never auto-fires, and scope + the corroborator + the 7-Q gate still apply. No engagement/host field exists, so cross-engagement leak is impossible by construction. Tests: engine/test_attack_metrics.py (8), engine/test_memory_write_gate.py (4). engine 103 OK, tests 129 OK, lint/doc-count/leak/skill_index clean. Docs: engine/README.md, USAGE.md, /pickup, /remember, /autopilot, .gitignore, CHANGELOG. Engine code only — no skill added, counts unchanged. Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
19 KiB
19 KiB
Changelog
All notable changes to this project are documented here. Format follows Keep a Changelog; versioning is loosely SemVer at the bundle level.
Unreleased
Security
- Engine data isolation by default — cross-engagement capture is now opt-in. The
autopilot ledger (
engine/memory.py) wrote confirmed findings, negatives, and per-target rollups (hostnames + URLs) to~/.claude/bughunter/memory/on every run, while its reads were already gated behind--use-memory— an asymmetry that persisted target-identifying data it did not even use by default.record_findingandrecord_runare now gated behind--use-memorytoo, so a default run pools nothing target-identifying across engagements (important on authorized client work). Opt-in--use-memorypreserves the ledger — and/pickup— exactly as before; this is documented inengine/README.md, USAGE, and the/pickup,/remember,/autopilotcommand docs. No behaviour removed, no data relocated.
Added
- Leak-proof attack metrics (
engine/attack_metrics.py,--use-metrics). An opt-in, per-operator store of generic counters only — attempts / successes / cost keyed by tech-stack signature + vuln-class (+ a generic technique category) — that never stores a hostname, URL, payload, or response body (fail-closed allowlist drops anything target-shaped). On a new target it ranks class suggestions by past hit-rate inarsenal.md; the ranking is advisory only — it never auto-fires, and scope, the deterministic corroborator, and the 7-Question gate still apply. Leak-proof by construction (no host/engagement field exists), so it is safe to leave on across clients. Store:~/.claude/bughunter/attack-metrics/metrics.json(git-ignored). exploit-completionskill (new, 83 → 84) — a discipline-family skill for the failure where the bug is found and the payload is right but the proof is abandoned one step early: inspect and follow every redirect, diff each response against a named expected outcome (not a 2xx or a delivered POST), and stop-and-change-approach after N identical failures. Pairs withtriage-validation(is it a finding?) andredteam-mindset(don't abandon coverage). Skill-count metrics synced to 84 across README hero + banner,docs/skills.mdcatalog,docs/index.md,docs/multi-harness.md, INSTALL, USAGE, SECURITY, architecture, credits, both.claude-plugin/*.json, and the regeneratedcbh/data/skill_index.json.cbh scope import— fillscope.mdfrom the program's published scope (README roadmap item).cbh scope import h1:<handle> -o scope.md(alsobugcrowd:/intigriti:/yeswehack:or a program URL) reads public scopes from bounty-targets-data with no API key;--jsontakes the HackerOne MCPget_my_program/get_program_scopeoutput for private programs;--textparses pasted program-page lists and extracts researcher-conduct rules. It fails closed: only unambiguous hosts, wildcards, IPs and CIDRs become rules, exact hosts become anchoredre:^host$rules (a bare host rule would admit every subdomain), and path-limited assets, placeholders, free text and mid-label wildcards go to## Needs manual reviewinstead. Re-importing refreshes only the marked import blocks, so hand-written rules survive. Checked against all 939 public programs in the dump: every rule round-trips throughengine/scope.py, no subdomain of an exact host is admitted, and every deny rule rejects its host. Thehuntscaffolders point at it. (cbh/scope_import.py,tests/test_scope_import.py)- Disclosed-report grounding, content-verified — 28
hunt-*skills strengthened with cited public HackerOne disclosures. 433 distinct disclosed reports are now individually cited across 36 pattern-library files indocs/disclosed-reports/. New personal-research pipeline underresearch/reports/(harvest_h1.pymetadata collector,classify_reports.pyclass router,verify_citations.pycredibility gate). Every citation is content-verified:verify_citations.pyfetches each report's public subject and confirms it corroborates the skill it's cited under — 433 reports, 0 mismatch, 0 weak.report_countconvention is now explicit: distinct cited disclosed-report URLs (grep-auditable), documented indocs/disclosed-reports/README.md. Two-tier grounding —report_countcounts disclosed reports only; deeper web/API technique is cited undersources:(research / CVE). The681headline stays the pattern-count;433is the now-auditable cited-report count. Some counts reconciled down where a prior number was asserted without a backing corpus (e.g.hunt-source-leak31→7) — honesty, not a coverage loss: every SKILL.md methodology body is unchanged, the delta is purely additive grounding. Targets genericized (technique kept, victim dropped); leak-guard clean. - **Native Windows install ** — every
.shinstaller now has a PowerShell counterpart:scripts/install.ps1,scripts/install-community-skills.ps1,scripts/hunt.ps1. Same behavior, same flags (hyphen-style:-All,-Agents,-Hermes,-BurpMcp,-NoProfile,-Uninstall), same manifest-driven uninstall.hunt.ps1is dot-sourced from the PowerShell$PROFILE(the Windows equivalent of the.zshrc/.bashrcsourceline)..gitattributesnow pins*.ps1to LF alongside*.sh/*.py. Docs (README, INSTALL, USAGE, multi-harness, SECURITY, index, credits) updated to show both paths. macOS/Linux unchanged. - Skill library expanded 71 → 82 — 9 new hunt skills (
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) plushunt-spa-apiandrecon-scope-triage; 11 existing skills expanded with verified technique content. Hunt sub-stack 48 → 57.hunt-ai-attacksfolded intohunt-llm-ai(was a frontmatter-less duplicate). - Claude Code plugin marketplace —
.claude-plugin/marketplace.json+.claude-plugin/plugin.jsonmake the bundle installable natively:/plugin marketplace add elementalsouls/Claude-BugHunterthen/plugin install claude-bughunter@elementalsouls. Skills load namespaced underclaude-bughunter:and update on version bump. Thescripts/install.shcopy method stays as a fallback. This is the convention used by Anthropic's own marketplaces and Trail of Bits. - Multi-harness install — the 82 Agent Skills now run on OpenCode, OpenAI Codex CLI, and
Hermes Agent, not just Claude Code.
scripts/install.shgains--agents(→~/.agents/skills/, read by Codex + OpenCode),--hermes(→~/.hermes/skills/),--all, and--burp-mcp(translates the existing Burp MCP into each harness's config viascripts/setup_harness_mcp.py; OpenCode JSON + Codex TOML + Hermes YAML written). Verified end-to-end on OpenCode, Codex, and Hermes (skills load + live Burp MCP connects). Slash commands, the plugin marketplace, andhunt-dispatchremain Claude-Code-only. New guide:docs/multi-harness.md.
Fixed
- Five terminal-tooling / engine correctness bugs (built in-house, reporters credited):
cbh classifymatched URL path patterns against the whole URL, so a keyword in the hostname (verify.example.com,cart.shop.example) false-triggered a skill — it now matches the path and query only (reported by @Prasad-Pitke, #219 / #218); the engine's unfencedextract_jsonused one greedy{.*}span, so an earlier brace (a curl payload in the reply) made it unparseable and the verdict was lost — it now keeps the last top-level JSON value (reported by @thejesh23, #217);secret_scanskipped noisy directories by substring of the whole path including the root, so scanning./dist,.github/ornightly-builds/silently scanned nothing and exited a false clean — it now prunes skip directories by exact name below the root and always scans the root (reported by @thejesh23, #216); subdomain enumeration took the apex by truncating a seed host to two labels, landing on the public suffix (example.co.uk→co.uk) so--expandnever enumerated the target — roots are now derived from the authorized scope domains (reported by @JasonOA888, #213); and the leak guard loaded malformed.sha256denylist entries verbatim as hashes that match nothing, a silent false-negative — it now fails closed on a non-digest entry, naming the line (reported by @Taylor15200, #212). cbh triage7-Question Gate — three false-verdict paths (built in-house, reporters credited): Q1 matched a bare method word anywhere in the text, so prose liketarget application(containsget) orinput validationpassed Q1 with no request — Q1 now requires a method followed by a path or URL (orcurl/HTTP/1.1) (reported by @dajiaohuang, #209); Q7's never-submit list caughtclick-jackingbut notclickjacking(reported by @Ethereal49, #197); Q3 answered YES on scope wording even when the finding itself said out of scope / unverified — a scope/asset line carrying a negation no longer counts as in-scope evidence (reported by @Ethereal49, #197).cbh reportdropped frontmatter behind a UTF-8 BOM — a BOM written by some Windows editors sat before the---fence, so severity/asset fell back to defaults.parse_finding_metadatanow strips a leading BOM at the shared chokepoint. Reported by @jazzpher (#200).cbh/setup_harness_mcp.pycrashed on non-UTF-8 Windows consoles — the gate glyphs (✓/✗/→/—) raisedUnicodeEncodeErrorunder cp1252. Both entrypoints now reconfigure stdout/stderr to UTF-8, matchingengine/engine.py. Reported by @Sahilkumar-r (#180).h1_reference.py --programreturned nothing —CompleteHacktivityReportIndexno longer acceptsterms: {team_id: ...}; switched toquery_string: "team_handle:<handle>", which filters correctly and composes with--top-voted/--top-bounty. Lookup progress moved to stderr so--jsonstdout stays pipeable. Two independent reports converged here: @roonnnnyyyyyy (#206) and @flipcyde101 (#202).- Scope gate hardening (
engine/scope.py,engine/recon.py) — three independently reported fail-open paths in the deterministic scope gate. (1) Out-of-scope rules written with a scheme/port/path/trailing punctuation, a wildcard, or an IPv6 CIDR matched nothing and silently failed open; every rule source is now normalized to a host in one place, IPv6 CIDRs are recognized, and a badout-of-scoperegex warns and degrades to a literal host rule instead of silently matching nothing (reported by @fairoz-539, #182). (2) A recon-seeded note heading (… VERIFY in-scope before testing) matched thein-scopesubstring and promoted passive recon hosts to scope rules; a section now opens only on a start/end scope label, and recon hosts are surfaced as a hint (reported by @udarshmarthala, #198). (3) Recon HTTP fetches followed redirects to any host and the auth sweep graded a302 → /loginas broken auth; redirects are now followed one hop at a time only while in scope, and the auth sweep no longer follows them (reported by @fairoz-539, #181). All rule-source changes are visible through a newScope.warningschannel. - Scope (performance):
re:rules are compiled once.engine/scope.pycalledre.searchper rule per check, andrecaches only ~512 patterns, so a scope with more regex rules than that recompiled every rule on every check (~150 ms per check at 5,000 rules, vs ~3 ms now). (engine/scope.py,engine/test_scope_regex_cache.py) hunt-clickjacking,hunt-html-injection: quoted thedescription— an unquoted:(Targets:,surfaces:) broke strict YAML / Codex. Also genericized lab/harness-specific language in the new skills for cross-harness portability.hunt-ntlm-info: quoted thedescription— it contained an unquoted`WWW-Authenticate: NTLM`(:makes strict YAML parsers read a nested mapping). Claude/OpenCode/Hermes tolerated it; Codex rejected it. Surfaced by real multi-harness testing.
Changed
- Four engagement-derived false-positive guards — hardening in
hunt-dispatch,triage-validation,hunt-source-leak, andhunt-ssrf, each closing a specific way the toolkit produced or nearly produced a wrong finding on a real authorized test.hunt-dispatchgains a mandatorystep 0404 baseline for all modes — record status + byte length + body hash per host from two bogus paths, and treat no path as "found" until its response differs from that control; SPA/CDN estates return HTTP 200 with the app shell for everything, sosecurity.txt, revalidate routes and framework dev endpoints all appear to exist when they don't. Previouslystep 1was red-team only, leaving WAPT runs with no fingerprinting phase at all.hunt-dispatchalso gainssubagent scope inheritance: scope is not inherited implicitly, so delegated prompts must carry the authorized host list verbatim as data, treat mid-run discoveries as report-only, apply an action-verb deny-list before any read-shaped allow-list (a path ending/statuscan still be a refund route), and spell "read-only" out as forbidden verbs — as an adjective it does not stop an agent POSTing{}to agenerate*endpoint and creating a real record.triage-validationgains THE LAYER-ORDERING TRAP after Q7: a validation error does not prove auth was passed, because a sanitiser or body parser ahead of the auth middleware yields an identical response shape — re-test with a minimal well-formed body, and read input-shape errors as a parser vs domain-field errors as business logic.hunt-source-leakPhase 2 now requires resolving the current build hash before testing and before re-verifying; content-hashed bundles rotate on deploy, so a 404 at a recorded.mapURL is a new build, not remediation.hunt-ssrfgains per-parameter callback attribution (Burp keys interactions by payload ID, not subdomain, so sub-tagging one payload is not distinguishable — use a fresh payload per candidate parameter, and record the negative controls) plus a blind vs full-read check, since a returned upstream body is what moves a finding off the never-submit list. The 7-Question Gate and never-submit list are deliberately unchanged — both worked, and rejecting DNS-only SSRF is what forced the check that established full-read. - Dispatch dedup (description-scoping only — bodies unchanged) —
hunt-jwt-cryptoset as the JWT-crypto owner (hunt-ato/hunt-auth-bypass/hunt-api-misconfigdefer to it);bb-local-toolkitdifferentiated frombug-bounty(had a byte-identical description); scopedhunt-sqli↔hunt-nosqli,hunt-auth-bypass↔hunt-saml,hunt-cache-poison↔hunt-host-header,report-writing/security-arsenal↔triage-validation, andhunt-spa-api↔hunt-source-leak/hunt-shadow-api. - Metrics synced to 82 skills across README, banner, catalog (regenerated), INSTALL, USAGE, and docs (architecture/credits/index/multi-harness + capability-map/architecture-overview diagrams).
install.sh --agentsauto-truncates descriptions > 1024 chars to ≤1024 in the~/.agents/skills(Codex) copy only — Codex hard-rejects longer ones;~/.claude/~/.hermeskeep full descriptions. Affects the 3 aggregator router skills.scripts/lint_skills.pyhardened: adds a YAML-safety check (catches unquoted-value-with-:, thehunt-ntlm-infobug class) and notes Codex's 1024 limit in the over-length message.
2.1 - 2026-06-05
Added
- 20 new
hunt-*skills (community v3 expansion, #7 — thanks @muhsiindeniiz):hunt-lfi,hunt-nosqli,hunt-deserialization,hunt-cors,hunt-host-header,hunt-open-redirect,hunt-brute-force,hunt-session,hunt-ldap,hunt-nextjs,hunt-nodejs,hunt-dom,hunt-websocket,hunt-grpc,hunt-laravel,hunt-springboot,hunt-k8s,hunt-cicd,hunt-source-leak,hunt-tls-network. 51 → 71 skills, 28 → 48 hunt modules. - CI skill-linter (
scripts/lint_skills.py+.github/workflows/skill-lint.yml) — validates everySKILL.md(frontmatter,name, description/body length perCONTRIBUTING.md) and scans for leaked secrets + client/engagement identifiers via a SHA-256 denylist (plaintext names never enter the repo). - Community infrastructure — issue templates (bug / new-skill proposal / false-positive),
PR template,
CODEOWNERS,FUNDING.yml,CHANGELOG.md. - Docs site — GitHub Pages site under
docs/(just-the-docs + search), an auto-generated searchable skill catalog (scripts/gen_skill_catalog.py), and a README Quickstart. - Sponsor — Atlas Cloud (theme-adaptive logo in README +
FUNDING.yml). hunt-auth-bypass: new Function-Level Access Control (Broken Authorization) section.hunt-subdomain: Azure App Service takeover fingerprint.
Fixed (security — closes #13)
- Path traversal in
cbh reconand arbitrary file write viacbh report --out— both now enforce real path containment (ancestry check, not a bypassable prefix match). - Shell injection in the
hunt.shengagement scaffold (an unquoted heredoc expanded$target) — neutralized via quoted heredocs +printf. - Q5 gate logic — a finding labeled "duplicate" no longer wrongly passes the novelty gate.
- TLS — loud warning when
--proxydisables certificate verification.
Changed
- Skill descriptions scoped so dedicated skills own dispatch (
hunt-cors,hunt-k8s,hunt-cicd) — descriptions only, bodies untouched (#12). - Metrics synced across README, banner, and catalog to 71 skills / 48 hunt modules. The
disclosed-report count is held at the curated 681 (not inflated by the new skills'
uncited
report_countvalues). .gitignoreexcludes the maintainer-only plaintext denylist override (scripts/.identifier-denylist.local).
2.0 - 2026-05-25
Added
- Report-curation pass: 574 → 681 disclosed-report patterns across 24 vulnerability classes.
- 5 previously-missing attack surfaces covered; 0 zero-report skills remaining.
- 29 A-to-B chain examples and
ENGAGEMENTS.mdscaffolding. - Enterprise platform attack matrices (M365/Entra, Okta, SharePoint, vCenter, SSL-VPN, APK, supply-chain).
Changed
- Top-3 trigger-match concentration rebalanced (81.2% → 68.4%) for better skill routing.
[1.x]
- Initial public release: 51 skills + 15 slash commands, vendored foundation from
shuvonsec/claude-bug-bounty, Burp MCP integration, recon pipeline.