# excanear/techrecon architecture

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

- Interactive diagram: https://gitdiagram.com/excanear/techrecon
- Repository: https://github.com/excanear/techrecon

## Overview

TechRecon is a Chrome extension for passive web-technology reconnaissance and authorized, scoped site scans. In the tab-analysis path, the popup requests page evidence through the service worker, which runs collection and fingerprinting before vulnerability correlation and enrichment; results are presented and can be exported. Site scans add authorization and permissions, crawling, inventory aggregation, CVE correlation, and passive configuration checks, with results stored for the full-tab dashboard. The README documents these stages and integrations; unsampled implementation details are represented only where the source index or README supports the relationship.

Main entry points: [`src/background/index.ts`](https://github.com/excanear/techrecon/blob/master/src/background/index.ts) (Service worker), [`src/scan/runner.ts`](https://github.com/excanear/techrecon/blob/master/src/scan/runner.ts) (Scan runner), [`src/popup/App.tsx`](https://github.com/excanear/techrecon/blob/master/src/popup/App.tsx) (Popup), [`src/popup/useScan.ts`](https://github.com/excanear/techrecon/blob/master/src/popup/useScan.ts) (Scan controls)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interface["User interface"]
  node_popup["Popup<br/>[App.tsx]"]
  node_dashboard["Scan dashboard<br/>[Dashboard.tsx]"]
  node_scanui["Scan controls<br/>[useScan.ts]"]
end

subgraph group_analysis["Page analysis"]
  node_serviceworker["Service worker<br/>[index.ts]"]
  node_collector["Page collector<br/>[collector.ts]"]
  node_fingerprint["Fingerprint engine<br/>[engine.ts]"]
  node_signatures["Signature rules<br/>[signature.ts]"]
  node_recon["Page reconnaissance<br/>[index.ts]"]
  node_dataset["Wappalyzer dataset<br/>[datasetChannel.ts]"]
end

subgraph group_scanning["Authorized scanning"]
  node_scope["Scope and authorization<br/>[scope.ts]"]
  node_permissions["Host permissions<br/>[permissions.ts]"]
  node_scanchannel["Scan messaging<br/>[scanChannel.ts]"]
  node_runner["Scan runner<br/>[runner.ts]"]
  node_crawler["Site crawler<br/>[crawler.ts]"]
  node_fetcher["Page fetch and parse<br/>[offscreen.ts]"]
  node_aggregate["Inventory aggregation<br/>[aggregate.ts]"]
  node_misconfig["Configuration checks<br/>[checks.ts]"]
end

subgraph group_intel["Vulnerability intelligence"]
  node_correlate["CVE correlation<br/>[correlate.ts]"]
  node_enrich["Exploit prioritization<br/>[enrich.ts]"]
  node_vulnservices{{"Vulnerability sources"}}
end

subgraph group_persistence["Results and storage"]
  node_storage[("Extension storage<br/>[index.ts]")]
  node_db[("Scan database<br/>[index.ts]")]
  node_export["Report export<br/>[index.ts]"]
end

node_analyst(("Analyst"))

node_analyst -->|"uses"| node_popup
node_popup -->|"requests analysis"| node_serviceworker
node_serviceworker -->|"executes collection"| node_collector
node_serviceworker -->|"runs detection"| node_fingerprint
node_fingerprint -->|"matches rules"| node_signatures
node_serviceworker -->|"analyzes page"| node_recon
node_serviceworker -->|"correlates CVEs"| node_correlate
node_correlate -->|"enriches findings"| node_enrich
node_enrich -->|"queries KEV and EPSS"| node_vulnservices
node_correlate -->|"queries CVE sources"| node_vulnservices
node_popup -->|"loads and saves"| node_storage
node_popup -->|"exports reports"| node_export
node_analyst -->|"starts authorized scan"| node_scanui
node_scanui -->|"declares scope"| node_scope
node_scanui -->|"requests access"| node_permissions
node_scanui -->|"sends scan requests"| node_scanchannel
node_scanchannel -->|"dispatches scan"| node_runner
node_runner -->|"runs crawl"| node_crawler
node_crawler -.->|"fetches pages"| node_fetcher
node_crawler -->|"fingerprints pages"| node_fingerprint
node_runner -->|"aggregates inventory"| node_aggregate
node_runner -->|"correlates inventory"| node_correlate
node_runner -->|"checks configuration"| node_misconfig
node_scanchannel -->|"persists scan data"| node_db
node_dashboard -.->|"loads scan results"| node_db
node_dashboard -->|"exports scan report"| node_export
node_analyst -->|"opens report"| node_dashboard
node_scanchannel -->|"requests enrichment"| node_enrich
node_analyst -->|"opts into dataset"| node_dataset

click node_popup "https://github.com/excanear/techrecon/blob/master/src/popup/App.tsx"
click node_dashboard "https://github.com/excanear/techrecon/blob/master/src/dashboard/Dashboard.tsx"
click node_serviceworker "https://github.com/excanear/techrecon/blob/master/src/background/index.ts"
click node_collector "https://github.com/excanear/techrecon/blob/master/src/content/collector.ts"
click node_fingerprint "https://github.com/excanear/techrecon/blob/master/src/fingerprinting/engine.ts"
click node_signatures "https://github.com/excanear/techrecon/blob/master/src/fingerprinting/signature.ts"
click node_recon "https://github.com/excanear/techrecon/blob/master/src/recon/index.ts"
click node_scope "https://github.com/excanear/techrecon/blob/master/src/scope/scope.ts"
click node_permissions "https://github.com/excanear/techrecon/blob/master/src/scope/permissions.ts"
click node_scanui "https://github.com/excanear/techrecon/blob/master/src/popup/useScan.ts"
click node_scanchannel "https://github.com/excanear/techrecon/blob/master/src/background/scanChannel.ts"
click node_runner "https://github.com/excanear/techrecon/blob/master/src/scan/runner.ts"
click node_crawler "https://github.com/excanear/techrecon/blob/master/src/crawler/crawler.ts"
click node_fetcher "https://github.com/excanear/techrecon/blob/master/src/offscreen/offscreen.ts"
click node_aggregate "https://github.com/excanear/techrecon/blob/master/src/crawler/aggregate.ts"
click node_misconfig "https://github.com/excanear/techrecon/blob/master/src/misconfig/checks.ts"
click node_correlate "https://github.com/excanear/techrecon/blob/master/src/cve/correlate.ts"
click node_enrich "https://github.com/excanear/techrecon/blob/master/src/cve/enrich.ts"
click node_dataset "https://github.com/excanear/techrecon/blob/master/src/background/datasetChannel.ts"
click node_storage "https://github.com/excanear/techrecon/blob/master/src/storage/index.ts"
click node_db "https://github.com/excanear/techrecon/blob/master/src/db/index.ts"
click node_export "https://github.com/excanear/techrecon/blob/master/src/export/index.ts"

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_popup,node_dashboard,node_scanui toneBlue
class node_serviceworker,node_collector,node_fingerprint,node_signatures,node_recon,node_dataset toneAmber
class node_scope,node_permissions,node_scanchannel,node_runner,node_crawler,node_fetcher,node_aggregate,node_misconfig toneMint
class node_correlate,node_enrich,node_vulnservices toneRose
class node_storage,node_db,node_export,node_analyst toneIndigo
```

## Components

### User interface

- [Popup](https://github.com/excanear/techrecon/blob/master/src/popup/App.tsx): `src/popup/App.tsx`
- [Scan dashboard](https://github.com/excanear/techrecon/blob/master/src/dashboard/Dashboard.tsx): `src/dashboard/Dashboard.tsx`
- [Scan controls](https://github.com/excanear/techrecon/blob/master/src/popup/useScan.ts): `src/popup/useScan.ts`

### Page analysis

- [Service worker](https://github.com/excanear/techrecon/blob/master/src/background/index.ts): `src/background/index.ts`
- [Page collector](https://github.com/excanear/techrecon/blob/master/src/content/collector.ts): `src/content/collector.ts`
- [Fingerprint engine](https://github.com/excanear/techrecon/blob/master/src/fingerprinting/engine.ts): `src/fingerprinting/engine.ts`
- [Signature rules](https://github.com/excanear/techrecon/blob/master/src/fingerprinting/signature.ts): `src/fingerprinting/signature.ts`
- [Page reconnaissance](https://github.com/excanear/techrecon/blob/master/src/recon/index.ts): `src/recon/index.ts`
- [Wappalyzer dataset](https://github.com/excanear/techrecon/blob/master/src/background/datasetChannel.ts): `src/background/datasetChannel.ts`

### Authorized scanning

- [Scope and authorization](https://github.com/excanear/techrecon/blob/master/src/scope/scope.ts): `src/scope/scope.ts`
- [Host permissions](https://github.com/excanear/techrecon/blob/master/src/scope/permissions.ts): `src/scope/permissions.ts`
- [Scan messaging](https://github.com/excanear/techrecon/blob/master/src/background/scanChannel.ts): `src/background/scanChannel.ts`
- [Scan runner](https://github.com/excanear/techrecon/blob/master/src/scan/runner.ts): `src/scan/runner.ts`
- [Site crawler](https://github.com/excanear/techrecon/blob/master/src/crawler/crawler.ts): `src/crawler/crawler.ts`
- [Page fetch and parse](https://github.com/excanear/techrecon/blob/master/src/offscreen/offscreen.ts): `src/offscreen/offscreen.ts`
- [Inventory aggregation](https://github.com/excanear/techrecon/blob/master/src/crawler/aggregate.ts): `src/crawler/aggregate.ts`
- [Configuration checks](https://github.com/excanear/techrecon/blob/master/src/misconfig/checks.ts): `src/misconfig/checks.ts`

### Vulnerability intelligence

- [CVE correlation](https://github.com/excanear/techrecon/blob/master/src/cve/correlate.ts): `src/cve/correlate.ts`
- [Exploit prioritization](https://github.com/excanear/techrecon/blob/master/src/cve/enrich.ts): `src/cve/enrich.ts`
- **Vulnerability sources**

### Results and storage

- [Extension storage](https://github.com/excanear/techrecon/blob/master/src/storage/index.ts): `src/storage/index.ts`
- [Scan database](https://github.com/excanear/techrecon/blob/master/src/db/index.ts): `src/db/index.ts`
- [Report export](https://github.com/excanear/techrecon/blob/master/src/export/index.ts): `src/export/index.ts`

### Other components

- **Analyst**

## Connections

- Analyst → Popup: uses
- Popup → Service worker: requests analysis
- Service worker → Page collector: executes collection (evidence: `src/background/index.ts`)
- Service worker → Fingerprint engine: runs detection (evidence: `src/background/index.ts`)
- Fingerprint engine → Signature rules: matches rules (evidence: `src/fingerprinting/engine.ts`)
- Service worker → Page reconnaissance: analyzes page (evidence: `src/background/index.ts`)
- Service worker → CVE correlation: correlates CVEs (evidence: `src/background/index.ts`)
- CVE correlation → Exploit prioritization: enriches findings (evidence: `src/cve/correlate.ts`)
- Exploit prioritization → Vulnerability sources: queries KEV and EPSS (evidence: `src/cve/enrich.ts`)
- CVE correlation → Vulnerability sources: queries CVE sources (evidence: `src/cve/correlate.ts`)
- Popup → Extension storage: loads and saves (evidence: `src/popup/App.tsx`)
- Popup → Report export: exports reports (evidence: `src/popup/App.tsx`)
- Analyst → Scan controls: starts authorized scan
- Scan controls → Scope and authorization: declares scope (evidence: `src/popup/useScan.ts`)
- Scan controls → Host permissions: requests access (evidence: `src/popup/useScan.ts`)
- Scan controls → Scan messaging: sends scan requests (evidence: `src/popup/useScan.ts`)
- Scan messaging → Scan runner: dispatches scan (evidence: `src/background/scanChannel.ts`)
- Scan runner → Site crawler: runs crawl
- Site crawler → Page fetch and parse: fetches pages
- Site crawler → Fingerprint engine: fingerprints pages (evidence: `src/crawler/crawler.ts`)
- Scan runner → Inventory aggregation: aggregates inventory
- Scan runner → CVE correlation: correlates inventory
- Scan runner → Configuration checks: checks configuration
- Scan messaging → Scan database: persists scan data (evidence: `src/background/scanChannel.ts`)
- Scan dashboard → Scan database: loads scan results
- Scan dashboard → Report export: exports scan report (evidence: `src/dashboard/Dashboard.tsx`)
- Analyst → Scan dashboard: opens report
- Scan messaging → Exploit prioritization: requests enrichment (evidence: `src/background/scanChannel.ts`)
- Analyst → Wappalyzer dataset: opts into dataset
