Bug Hunter Replay is a local-first Playwright CLI that performs bounded web page exploration, captures browser/runtime/network signals, and writes shareable bug evidence reports.
- Runs from the command line against a URL you own or are authorized to test.
- Performs queue-based bounded BFS exploration with
maxDepth,maxActions, and same-origin guardrails. - Captures console errors, page errors, failed requests, HTTP errors, slow requests, and blank-page states.
- Executes safe discovered actions such as same-origin links, buttons, fills, and selects.
- Skips destructive-looking actions, unknown form submits, password inputs, and file inputs by default.
- Saves screenshots for the initial page and action steps.
- Optionally records a Playwright trace at
traces/trace.zip; use--no-traceto disable it. - Generates local
report.json,report.md,report.html, and issue-awarerepro.spec.tsartifacts. - Includes a built-in demo site for deterministic local showcase runs.
- Node.js 20+
- TypeScript
- pnpm / Corepack
- Commander
- Playwright
- Vitest
- ESLint
corepack pnpm install
corepack pnpm exec playwright install chromium --only-shell
corepack pnpm buildRun the built-in demo site in one terminal:
corepack pnpm demo-site -- --port 4173Generate a v0.1.0 demo report from another terminal:
corepack pnpm dev -- run http://127.0.0.1:4173/ --max-depth 2 --max-actions 16 --slow-threshold 100Disable Playwright trace collection when you only need lightweight reports:
corepack pnpm dev -- run http://127.0.0.1:4173/ --max-depth 2 --max-actions 16 --slow-threshold 100 --no-traceThe CLI prints the generated report.json path under reports/<run-id>/.
The demo site is a lightweight local Node.js HTTP server with stable routes for showcasing the capture pipeline:
/- homepage with same-origin links and safe triggers./console-error- button-triggeredconsole.error./page-error- button-triggered runtime exception./network-error- failed request trigger./server-error- HTTP 500 response./slow-api- delayed API response./blank- button-triggered blank page./form- safe form controls for fill/select coverage.
Start it with:
corepack pnpm demo-site -- --port 4173Each run creates a directory under reports/:
reports/<run-id>/
report.json
report.md
report.html
repro.spec.ts
screenshots/
initial.png
step-001-before.png
step-001-after.png
traces/
trace.zip
traces/trace.zip is only written when trace collection is enabled. It is enabled by default and disabled with --no-trace.
Artifact roles:
report.json- structured run data for tools or deeper inspection.report.md- readable Markdown summary.report.html- offline single-file HTML report with inline CSS and relative screenshots.repro.spec.ts- Playwright spec that replays the relevant action path and asserts the captured issue signal.screenshots/- initial and step screenshots captured during the run.traces/trace.zip- Playwright trace for timeline-level debugging.
Use Bug Hunter Replay only on websites you own or have explicit permission to test.
This project is not a security scanner, vulnerability exploitation tool, attack framework, dashboard, cloud platform, or AI debugging product. It is a local debugging/demo utility for bounded browser exploration, runtime capture, network capture, screenshots, traces, and local report generation.
Default safety behavior:
- Same-origin exploration is enabled by default.
- Dangerous English and Chinese keywords are skipped.
- Destructive-looking
href, form action, button text,aria-label,name, andidvalues are treated as risk signals. input[type=submit],button[type=submit], default submit buttons inside forms, password inputs, and file inputs are skipped by default.- Unknown form submission is not performed.
flowchart TD
CLI[CLI: bug-hunter run] --> Config[Run config]
Config --> Browser[Playwright browser context]
Browser --> Trace[Optional trace.zip]
Browser --> Explorer[Queue-based bounded BFS explorer]
Explorer --> Discovery[Action discovery]
Discovery --> Safety[Safety filter]
Safety --> Executor[Safe action execution]
Browser --> Recorder[Console, page, and network capture]
Executor --> Screenshots[Screenshot artifacts]
Executor --> Blank[Blank-page checks]
Recorder --> Analyzer[Issue analyzer]
Blank --> Analyzer
Analyzer --> Reports[JSON, Markdown, HTML, repro.spec.ts]
Screenshots --> Reports
Trace --> Reports
Demo[Built-in demo site] --> CLI
corepack pnpm build
corepack pnpm test
corepack pnpm lint
corepack pnpm typecheck