# rohinthan/bountyscope architecture

> Architecture diagram of the GitHub repository rohinthan/bountyscope, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-24). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/rohinthan/bountyscope
- Repository: https://github.com/rohinthan/bountyscope

## Overview

BountyScope is an authorized-reconnaissance CLI for scope-locked surface mapping, passive security-policy auditing, reporting, and MCP-based triage. The documented workflow loads a scope configuration, validates targets, maps endpoints and verifies policy safely, stores results, then exposes reports and MCP queries. Certificate Transparency discovery and passive technology/secret analysis extend mapping and auditing. The source excerpts support the internal call relationships shown; broader workflow links are based on the README’s architecture description, and unsampled CLI wiring is not inferred.

Main entry points: [`src/mapper/mod.rs`](https://github.com/rohinthan/bountyscope/blob/main/src/mapper/mod.rs) (Surface Mapper), [`src/scope/mod.rs`](https://github.com/rohinthan/bountyscope/blob/main/src/scope/mod.rs) (Scope Enforcer), [`src/verifier/mod.rs`](https://github.com/rohinthan/bountyscope/blob/main/src/verifier/mod.rs) (Policy Verifier), [`src/mcp/mod.rs`](https://github.com/rohinthan/bountyscope/blob/main/src/mcp/mod.rs) (MCP Server)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["CLI and Scope"]
  node_cli["CLI Commands<br/>[main.rs]"]
  node_scopeconfig["Scope Config<br/>[scope.example.yaml]"]
  node_enforcer["Scope Enforcer<br/>[mod.rs]"]
end

subgraph group_discovery["Surface Discovery"]
  node_mapper["Surface Mapper<br/>[mod.rs]"]
  node_ct["CT Discovery<br/>[mod.rs]"]
  node_http["Scoped HTTP<br/>[mod.rs]"]
  node_fingerprint["Tech Fingerprinting<br/>[mod.rs]"]
  node_secrets["Secret Scanning<br/>[mod.rs]"]
end

subgraph group_audit["Policy Audit"]
  node_verifier["Policy Verifier<br/>[mod.rs]"]
end

subgraph group_results["Results and Triage"]
  node_storage[("SQLite Storage<br/>[mod.rs]")]
  node_report["Report Generator<br/>[mod.rs]"]
  node_mcp["MCP Server<br/>[mod.rs]"]
end

node_operator(("Operator"))
node_mcpclient(("MCP Client"))

node_operator -->|"runs commands"| node_cli
node_cli -->|"loads config"| node_scopeconfig
node_scopeconfig -->|"configures"| node_enforcer
node_enforcer -->|"validates targets"| node_mapper
node_enforcer -->|"validates targets"| node_verifier
node_mapper -->|"dispatches probes"| node_http
node_mapper -->|"uses discovery"| node_ct
node_mapper -->|"analyzes responses"| node_fingerprint
node_mapper -->|"scans content"| node_secrets
node_mapper -->|"stores endpoints"| node_storage
node_verifier -->|"dispatches probes"| node_http
node_verifier -->|"uses scanner"| node_secrets
node_verifier -->|"stores findings"| node_storage
node_http -->|"requires verified URLs"| node_enforcer
node_report -->|"reads results"| node_storage
node_mcp -->|"queries results"| node_storage
node_mcp -->|"renders reports"| node_report
node_enforcer -->|"validates boundaries"| node_mcp
node_mcpclient -.->|"sends requests"| node_mcp

click node_cli "https://github.com/rohinthan/bountyscope/blob/main/src/main.rs"
click node_scopeconfig "https://github.com/rohinthan/bountyscope/blob/main/configs/scope.example.yaml"
click node_enforcer "https://github.com/rohinthan/bountyscope/blob/main/src/scope/mod.rs"
click node_mapper "https://github.com/rohinthan/bountyscope/blob/main/src/mapper/mod.rs"
click node_ct "https://github.com/rohinthan/bountyscope/blob/main/src/ct/mod.rs"
click node_http "https://github.com/rohinthan/bountyscope/blob/main/src/http/mod.rs"
click node_fingerprint "https://github.com/rohinthan/bountyscope/blob/main/src/fingerprint/mod.rs"
click node_secrets "https://github.com/rohinthan/bountyscope/blob/main/src/secrets/mod.rs"
click node_verifier "https://github.com/rohinthan/bountyscope/blob/main/src/verifier/mod.rs"
click node_storage "https://github.com/rohinthan/bountyscope/blob/main/src/storage/mod.rs"
click node_report "https://github.com/rohinthan/bountyscope/blob/main/src/report/mod.rs"
click node_mcp "https://github.com/rohinthan/bountyscope/blob/main/src/mcp/mod.rs"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_cli,node_scopeconfig,node_enforcer,node_mcpclient toneBlue
class node_mapper,node_ct,node_http,node_fingerprint,node_secrets toneAmber
class node_verifier toneMint
class node_storage,node_report,node_mcp toneRose
class node_operator toneIndigo
```

## Components

### CLI and Scope

- [CLI Commands](https://github.com/rohinthan/bountyscope/blob/main/src/main.rs): `src/main.rs`
- [Scope Config](https://github.com/rohinthan/bountyscope/blob/main/configs/scope.example.yaml): `configs/scope.example.yaml`
- [Scope Enforcer](https://github.com/rohinthan/bountyscope/blob/main/src/scope/mod.rs): `src/scope/mod.rs`

### Surface Discovery

- [Surface Mapper](https://github.com/rohinthan/bountyscope/blob/main/src/mapper/mod.rs): `src/mapper/mod.rs`
- [CT Discovery](https://github.com/rohinthan/bountyscope/blob/main/src/ct/mod.rs): `src/ct/mod.rs`
- [Scoped HTTP](https://github.com/rohinthan/bountyscope/blob/main/src/http/mod.rs): `src/http/mod.rs`
- [Tech Fingerprinting](https://github.com/rohinthan/bountyscope/blob/main/src/fingerprint/mod.rs): `src/fingerprint/mod.rs`
- [Secret Scanning](https://github.com/rohinthan/bountyscope/blob/main/src/secrets/mod.rs): `src/secrets/mod.rs`

### Policy Audit

- [Policy Verifier](https://github.com/rohinthan/bountyscope/blob/main/src/verifier/mod.rs): `src/verifier/mod.rs`

### Results and Triage

- [SQLite Storage](https://github.com/rohinthan/bountyscope/blob/main/src/storage/mod.rs): `src/storage/mod.rs`
- [Report Generator](https://github.com/rohinthan/bountyscope/blob/main/src/report/mod.rs): `src/report/mod.rs`
- [MCP Server](https://github.com/rohinthan/bountyscope/blob/main/src/mcp/mod.rs): `src/mcp/mod.rs`

### Other components

- **Operator**
- **MCP Client**

## Connections

- Operator → CLI Commands: runs commands (evidence: `README.md`)
- CLI Commands → Scope Config: loads config (evidence: `README.md`)
- Scope Config → Scope Enforcer: configures (evidence: `README.md`)
- Scope Enforcer → Surface Mapper: validates targets (evidence: `README.md`)
- Scope Enforcer → Policy Verifier: validates targets (evidence: `README.md`)
- Surface Mapper → Scoped HTTP: dispatches probes (evidence: `src/mapper/mod.rs`)
- Surface Mapper → CT Discovery: uses discovery (evidence: `src/mapper/mod.rs`)
- Surface Mapper → Tech Fingerprinting: analyzes responses (evidence: `src/mapper/mod.rs`)
- Surface Mapper → Secret Scanning: scans content (evidence: `src/mapper/mod.rs`)
- Surface Mapper → SQLite Storage: stores endpoints (evidence: `README.md`)
- Policy Verifier → Scoped HTTP: dispatches probes (evidence: `src/verifier/mod.rs`)
- Policy Verifier → Secret Scanning: uses scanner (evidence: `src/verifier/mod.rs`)
- Policy Verifier → SQLite Storage: stores findings (evidence: `README.md`)
- Scoped HTTP → Scope Enforcer: requires verified URLs (evidence: `README.md`)
- Report Generator → SQLite Storage: reads results (evidence: `src/report/mod.rs`)
- MCP Server → SQLite Storage: queries results (evidence: `src/mcp/mod.rs`)
- MCP Server → Report Generator: renders reports (evidence: `src/mcp/mod.rs`)
- Scope Enforcer → MCP Server: validates boundaries (evidence: `README.md`)
- MCP Client → MCP Server: sends requests
