# or1un/exposia architecture

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

- Interactive diagram: https://gitdiagram.com/or1un/exposia
- Repository: https://github.com/or1un/exposia

## Overview

Exposia is a rule-based external-exposure assessment tool: an authorized user supplies a domain, D1 gathers passive public data and scores exposures, D2 prioritizes mitigations, D3 models threat profiles from contextual inputs, and report modules produce a French PDF and analyst CSV. The graph preserves the documented report sections and shared reporting layers. Stage handoffs and report assembly are based on the README; sampled source excerpts do not expose the full orchestration or every report-module call.

Main entry points: [`Modules/D_Data/D1_asset_discovery_assessment.py`](https://github.com/or1un/exposia/blob/main/Modules/D_Data/D1_asset_discovery_assessment.py) (Asset discovery), [`Modules/D_Data/D2_mitigation_plan.py`](https://github.com/or1un/exposia/blob/main/Modules/D_Data/D2_mitigation_plan.py) (Mitigation planning), [`Modules/D_Data/D3_threat_modeling.py`](https://github.com/or1un/exposia/blob/main/Modules/D_Data/D3_threat_modeling.py) (Threat modeling), [`Modules/R_Report/R0_report_theme.py`](https://github.com/or1un/exposia/blob/main/Modules/R_Report/R0_report_theme.py) (PDF theme)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_discovery["Exposure discovery"]
  node_d1["Asset discovery"]
  node_public_sources(("Public data sources"))
  node_parameters["Discovery parameters"]
end

subgraph group_analysis["Risk analysis"]
  node_d2["Mitigation planning"]
  node_mitigation_data["Mitigation measures"]
  node_d3["Threat modeling"]
  node_threat_matrices["Threat matrices"]
  node_assessment_data["Assessment data"]
end

subgraph group_reporting["Report generation"]
  node_r1["Threat profiles"]
  node_r2["Asset report"]
  node_r3["Risk report"]
  node_r4["Mitigation report<br/>[R4_mitigation.py]"]
  node_r5["Cover page<br/>[R5_cover_page.py]"]
  node_r6["Global synthesis"]
  node_r7["Disclaimer<br/>[R7_disclaimer.py]"]
  node_r8["Back cover<br/>[R8_back_cover.py]"]
  node_r9["PDF assembly"]
  node_toc["Table of contents"]
  node_presentation["Analyst CSV export"]
  node_pdf["Decision-maker PDF"]
  node_csv["Exposure CSV"]
end

subgraph group_shared["Shared services"]
  node_paths["Path and campaign resolution<br/>[exposia_paths.py]"]
  node_config["API key configuration<br/>[exposia_config.py]"]
  node_console["Console interface<br/>[exposia_ui.py]"]
  node_theme["PDF theme<br/>[R0_report_theme.py]"]
end

node_user(("Authorized user"))

node_user -->|"supplies domain"| node_d1
node_d1 -->|"queries passively"| node_public_sources
node_d1 -->|"uses reference data"| node_parameters
node_d1 -->|"exports findings"| node_assessment_data
node_d1 -->|"provides findings"| node_d2
node_d2 -->|"matches measures"| node_mitigation_data
node_d2 -->|"enriches findings"| node_assessment_data
node_d2 -->|"precedes modeling"| node_d3
node_d3 -->|"loads matrices"| node_threat_matrices
node_user -->|"provides context"| node_d3
node_d3 -->|"exports profiles"| node_assessment_data
node_assessment_data -->|"feeds profiles"| node_r1
node_assessment_data -->|"feeds assets"| node_r2
node_assessment_data -->|"feeds risks"| node_r3
node_assessment_data -->|"feeds mitigations"| node_r4
node_assessment_data -->|"feeds synthesis"| node_r6
node_r1 -->|"generates section"| node_pdf
node_r2 -->|"generates section"| node_pdf
node_r3 -->|"generates section"| node_pdf
node_r4 -->|"generates section"| node_pdf
node_r5 -->|"generates cover"| node_pdf
node_r6 -->|"generates section"| node_pdf
node_r7 -->|"generates disclaimer"| node_pdf
node_r8 -->|"generates back cover"| node_pdf
node_r9 -->|"uses contents"| node_toc
node_r9 -->|"assembles PDF"| node_pdf
node_presentation -->|"exports rows"| node_assessment_data
node_presentation -->|"produces export"| node_csv
node_d1 -->|"reads API keys"| node_config
node_d1 -->|"resolves paths"| node_paths
node_d2 -->|"resolves paths"| node_paths
node_d3 -->|"resolves paths"| node_paths
node_d1 -->|"uses interface"| node_console
node_d2 -->|"uses interface"| node_console
node_d3 -->|"uses interface"| node_console
node_r1 -->|"uses theme"| node_theme
node_r2 -->|"uses theme"| node_theme
node_r3 -->|"uses theme"| node_theme
node_r4 -->|"uses theme"| node_theme
node_r6 -->|"uses theme"| node_theme
node_toc -->|"uses theme"| node_theme

click node_d1 "https://github.com/or1un/exposia/blob/main/Modules/D_Data/D1_asset_discovery_assessment.py"
click node_parameters "https://github.com/or1un/exposia/tree/main/Parameters"
click node_d2 "https://github.com/or1un/exposia/blob/main/Modules/D_Data/D2_mitigation_plan.py"
click node_mitigation_data "https://github.com/or1un/exposia/blob/main/Parameters/mitigation_measures.csv"
click node_d3 "https://github.com/or1un/exposia/blob/main/Modules/D_Data/D3_threat_modeling.py"
click node_threat_matrices "https://github.com/or1un/exposia/tree/main/Parameters/Threat_matrices"
click node_r1 "https://github.com/or1un/exposia/blob/main/Modules/R_Report/R1_threat_modeling.py"
click node_r2 "https://github.com/or1un/exposia/blob/main/Modules/R_Report/R2_Asset_discovery.py"
click node_r3 "https://github.com/or1un/exposia/blob/main/Modules/R_Report/R3_Risk_assessment.py"
click node_r4 "https://github.com/or1un/exposia/blob/main/Modules/R_Report/R4_mitigation.py"
click node_r5 "https://github.com/or1un/exposia/blob/main/Modules/R_Report/R5_cover_page.py"
click node_r6 "https://github.com/or1un/exposia/blob/main/Modules/R_Report/R6_synthesis_global.py"
click node_r7 "https://github.com/or1un/exposia/blob/main/Modules/R_Report/R7_disclaimer.py"
click node_r8 "https://github.com/or1un/exposia/blob/main/Modules/R_Report/R8_back_cover.py"
click node_r9 "https://github.com/or1un/exposia/blob/main/Modules/R_Report/R9_Global_report.py"
click node_toc "https://github.com/or1un/exposia/blob/main/Modules/R_Report/R11_table_of_contents.py"
click node_presentation "https://github.com/or1un/exposia/blob/main/Modules/R_Report/R10_presentation_export.py"
click node_paths "https://github.com/or1un/exposia/blob/main/Modules/exposia_paths.py"
click node_config "https://github.com/or1un/exposia/blob/main/Modules/exposia_config.py"
click node_console "https://github.com/or1un/exposia/blob/main/Modules/exposia_ui.py"
click node_theme "https://github.com/or1un/exposia/blob/main/Modules/R_Report/R0_report_theme.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_d1,node_public_sources,node_parameters,node_user toneBlue
class node_d2,node_mitigation_data,node_d3,node_threat_matrices,node_assessment_data toneAmber
class node_r1,node_r2,node_r3,node_r4,node_r5,node_r6,node_r7,node_r8,node_r9,node_toc,node_presentation,node_pdf,node_csv toneMint
class node_paths,node_config,node_console,node_theme toneRose
```

## Components

### Exposure discovery

- [Asset discovery](https://github.com/or1un/exposia/blob/main/Modules/D_Data/D1_asset_discovery_assessment.py): `Modules/D_Data/D1_asset_discovery_assessment.py`
- **Public data sources**
- [Discovery parameters](https://github.com/or1un/exposia/tree/main/Parameters): `Parameters`

### Risk analysis

- [Mitigation planning](https://github.com/or1un/exposia/blob/main/Modules/D_Data/D2_mitigation_plan.py): `Modules/D_Data/D2_mitigation_plan.py`
- [Mitigation measures](https://github.com/or1un/exposia/blob/main/Parameters/mitigation_measures.csv): `Parameters/mitigation_measures.csv`
- [Threat modeling](https://github.com/or1un/exposia/blob/main/Modules/D_Data/D3_threat_modeling.py): `Modules/D_Data/D3_threat_modeling.py`
- [Threat matrices](https://github.com/or1un/exposia/tree/main/Parameters/Threat_matrices): `Parameters/Threat_matrices`
- **Assessment data**

### Report generation

- [Threat profiles](https://github.com/or1un/exposia/blob/main/Modules/R_Report/R1_threat_modeling.py): `Modules/R_Report/R1_threat_modeling.py`
- [Asset report](https://github.com/or1un/exposia/blob/main/Modules/R_Report/R2_Asset_discovery.py): `Modules/R_Report/R2_Asset_discovery.py`
- [Risk report](https://github.com/or1un/exposia/blob/main/Modules/R_Report/R3_Risk_assessment.py): `Modules/R_Report/R3_Risk_assessment.py`
- [Mitigation report](https://github.com/or1un/exposia/blob/main/Modules/R_Report/R4_mitigation.py): `Modules/R_Report/R4_mitigation.py`
- [Cover page](https://github.com/or1un/exposia/blob/main/Modules/R_Report/R5_cover_page.py): `Modules/R_Report/R5_cover_page.py`
- [Global synthesis](https://github.com/or1un/exposia/blob/main/Modules/R_Report/R6_synthesis_global.py): `Modules/R_Report/R6_synthesis_global.py`
- [Disclaimer](https://github.com/or1un/exposia/blob/main/Modules/R_Report/R7_disclaimer.py): `Modules/R_Report/R7_disclaimer.py`
- [Back cover](https://github.com/or1un/exposia/blob/main/Modules/R_Report/R8_back_cover.py): `Modules/R_Report/R8_back_cover.py`
- [PDF assembly](https://github.com/or1un/exposia/blob/main/Modules/R_Report/R9_Global_report.py): `Modules/R_Report/R9_Global_report.py`
- [Table of contents](https://github.com/or1un/exposia/blob/main/Modules/R_Report/R11_table_of_contents.py): `Modules/R_Report/R11_table_of_contents.py`
- [Analyst CSV export](https://github.com/or1un/exposia/blob/main/Modules/R_Report/R10_presentation_export.py): `Modules/R_Report/R10_presentation_export.py`
- **Decision-maker PDF**
- **Exposure CSV**

### Shared services

- [Path and campaign resolution](https://github.com/or1un/exposia/blob/main/Modules/exposia_paths.py): `Modules/exposia_paths.py`
- [API key configuration](https://github.com/or1un/exposia/blob/main/Modules/exposia_config.py): `Modules/exposia_config.py`
- [Console interface](https://github.com/or1un/exposia/blob/main/Modules/exposia_ui.py): `Modules/exposia_ui.py`
- [PDF theme](https://github.com/or1un/exposia/blob/main/Modules/R_Report/R0_report_theme.py): `Modules/R_Report/R0_report_theme.py`

### Other components

- **Authorized user**

## Connections

- Authorized user → Asset discovery: supplies domain (evidence: `README.md`)
- Asset discovery → Public data sources: queries passively (evidence: `README.md`)
- Asset discovery → Discovery parameters: uses reference data (evidence: `README.md`)
- Asset discovery → Assessment data: exports findings (evidence: `README.md`)
- Asset discovery → Mitigation planning: provides findings (evidence: `README.md`)
- Mitigation planning → Mitigation measures: matches measures (evidence: `README.md`)
- Mitigation planning → Assessment data: enriches findings (evidence: `Modules/D_Data/D2_mitigation_plan.py`)
- Mitigation planning → Threat modeling: precedes modeling (evidence: `README.md`)
- Threat modeling → Threat matrices: loads matrices (evidence: `Modules/D_Data/D3_threat_modeling.py`)
- Authorized user → Threat modeling: provides context (evidence: `Modules/D_Data/D3_threat_modeling.py`)
- Threat modeling → Assessment data: exports profiles (evidence: `README.md`)
- Assessment data → Threat profiles: feeds profiles (evidence: `README.md`)
- Assessment data → Asset report: feeds assets (evidence: `README.md`)
- Assessment data → Risk report: feeds risks (evidence: `README.md`)
- Assessment data → Mitigation report: feeds mitigations (evidence: `README.md`)
- Assessment data → Global synthesis: feeds synthesis (evidence: `README.md`)
- Threat profiles → Decision-maker PDF: generates section (evidence: `README.md`)
- Asset report → Decision-maker PDF: generates section (evidence: `README.md`)
- Risk report → Decision-maker PDF: generates section (evidence: `README.md`)
- Mitigation report → Decision-maker PDF: generates section (evidence: `README.md`)
- Cover page → Decision-maker PDF: generates cover (evidence: `README.md`)
- Global synthesis → Decision-maker PDF: generates section (evidence: `README.md`)
- Disclaimer → Decision-maker PDF: generates disclaimer (evidence: `README.md`)
- Back cover → Decision-maker PDF: generates back cover (evidence: `README.md`)
- PDF assembly → Table of contents: uses contents (evidence: `Modules/R_Report/R9_Global_report.py`)
- PDF assembly → Decision-maker PDF: assembles PDF (evidence: `README.md`)
- Analyst CSV export → Assessment data: exports rows (evidence: `README.md`)
- Analyst CSV export → Exposure CSV: produces export (evidence: `README.md`)
- Asset discovery → API key configuration: reads API keys (evidence: `Modules/D_Data/D1_asset_discovery_assessment.py`)
- Asset discovery → Path and campaign resolution: resolves paths (evidence: `Modules/D_Data/D1_asset_discovery_assessment.py`)
- Mitigation planning → Path and campaign resolution: resolves paths (evidence: `Modules/D_Data/D2_mitigation_plan.py`)
- Threat modeling → Path and campaign resolution: resolves paths (evidence: `Modules/D_Data/D3_threat_modeling.py`)
- Asset discovery → Console interface: uses interface (evidence: `Modules/D_Data/D1_asset_discovery_assessment.py`)
- Mitigation planning → Console interface: uses interface (evidence: `Modules/D_Data/D2_mitigation_plan.py`)
- Threat modeling → Console interface: uses interface (evidence: `Modules/D_Data/D3_threat_modeling.py`)
- Threat profiles → PDF theme: uses theme (evidence: `Modules/R_Report/R1_threat_modeling.py`)
- Asset report → PDF theme: uses theme (evidence: `Modules/R_Report/R2_Asset_discovery.py`)
- Risk report → PDF theme: uses theme (evidence: `Modules/R_Report/R3_Risk_assessment.py`)
- Mitigation report → PDF theme: uses theme (evidence: `Modules/R_Report/R4_mitigation.py`)
- Global synthesis → PDF theme: uses theme (evidence: `Modules/R_Report/R6_synthesis_global.py`)
- Table of contents → PDF theme: uses theme (evidence: `Modules/R_Report/R11_table_of_contents.py`)
