# offsetsecurity/cipherhorizon architecture

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

- Interactive diagram: https://gitdiagram.com/offsetsecurity/cipherhorizon
- Repository: https://github.com/offsetsecurity/cipherhorizon

## Overview

CipherHorizon is a self-hosted post-quantum readiness and cryptography inventory product. Users scan TLS endpoints and SSH servers from the web UI or CLI, review readiness and prioritized findings, and can inventory machines, discover domain hosts, import CBOMs, and export reports. The graph preserves these documented capability branches; several internal connections are omitted because their implementations were not excerpted, so the edges shown rely on the README or visible source references.

Main entry points: [`web/static/js/api.js`](https://github.com/offsetsecurity/cipherhorizon/blob/main/web/static/js/api.js) (API client), [`internal/app/app.go`](https://github.com/offsetsecurity/cipherhorizon/blob/main/internal/app/app.go) (CLI), [`internal/collector/collector.go`](https://github.com/offsetsecurity/cipherhorizon/blob/main/internal/collector/collector.go) (Host collector), [`internal/tlsprobe/scan.go`](https://github.com/offsetsecurity/cipherhorizon/blob/main/internal/tlsprobe/scan.go) (TLS scanner)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interfaces["User interfaces"]
  node_webapp["Web application<br/>[app.js]"]
  node_apiclient["API client<br/>[api.js]"]
  node_cli["CLI<br/>[app.go]"]
  node_mcp["MCP interface<br/>[server.go]"]
end

subgraph group_assessment["Protocol assessment"]
  node_tlsprobe["TLS scanner<br/>[scan.go]"]
  node_sshprobe["SSH auditor<br/>[scan.go]"]
  node_evaluation["Findings and readiness<br/>[eval.go]"]
  node_domainfind["Domain discovery<br/>[namefind.go]"]
end

subgraph group_fleet["Fleet management"]
  node_httpserver["HTTP server<br/>[server.go]"]
  node_store[("Fleet store<br/>[store.go]")]
end

subgraph group_inventory["Machine inventory"]
  node_hostcollector["Host collector<br/>[collector.go]"]
  node_sensors["Host sensors<br/>[sense.go]"]
  node_machinefacts["Machine facts<br/>[facts.go]"]
  node_ingest["Inventory ingest<br/>[ingest.go]"]
end

subgraph group_outputs["Exports and integrations"]
  node_cbom["CBOM generation<br/>[build.go]"]
  node_pdf["PDF reports<br/>[clients.go]"]
end

node_operator(("Operator"))
node_target(("TLS or SSH target"))
node_machine(("Inventoried machine"))

node_operator -->|"uses"| node_webapp
node_webapp -->|"calls"| node_apiclient
node_apiclient -->|"sends requests"| node_httpserver
node_operator -->|"runs commands"| node_cli
node_cli -->|"starts TLS scans"| node_tlsprobe
node_cli -->|"starts SSH scans"| node_sshprobe
node_target -->|"receives probes"| node_tlsprobe
node_target -->|"receives probes"| node_sshprobe
node_tlsprobe -->|"evaluated for findings"| node_evaluation
node_sshprobe -->|"evaluated for readiness"| node_evaluation
node_httpserver -->|"uses fleet storage"| node_store
node_operator -->|"requests host discovery"| node_domainfind
node_machine -->|"inventoried by"| node_hostcollector
node_hostcollector -->|"collects via"| node_sensors
node_hostcollector -->|"produces facts"| node_machinefacts
node_apiclient -->|"submits inventory"| node_ingest
node_ingest -->|"stores snapshots"| node_store
node_operator -->|"exports CBOM"| node_cbom
node_operator -->|"requests reports"| node_pdf
node_operator -->|"connects assistants"| node_mcp

click node_webapp "https://github.com/offsetsecurity/cipherhorizon/blob/main/web/static/js/app.js"
click node_apiclient "https://github.com/offsetsecurity/cipherhorizon/blob/main/web/static/js/api.js"
click node_cli "https://github.com/offsetsecurity/cipherhorizon/blob/main/internal/app/app.go"
click node_httpserver "https://github.com/offsetsecurity/cipherhorizon/blob/main/internal/server/server.go"
click node_store "https://github.com/offsetsecurity/cipherhorizon/blob/main/internal/store/store.go"
click node_tlsprobe "https://github.com/offsetsecurity/cipherhorizon/blob/main/internal/tlsprobe/scan.go"
click node_sshprobe "https://github.com/offsetsecurity/cipherhorizon/blob/main/internal/sshprobe/scan.go"
click node_evaluation "https://github.com/offsetsecurity/cipherhorizon/blob/main/internal/eval/eval.go"
click node_domainfind "https://github.com/offsetsecurity/cipherhorizon/blob/main/internal/namefind/namefind.go"
click node_hostcollector "https://github.com/offsetsecurity/cipherhorizon/blob/main/internal/collector/collector.go"
click node_sensors "https://github.com/offsetsecurity/cipherhorizon/blob/main/internal/sense/sense.go"
click node_machinefacts "https://github.com/offsetsecurity/cipherhorizon/blob/main/internal/machinefacts/facts.go"
click node_ingest "https://github.com/offsetsecurity/cipherhorizon/blob/main/internal/server/ingest.go"
click node_cbom "https://github.com/offsetsecurity/cipherhorizon/blob/main/internal/cbom/build.go"
click node_pdf "https://github.com/offsetsecurity/cipherhorizon/blob/main/internal/reportpdf/clients.go"
click node_mcp "https://github.com/offsetsecurity/cipherhorizon/blob/main/internal/mcpserver/server.go"

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_apiclient,node_cli,node_mcp toneBlue
class node_tlsprobe,node_sshprobe,node_evaluation,node_domainfind toneAmber
class node_httpserver,node_store toneMint
class node_hostcollector,node_sensors,node_machinefacts,node_ingest toneRose
class node_cbom,node_pdf,node_operator,node_target,node_machine toneIndigo
```

## Components

### User interfaces

- [Web application](https://github.com/offsetsecurity/cipherhorizon/blob/main/web/static/js/app.js): `web/static/js/app.js`
- [API client](https://github.com/offsetsecurity/cipherhorizon/blob/main/web/static/js/api.js): `web/static/js/api.js`
- [CLI](https://github.com/offsetsecurity/cipherhorizon/blob/main/internal/app/app.go): `internal/app/app.go`
- [MCP interface](https://github.com/offsetsecurity/cipherhorizon/blob/main/internal/mcpserver/server.go): `internal/mcpserver/server.go`

### Protocol assessment

- [TLS scanner](https://github.com/offsetsecurity/cipherhorizon/blob/main/internal/tlsprobe/scan.go): `internal/tlsprobe/scan.go`
- [SSH auditor](https://github.com/offsetsecurity/cipherhorizon/blob/main/internal/sshprobe/scan.go): `internal/sshprobe/scan.go`
- [Findings and readiness](https://github.com/offsetsecurity/cipherhorizon/blob/main/internal/eval/eval.go): `internal/eval/eval.go`
- [Domain discovery](https://github.com/offsetsecurity/cipherhorizon/blob/main/internal/namefind/namefind.go): `internal/namefind/namefind.go`

### Fleet management

- [HTTP server](https://github.com/offsetsecurity/cipherhorizon/blob/main/internal/server/server.go): `internal/server/server.go`
- [Fleet store](https://github.com/offsetsecurity/cipherhorizon/blob/main/internal/store/store.go): `internal/store/store.go`

### Machine inventory

- [Host collector](https://github.com/offsetsecurity/cipherhorizon/blob/main/internal/collector/collector.go): `internal/collector/collector.go`
- [Host sensors](https://github.com/offsetsecurity/cipherhorizon/blob/main/internal/sense/sense.go): `internal/sense/sense.go`
- [Machine facts](https://github.com/offsetsecurity/cipherhorizon/blob/main/internal/machinefacts/facts.go): `internal/machinefacts/facts.go`
- [Inventory ingest](https://github.com/offsetsecurity/cipherhorizon/blob/main/internal/server/ingest.go): `internal/server/ingest.go`

### Exports and integrations

- [CBOM generation](https://github.com/offsetsecurity/cipherhorizon/blob/main/internal/cbom/build.go): `internal/cbom/build.go`
- [PDF reports](https://github.com/offsetsecurity/cipherhorizon/blob/main/internal/reportpdf/clients.go): `internal/reportpdf/clients.go`

### Other components

- **Operator**
- **TLS or SSH target**
- **Inventoried machine**

## Connections

- Operator → Web application: uses
- Web application → API client: calls (evidence: `web/static/js/app.js`)
- API client → HTTP server: sends requests (evidence: `web/static/js/api.js`)
- Operator → CLI: runs commands
- CLI → TLS scanner: starts TLS scans (evidence: `internal/app/app.go`)
- CLI → SSH auditor: starts SSH scans (evidence: `internal/app/app.go`)
- TLS or SSH target → TLS scanner: receives probes
- TLS or SSH target → SSH auditor: receives probes
- TLS scanner → Findings and readiness: evaluated for findings
- SSH auditor → Findings and readiness: evaluated for readiness
- HTTP server → Fleet store: uses fleet storage (evidence: `internal/server/server.go`)
- Operator → Domain discovery: requests host discovery
- Inventoried machine → Host collector: inventoried by
- Host collector → Host sensors: collects via
- Host collector → Machine facts: produces facts
- API client → Inventory ingest: submits inventory (evidence: `web/static/js/api.js`)
- Inventory ingest → Fleet store: stores snapshots (evidence: `internal/server/ingest.go`)
- Operator → CBOM generation: exports CBOM
- Operator → PDF reports: requests reports
- Operator → MCP interface: connects assistants (evidence: `internal/mcpserver/server.go`)
