How vmihalis/hacker-bob works
Purpose and entry points
Hacker Bob is a Node.js 20+ autonomous security-testing system for authorized web/API, smart-contract, repository, and PR-diff targets. It installs a local Model Context Protocol (MCP) server into a workspace and is driven through host adapters or its CLI.
• CLI/install/doctor/dashboard entry point: bin/hacker-bob.js
• MCP runtime and tool registration: mcp/server.js, mcp/tools/index.js
• Host integration adapters: adapters/index.js, adapters/claude/index.js, adapters/codex/index.js
Session authority and lifecycle
Each evaluation is anchored in a session-owned root, with a cryptographically verified session nucleus as the authoritative identity, scope, and lifecycle record. Read projections, events, and ledgers support observability but are not alternate grants of authority.
• Session lifecycle, authority, and state contracts: mcp/core/session/session-authority.js, mcp/core/session/session-state.js, mcp/core/session/lifecycle-gates.js
• Atomic/session-root I/O boundary: mcp/core/io/storage.js, mcp/core/io/engine-lock.js
• The core lifecycle progresses from setup and frontier work through claim freeze, verification, grading, and reporting, with controlled reopening.
Discovery, frontier, and planning
Target observations become surface leads and an attack-surface graph; these are ranked, promoted, and routed into planned work rather than directly treated as findings. Imported artifacts and public intelligence are bounded inputs to this layer.
• Surface graph and lead pipeline: mcp/core/frontier/surface-graph-builder.js, mcp/core/frontier/lead-intake.js, mcp/core/frontier/lead-promotion.js
• Recon routing and reachability: mcp/core/frontier/surface-router.js, mcp/core/frontier/reachability.js
• Dependency-aware wave/task planning: mcp/core/waves/wave-planner.js, mcp/core/waves/graph-scheduler.js, mcp/core/waves/task-graph-state-machine.js
Evaluation and domain execution
The dispatcher selects technique packs and constrained tools for scheduled work. Domain modules implement target-specific execution while emitting evidence and attempt records back into the core pipeline.
• Dispatch policy, packs, and tool registry: mcp/core/dispatch/dispatch.js, mcp/core/dispatch/technique-packs.js, mcp/core/dispatch/tool-registry.js
• Web/browser and HTTP offensive execution: mcp/domains/web/offensive-runner.js, mcp/domains/web/browser-sessions.js, mcp/domains/web/offensive-sandbox.js
• Repository review and isolated reproduction: mcp/domains/repo/repo-target.js, mcp/domains/repo/repo-env.js, mcp/tools/repo/repo-docker-run.js
• Smart-contract RPC and runner boundary: mcp/domains/blockchain/smart-contracts/chain-rpc-pool.js, mcp/domains/blockchain/smart-contracts/sc-container-exec.js
Evidence, claims, verification, and reports
Evaluator outputs are recorded as candidate claims and chain attempts. Independent verification, replay/differential checks, proof bundles, grading, and finalization gate whether a submission-ready finding can be reported.
• Claims and chains: mcp/core/claims/claims.js, mcp/core/chain-state-tree.js
• Evidence and verification rounds: mcp/core/evidence.js, mcp/core/verification/verification.js, mcp/core/repro-replay-verifier.js
• Finding contracts, scores, and reports: mcp/core/finding-contracts.js, mcp/core/scoring/cvss31.js, mcp/core/report-finalize.js
Safety and control boundaries
Scope/session checks, egress profiles, safe HTTP transport, approval hooks, and redaction constrain MCP-owned operations. These controls do not claim to sandbox arbitrary host commands or unrelated browser activity.
• Scope, egress, and network controls: mcp/core/scope.js, mcp/core/egress-profiles.js, mcp/core/io/safe-fetch.js
• Sensitive-data/report fences: mcp/core/redaction/report-credential-fence.js, mcp/redaction.js
• Installed-host guards: .claude/hooks/session-read-guard.sh, .claude/hooks/bob-http-write-confirm.sh
Optional physical and cloud integrations
Physical testing is a separate provider/instrument plane with leases, resource arbitration, brokered dispatch, artifact custody, and Darwin-native trust boundaries. AWS infrastructure can publish validated artifacts and export findings.
• Physical orchestration: mcp/domains/physical/physical-session-runtime.js, mcp/domains/physical/physical-resource-arbiter.js
• Instrument broker and artifact vault: packages/bob-instrument-broker/lib/broker.js, packages/bob-artifact-vault/lib/vault.js
• AWS engagement workflow: infra/aws/hacker-bob-stack/template.yaml, infra/aws/hacker-bob-stack/statemachine/hacker-bob-engagement.asl.json
Main entry points: dispatch.js Technique dispatcher · server.js MCP server and tools · claims.js Claims and chain state · session-authority.js Session authority
Components 19
Host entry
- CLI and installer · Installs and operates the local MCP workspace.
bin/hacker-bob.js - Host adapters
adapters/index.js - MCP server and tools · Registers the security-testing tool surface.
mcp/server.js
Core evaluation
- Session authority · Cryptographically verified session nucleus is the sole authority grant.
mcp/core/session/session-authority.js - Session-root storage
mcp/core/io/storage.js - Lifecycle gates · Controls progression, freeze, verification, finalization, and reopening.
mcp/core/session/lifecycle-gates.js - Scope and egress controls · Constrains MCP-owned operations, network access, approvals, and redaction.
mcp/core/scope.js - Surface lead pipeline · Builds the attack-surface graph and promotes ranked leads.
mcp/core/frontier/surface-graph-builder.js - Wave and task planner
mcp/core/waves/wave-planner.js - Technique dispatcher · Selects technique packs and constrained tools for scheduled work.
mcp/core/dispatch/dispatch.js - Claims and chain state · Records candidate claims and attack-chain attempts.
mcp/core/claims/claims.js - Evidence verification · Runs verification rounds plus replay and differential checks.
mcp/core/verification/verification.js - Grading and reports · Scores verified findings and creates submission-ready reports.
mcp/core/report-finalize.js
Execution domains
- Web execution · Browser and HTTP offensive execution in a constrained sandbox.
mcp/domains/web/offensive-runner.js - Repository execution · Reviews targets and runs isolated reproductions.
mcp/domains/repo/repo-target.js - Smart-contract execution · Uses RPC pooling and a containerized execution boundary.
mcp/domains/blockchain/smart-contracts/chain-rpc-pool.js
Optional integrations
- Physical testing plane · Separately manages leases, resource arbitration, and instrument work.
mcp/domains/physical/physical-session-runtime.js - Instrument broker
packages/bob-instrument-broker/lib/broker.js - AWS engagement workflow · Publishes validated artifacts and exports findings.
infra/aws/hacker-bob-stack/statemachine/hacker-bob-engagement.asl.json
Connections 23
- CLI and installer → MCP server and tools: starts
- Host adapters → MCP server and tools: host access
- MCP server and tools → Session authority: opens evaluation
- Session authority → Session-root storage: owns session root
- Session authority → Lifecycle gates: authorizes transitions
- MCP server and tools → Scope and egress controls: enforces controls
- Lifecycle gates → Surface lead pipeline: permits discovery
- Surface lead pipeline → Wave and task planner: ranked leads
- Wave and task planner → Technique dispatcher: scheduled work
- Scope and egress controls → Technique dispatcher: scope and egress constraints
- Technique dispatcher → Web execution: web tasks
- Technique dispatcher → Repository execution: repository tasks
- Technique dispatcher → Smart-contract execution: contract tasks
- Web execution → Claims and chain state: evidence and attempts
- Repository execution → Claims and chain state: evidence and attempts
- Smart-contract execution → Claims and chain state: evidence and attempts
- Claims and chain state → Evidence verification: candidate claims
- Evidence verification → Grading and reports: validated proof bundles
- Lifecycle gates → Grading and reports: finalization gate
- Technique dispatcher → Physical testing plane: physical work
- Physical testing plane → Instrument broker: brokered instruments
- Evidence verification → AWS engagement workflow: validated artifacts
- Grading and reports → AWS engagement workflow: export findings