# arraj14/cyberrecon architecture

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

- Interactive diagram: https://gitdiagram.com/arraj14/cyberrecon
- Repository: https://github.com/arraj14/cyberrecon

## Overview

CyberRecon is a Flask-based passive web-security assessment platform. An authenticated user submits a target; the app validates the request and invokes assessment, which normalizes the target, performs guarded reconnaissance, and analyzes the response. Results are stored for user-specific history, dashboard analytics, comparisons, and downloadable reports. The graph covers documented capabilities and sampled module relationships; some route details and template wiring are not shown in the excerpts, so those links rely on README documentation.

Main entry points: [`src/cyberrecon/app.py`](https://github.com/arraj14/cyberrecon/blob/main/src/cyberrecon/app.py) (Flask Routes), [`src/cyberrecon/scanner/assessment.py`](https://github.com/arraj14/cyberrecon/blob/main/src/cyberrecon/scanner/assessment.py) (Assessment Orchestrator), [`src/cyberrecon/scanner/reconnaissance.py`](https://github.com/arraj14/cyberrecon/blob/main/src/cyberrecon/scanner/reconnaissance.py) (Passive Recon), [`src/cyberrecon/templates/new_assessment.html`](https://github.com/arraj14/cyberrecon/blob/main/src/cyberrecon/templates/new_assessment.html) (Target Submission)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web Application"]
  node_webapp["Flask Routes<br/>[app.py]"]
  node_targetform["Target Submission"]
  node_auth["Authentication<br/>[app.py]"]
  node_csrf["CSRF Protection<br/>[app.py]"]
end

subgraph group_scan["Assessment Engine"]
  node_assessment["Assessment Orchestrator<br/>[assessment.py]"]
  node_validation["Target Validation<br/>[target.py]"]
  node_recon["Passive Recon<br/>[reconnaissance.py]"]
  node_security["Security Checks"]
end

subgraph group_data["Assessment Records"]
  node_storage[("SQLite Persistence<br/>[storage.py]")]
end

subgraph group_views["User Results"]
  node_dashboard["Dashboard Analytics<br/>[dashboard.html]"]
  node_history["Scan History<br/>[history.html]"]
  node_compare["Assessment Comparison<br/>[comparison.py]"]
  node_comparisonview["Comparison View<br/>[compare.html]"]
  node_report["HTML Reports<br/>[report.html]"]
  node_results["Assessment Results<br/>[results.html]"]
end

node_user(("Authenticated User"))
node_targetsite(("Authorized HTTP Target"))

node_user -->|"authenticates"| node_auth
node_user -->|"submits target"| node_targetform
node_targetform -.->|"posts request"| node_webapp
node_webapp -->|"validates token"| node_csrf
node_webapp -->|"runs assessment"| node_assessment
node_assessment -->|"normalizes target"| node_validation
node_assessment -->|"performs reconnaissance"| node_recon
node_recon -->|"checks destinations"| node_validation
node_recon -->|"requests response"| node_targetsite
node_assessment -->|"analyzes response"| node_security
node_webapp -->|"stores and reads"| node_storage
node_assessment -->|"persists assessment"| node_storage
node_webapp -.->|"renders results"| node_results
node_user -->|"views analytics"| node_dashboard
node_user -->|"reviews scans"| node_history
node_webapp -->|"loads analytics"| node_dashboard
node_webapp -->|"shows history"| node_history
node_webapp -->|"compares scans"| node_compare
node_compare -->|"renders comparison"| node_comparisonview
node_user -->|"reviews changes"| node_comparisonview
node_user -->|"downloads report"| node_report
node_webapp -->|"serves report"| node_report

click node_webapp "https://github.com/arraj14/cyberrecon/blob/main/src/cyberrecon/app.py"
click node_targetform "https://github.com/arraj14/cyberrecon/blob/main/src/cyberrecon/templates/new_assessment.html"
click node_auth "https://github.com/arraj14/cyberrecon/blob/main/src/cyberrecon/app.py"
click node_csrf "https://github.com/arraj14/cyberrecon/blob/main/src/cyberrecon/app.py"
click node_assessment "https://github.com/arraj14/cyberrecon/blob/main/src/cyberrecon/scanner/assessment.py"
click node_validation "https://github.com/arraj14/cyberrecon/blob/main/src/cyberrecon/scanner/target.py"
click node_recon "https://github.com/arraj14/cyberrecon/blob/main/src/cyberrecon/scanner/reconnaissance.py"
click node_security "https://github.com/arraj14/cyberrecon/blob/main/src/cyberrecon/scanner/security_analysis.py"
click node_storage "https://github.com/arraj14/cyberrecon/blob/main/src/cyberrecon/storage.py"
click node_dashboard "https://github.com/arraj14/cyberrecon/blob/main/src/cyberrecon/templates/dashboard.html"
click node_history "https://github.com/arraj14/cyberrecon/blob/main/src/cyberrecon/templates/history.html"
click node_compare "https://github.com/arraj14/cyberrecon/blob/main/src/cyberrecon/scanner/comparison.py"
click node_comparisonview "https://github.com/arraj14/cyberrecon/blob/main/src/cyberrecon/templates/compare.html"
click node_report "https://github.com/arraj14/cyberrecon/blob/main/src/cyberrecon/templates/report.html"
click node_results "https://github.com/arraj14/cyberrecon/blob/main/src/cyberrecon/templates/results.html"

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_webapp,node_targetform,node_auth,node_csrf,node_user toneBlue
class node_assessment,node_validation,node_recon,node_security toneAmber
class node_storage toneMint
class node_dashboard,node_history,node_compare,node_comparisonview,node_report,node_results toneRose
class node_targetsite toneIndigo
```

## Components

### Web Application

- [Flask Routes](https://github.com/arraj14/cyberrecon/blob/main/src/cyberrecon/app.py): `src/cyberrecon/app.py`
- [Target Submission](https://github.com/arraj14/cyberrecon/blob/main/src/cyberrecon/templates/new_assessment.html): `src/cyberrecon/templates/new_assessment.html`
- [Authentication](https://github.com/arraj14/cyberrecon/blob/main/src/cyberrecon/app.py): `src/cyberrecon/app.py`
- [CSRF Protection](https://github.com/arraj14/cyberrecon/blob/main/src/cyberrecon/app.py): `src/cyberrecon/app.py`

### Assessment Engine

- [Assessment Orchestrator](https://github.com/arraj14/cyberrecon/blob/main/src/cyberrecon/scanner/assessment.py): `src/cyberrecon/scanner/assessment.py`
- [Target Validation](https://github.com/arraj14/cyberrecon/blob/main/src/cyberrecon/scanner/target.py): `src/cyberrecon/scanner/target.py`
- [Passive Recon](https://github.com/arraj14/cyberrecon/blob/main/src/cyberrecon/scanner/reconnaissance.py): `src/cyberrecon/scanner/reconnaissance.py`
- [Security Checks](https://github.com/arraj14/cyberrecon/blob/main/src/cyberrecon/scanner/security_analysis.py): `src/cyberrecon/scanner/security_analysis.py`

### Assessment Records

- [SQLite Persistence](https://github.com/arraj14/cyberrecon/blob/main/src/cyberrecon/storage.py): `src/cyberrecon/storage.py`

### User Results

- [Dashboard Analytics](https://github.com/arraj14/cyberrecon/blob/main/src/cyberrecon/templates/dashboard.html): `src/cyberrecon/templates/dashboard.html`
- [Scan History](https://github.com/arraj14/cyberrecon/blob/main/src/cyberrecon/templates/history.html): `src/cyberrecon/templates/history.html`
- [Assessment Comparison](https://github.com/arraj14/cyberrecon/blob/main/src/cyberrecon/scanner/comparison.py): `src/cyberrecon/scanner/comparison.py`
- [Comparison View](https://github.com/arraj14/cyberrecon/blob/main/src/cyberrecon/templates/compare.html): `src/cyberrecon/templates/compare.html`
- [HTML Reports](https://github.com/arraj14/cyberrecon/blob/main/src/cyberrecon/templates/report.html): `src/cyberrecon/templates/report.html`
- [Assessment Results](https://github.com/arraj14/cyberrecon/blob/main/src/cyberrecon/templates/results.html): `src/cyberrecon/templates/results.html`

### Other components

- **Authenticated User**
- **Authorized HTTP Target**

## Connections

- Authenticated User → Authentication: authenticates (evidence: `README.md`)
- Authenticated User → Target Submission: submits target (evidence: `README.md`)
- Target Submission → Flask Routes: posts request
- Flask Routes → CSRF Protection: validates token (evidence: `README.md`)
- Flask Routes → Assessment Orchestrator: runs assessment (evidence: `src/cyberrecon/app.py`)
- Assessment Orchestrator → Target Validation: normalizes target (evidence: `src/cyberrecon/scanner/assessment.py`)
- Assessment Orchestrator → Passive Recon: performs reconnaissance (evidence: `src/cyberrecon/scanner/assessment.py`)
- Passive Recon → Target Validation: checks destinations (evidence: `src/cyberrecon/scanner/reconnaissance.py`)
- Passive Recon → Authorized HTTP Target: requests response (evidence: `README.md`)
- Assessment Orchestrator → Security Checks: analyzes response (evidence: `src/cyberrecon/scanner/assessment.py`)
- Flask Routes → SQLite Persistence: stores and reads (evidence: `src/cyberrecon/app.py`)
- Assessment Orchestrator → SQLite Persistence: persists assessment (evidence: `README.md`)
- Flask Routes → Assessment Results: renders results
- Authenticated User → Dashboard Analytics: views analytics (evidence: `README.md`)
- Authenticated User → Scan History: reviews scans (evidence: `README.md`)
- Flask Routes → Dashboard Analytics: loads analytics (evidence: `README.md`)
- Flask Routes → Scan History: shows history (evidence: `README.md`)
- Flask Routes → Assessment Comparison: compares scans (evidence: `src/cyberrecon/app.py`)
- Assessment Comparison → Comparison View: renders comparison (evidence: `README.md`)
- Authenticated User → Comparison View: reviews changes (evidence: `README.md`)
- Authenticated User → HTML Reports: downloads report (evidence: `README.md`)
- Flask Routes → HTML Reports: serves report (evidence: `README.md`)
