# root-wolf-07/cyberwolf architecture

> Architecture diagram of the GitHub repository root-wolf-07/cyberwolf, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-18). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/root-wolf-07/cyberwolf
- Repository: https://github.com/root-wolf-07/cyberwolf

## Overview

CYBERWOLF is a local-first cybersecurity assessment and investigation platform. Analysts initiate authorized scans through the CLI or workstation; targets pass authorization and policy checks before scanner tools run. Their observations are normalized, located, correlated, risk-scored, and preserved as evidence, then managed through finding investigation and retesting or exported as reports. The graph also includes documented monitoring, pentest, knowledge, and local-AI capabilities. Several subsystems are documented but unsampled, so their internal links are omitted or shown only where the README or source index supports them.

Main entry points: [`app/services/scan_service.py`](https://github.com/root-wolf-07/cyberwolf/blob/main/app/services/scan_service.py) (Scan Service), [`app/services/finding_service.py`](https://github.com/root-wolf-07/cyberwolf/blob/main/app/services/finding_service.py) (Finding Investigation), [`app/services/retest_service.py`](https://github.com/root-wolf-07/cyberwolf/blob/main/app/services/retest_service.py) (Retest Service), [`app/web/server.py`](https://github.com/root-wolf-07/cyberwolf/blob/main/app/web/server.py) (SOC Workstation API)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interfaces["Analyst Interfaces"]
  node_cli["Unified CLI<br/>[main.py]"]
  node_workstation["SOC Workstation API<br/>[server.py]"]
end

subgraph group_assessment["Assessment Pipeline"]
  node_scan_service["Scan Service<br/>[scan_service.py]"]
  node_target_service["Target Service<br/>[target_service.py]"]
  node_authorization["Scope Authorization<br/>[authorization.py]"]
  node_policies["Policy Engine<br/>[policies.py]"]
  node_tool_runner["Tool Runner<br/>[runner.py]"]
  node_tool_adapters["Scanner Adapters"]
  node_scanner_modules["Scanner Modules"]
end

subgraph group_findings["Findings and Intelligence"]
  node_normalizer["Finding Normalizer<br/>[normalizer.py]"]
  node_location["Exact Location<br/>[exact_location.py]"]
  node_correlation["Deduplication and Correlation"]
  node_risk["Risk Engine<br/>[risk_engine.py]"]
  node_finding_service["Finding Investigation<br/>[finding_service.py]"]
  node_retest["Retest Service<br/>[retest_service.py]"]
  node_intelligence["Security Knowledge"]
end

subgraph group_platform["Platform Services"]
  node_evidence["Evidence Vault<br/>[vault.py]"]
  node_database[("SQLite Store<br/>[operations.py]")]
  node_reports["Report Generator<br/>[generator.py]"]
end

subgraph group_analysis["Analysis Extensions"]
  node_monitoring["Traffic Monitoring"]
  node_pentest["Pentest Workflow<br/>[workflow.py]"]
  node_ai["Local AI Analysis<br/>[orchestrator.py]"]
end

node_analyst(("Analyst"))
node_ollama["Ollama Service"]

node_analyst -->|"uses"| node_cli
node_analyst -->|"uses"| node_workstation
node_cli -.->|"initiates scans"| node_scan_service
node_workstation -->|"dispatches scans"| node_scan_service
node_workstation -->|"manages findings"| node_finding_service
node_workstation -->|"manages targets"| node_target_service
node_scan_service -.->|"validates targets"| node_target_service
node_scan_service -->|"checks scope"| node_authorization
node_scan_service -->|"checks policy"| node_policies
node_scan_service -.->|"dispatches tools"| node_tool_runner
node_tool_runner -.->|"runs adapters"| node_tool_adapters
node_tool_adapters -.->|"collects observations"| node_scanner_modules
node_scanner_modules -->|"normalizes findings"| node_normalizer
node_normalizer -.->|"enriches locations"| node_location
node_normalizer -->|"feeds findings"| node_correlation
node_correlation -->|"scores risk"| node_risk
node_scan_service -->|"captures evidence"| node_evidence
node_scan_service -.->|"persists results"| node_database
node_finding_service -->|"reads and updates"| node_database
node_finding_service -->|"uses investigation guidance"| node_intelligence
node_finding_service -->|"uses evidence"| node_evidence
node_finding_service -->|"requests retests"| node_retest
node_retest -->|"checks retest scope"| node_authorization
node_retest -->|"checks policy"| node_policies
node_retest -->|"selects probe location"| node_location
node_retest -->|"stores outcomes"| node_evidence
node_retest -->|"records retest"| node_database
node_finding_service -.->|"exports deliverables"| node_reports
node_monitoring -.->|"anomaly analysis"| node_ai
node_pentest -.->|"requires authorized scope"| node_authorization
node_ai -->|"requests inference"| node_ollama
node_ai -->|"saves analysis"| node_database

click node_cli "https://github.com/root-wolf-07/cyberwolf/blob/main/app/main.py"
click node_workstation "https://github.com/root-wolf-07/cyberwolf/blob/main/app/web/server.py"
click node_scan_service "https://github.com/root-wolf-07/cyberwolf/blob/main/app/services/scan_service.py"
click node_target_service "https://github.com/root-wolf-07/cyberwolf/blob/main/app/services/target_service.py"
click node_authorization "https://github.com/root-wolf-07/cyberwolf/blob/main/app/security/authorization.py"
click node_policies "https://github.com/root-wolf-07/cyberwolf/blob/main/app/security/policies.py"
click node_tool_runner "https://github.com/root-wolf-07/cyberwolf/blob/main/app/tools/runner.py"
click node_tool_adapters "https://github.com/root-wolf-07/cyberwolf/tree/main/app/tools/adapters"
click node_scanner_modules "https://github.com/root-wolf-07/cyberwolf/tree/main/app/scanners"
click node_normalizer "https://github.com/root-wolf-07/cyberwolf/blob/main/app/detection/normalizer.py"
click node_location "https://github.com/root-wolf-07/cyberwolf/blob/main/app/detection/exact_location.py"
click node_correlation "https://github.com/root-wolf-07/cyberwolf/tree/main/app/detection"
click node_risk "https://github.com/root-wolf-07/cyberwolf/blob/main/app/detection/risk_engine.py"
click node_evidence "https://github.com/root-wolf-07/cyberwolf/blob/main/app/evidence/vault.py"
click node_finding_service "https://github.com/root-wolf-07/cyberwolf/blob/main/app/services/finding_service.py"
click node_retest "https://github.com/root-wolf-07/cyberwolf/blob/main/app/services/retest_service.py"
click node_intelligence "https://github.com/root-wolf-07/cyberwolf/tree/main/app/intelligence"
click node_database "https://github.com/root-wolf-07/cyberwolf/blob/main/app/database/operations.py"
click node_reports "https://github.com/root-wolf-07/cyberwolf/blob/main/app/reports/generator.py"
click node_monitoring "https://github.com/root-wolf-07/cyberwolf/tree/main/app/monitors"
click node_pentest "https://github.com/root-wolf-07/cyberwolf/blob/main/app/pentest/workflow.py"
click node_ai "https://github.com/root-wolf-07/cyberwolf/blob/main/app/ai/orchestrator.py"

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_workstation toneBlue
class node_scan_service,node_target_service,node_authorization,node_policies,node_tool_runner,node_tool_adapters,node_scanner_modules toneAmber
class node_normalizer,node_location,node_correlation,node_risk,node_finding_service,node_retest,node_intelligence toneMint
class node_evidence,node_database,node_reports toneRose
class node_monitoring,node_pentest,node_ai,node_analyst,node_ollama toneIndigo
```

## Components

### Analyst Interfaces

- [Unified CLI](https://github.com/root-wolf-07/cyberwolf/blob/main/app/main.py): `app/main.py`
- [SOC Workstation API](https://github.com/root-wolf-07/cyberwolf/blob/main/app/web/server.py): `app/web/server.py`

### Assessment Pipeline

- [Scan Service](https://github.com/root-wolf-07/cyberwolf/blob/main/app/services/scan_service.py): `app/services/scan_service.py`
- [Target Service](https://github.com/root-wolf-07/cyberwolf/blob/main/app/services/target_service.py): `app/services/target_service.py`
- [Scope Authorization](https://github.com/root-wolf-07/cyberwolf/blob/main/app/security/authorization.py): `app/security/authorization.py`
- [Policy Engine](https://github.com/root-wolf-07/cyberwolf/blob/main/app/security/policies.py): `app/security/policies.py`
- [Tool Runner](https://github.com/root-wolf-07/cyberwolf/blob/main/app/tools/runner.py): `app/tools/runner.py`
- [Scanner Adapters](https://github.com/root-wolf-07/cyberwolf/tree/main/app/tools/adapters): `app/tools/adapters`
- [Scanner Modules](https://github.com/root-wolf-07/cyberwolf/tree/main/app/scanners): `app/scanners`

### Findings and Intelligence

- [Finding Normalizer](https://github.com/root-wolf-07/cyberwolf/blob/main/app/detection/normalizer.py): `app/detection/normalizer.py`
- [Exact Location](https://github.com/root-wolf-07/cyberwolf/blob/main/app/detection/exact_location.py): `app/detection/exact_location.py`
- [Deduplication and Correlation](https://github.com/root-wolf-07/cyberwolf/tree/main/app/detection): `app/detection`
- [Risk Engine](https://github.com/root-wolf-07/cyberwolf/blob/main/app/detection/risk_engine.py): `app/detection/risk_engine.py`
- [Finding Investigation](https://github.com/root-wolf-07/cyberwolf/blob/main/app/services/finding_service.py): `app/services/finding_service.py`
- [Retest Service](https://github.com/root-wolf-07/cyberwolf/blob/main/app/services/retest_service.py): `app/services/retest_service.py`
- [Security Knowledge](https://github.com/root-wolf-07/cyberwolf/tree/main/app/intelligence): `app/intelligence`

### Platform Services

- [Evidence Vault](https://github.com/root-wolf-07/cyberwolf/blob/main/app/evidence/vault.py): `app/evidence/vault.py`
- [SQLite Store](https://github.com/root-wolf-07/cyberwolf/blob/main/app/database/operations.py): `app/database/operations.py`
- [Report Generator](https://github.com/root-wolf-07/cyberwolf/blob/main/app/reports/generator.py): `app/reports/generator.py`

### Analysis Extensions

- [Traffic Monitoring](https://github.com/root-wolf-07/cyberwolf/tree/main/app/monitors): `app/monitors`
- [Pentest Workflow](https://github.com/root-wolf-07/cyberwolf/blob/main/app/pentest/workflow.py): `app/pentest/workflow.py`
- [Local AI Analysis](https://github.com/root-wolf-07/cyberwolf/blob/main/app/ai/orchestrator.py): `app/ai/orchestrator.py`

### Other components

- **Analyst**
- **Ollama Service**

## Connections

- Analyst → Unified CLI: uses (evidence: `README.md`)
- Analyst → SOC Workstation API: uses (evidence: `README.md`)
- Unified CLI → Scan Service: initiates scans
- SOC Workstation API → Scan Service: dispatches scans (evidence: `app/web/server.py`)
- SOC Workstation API → Finding Investigation: manages findings (evidence: `app/web/server.py`)
- SOC Workstation API → Target Service: manages targets (evidence: `app/web/server.py`)
- Scan Service → Target Service: validates targets
- Scan Service → Scope Authorization: checks scope (evidence: `README.md`)
- Scan Service → Policy Engine: checks policy (evidence: `README.md`)
- Scan Service → Tool Runner: dispatches tools
- Tool Runner → Scanner Adapters: runs adapters
- Scanner Adapters → Scanner Modules: collects observations
- Scanner Modules → Finding Normalizer: normalizes findings (evidence: `README.md`)
- Finding Normalizer → Exact Location: enriches locations
- Finding Normalizer → Deduplication and Correlation: feeds findings (evidence: `README.md`)
- Deduplication and Correlation → Risk Engine: scores risk (evidence: `README.md`)
- Scan Service → Evidence Vault: captures evidence (evidence: `README.md`)
- Scan Service → SQLite Store: persists results
- Finding Investigation → SQLite Store: reads and updates (evidence: `app/services/finding_service.py`)
- Finding Investigation → Security Knowledge: uses investigation guidance (evidence: `app/services/finding_service.py`)
- Finding Investigation → Evidence Vault: uses evidence (evidence: `app/services/finding_service.py`)
- Finding Investigation → Retest Service: requests retests (evidence: `app/services/finding_service.py`)
- Retest Service → Scope Authorization: checks retest scope (evidence: `app/services/retest_service.py`)
- Retest Service → Policy Engine: checks policy (evidence: `app/services/retest_service.py`)
- Retest Service → Exact Location: selects probe location (evidence: `app/services/retest_service.py`)
- Retest Service → Evidence Vault: stores outcomes (evidence: `app/services/retest_service.py`)
- Retest Service → SQLite Store: records retest (evidence: `app/services/retest_service.py`)
- Finding Investigation → Report Generator: exports deliverables
- Traffic Monitoring → Local AI Analysis: anomaly analysis
- Pentest Workflow → Scope Authorization: requires authorized scope
- Local AI Analysis → Ollama Service: requests inference
- Local AI Analysis → SQLite Store: saves analysis (evidence: `app/ai/orchestrator.py`)
