Skip to content

feat(mcp): add get_report tool for live disclosed-report bodies - #187

Merged
elementalsouls merged 5 commits into
mainfrom
feat/h1-get-report
Nov 20, 2026
Merged

elementalsouls merged 5 commits into
mainfrom
feat/h1-get-report

Conversation

@elementalsouls

Copy link
Copy Markdown
Owner

What

Adds a public, keyless, read-only HackerOne MCP tool get_report(id|url) that fetches a disclosed report's full write-up body live, so the hunt path can read the real precedent for a vuln-class instead of only its distilled citation.

Why

The repo's moat is 433 disclosed-report citations, but skills carry only the distilled pattern + URL — never the actual write-up. get_report closes that gap: a hunter testing SSRF on a program can now read the precedent report's own reproduction steps and bypasses, then mirror them on the live target.

How

  • _report_json(rid) — REST GET of the public, keyless reports/<id>.json, mirroring _graphql's error handling (404 → clean "not found", other HTTP/URL errors → ToolError).
  • get_report(args) — accepts exactly one of id or url (trailing-digit parse), returns a fixed whitelist only — id, url, title, severity, substate, is_published, disclosed_at, body, body_len, plus bounty (gated on has_bounty?) and note when the body is thin/empty. Never returns the raw object's sensitive fields (reporter, team, voters, is_triager?, can_view_report, abilities, attachments).
  • Consumption — prose-only wiring in commands/hunt.md step-4: search_disclosed_reports(class, program) → get_report(url=<top result's url>) → read body → mirror technique; fall back to docs/disclosed-reports/ on a thin body.
  • Registered in PUBLIC_TOOLS (keyless); nothing stored or committed; $0/no-network default path untouched.

Boundary

Report bodies are reporters'/HackerOne's content — fetched live and used ephemerally, never written to any tracked file. No change to the 433-citation corpus, harvest_h1.py, or the engine.

Tests / gates

  • +6 get_report tests (full-body whitelist, sensitive-key exclusion, thin-body note, 404, bad-input→ToolError, url-variant parse) + updated gating assertions (public list → 4, total-with-creds → 7).
  • Full suite 58 OK, engine 34 OK; live smoke against a real disclosed id returns the body with zero sensitive keys.
  • doc-count-check green; no skills/** touched (skill-lint not triggered); leak-clean.

Review

Fresh whole-branch review (verdict: ship). Folded fixes: bad-arg validation uses the ToolError channel like every sibling tool (was InvalidParams); isascii()+isdigit() guard rejects unicode/other-script digits; added url-parse coverage.

Design + plan: docs/superpowers/specs/2026-11-19-h1-report-body-fetch-design.md, docs/superpowers/plans/2026-11-20-h1-report-body-fetch.md.

🤖 Generated with Claude Code

elementalsouls and others added 5 commits November 20, 2026 12:53
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
New keyless read-only get_report(id|url): GETs reports/<id>.json and returns a
whitelisted body + metadata subset, never the raw 51-key object. Thin/empty body
yields a fallback note. _report_json helper mirrors _graphql error handling.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…uard

Match the in-repo convention (every other tool raises ToolError for bad
arguments, surfaced as a recoverable isError result); reserve InvalidParams
for protocol-level errors. isascii() guard rejects unicode superscripts /
other-script digits that str.isdigit() accepts but int() mis-handles. Adds
url-variant parse tests; fixes stale spec prose to get_report(url=...).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The plan's leak-check step hardcoded the banned client identifiers in a
grep pattern, which the hash-based leak-guard (scan_identifiers) matched as
real identifiers. Point the step at the guard script itself instead.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@elementalsouls
elementalsouls merged commit 5b7e76e into main Nov 20, 2026
4 checks passed
@elementalsouls
elementalsouls deleted the feat/h1-get-report branch November 20, 2026 07:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant