# git-huber2007/cipherguard architecture

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

- Interactive diagram: https://gitdiagram.com/git-huber2007/cipherguard
- Repository: https://github.com/git-huber2007/cipherguard

## Overview

CipherGuard passively assesses IPsec captures and the host Wi-Fi/VPN environment, then presents findings, quantum-risk context, historical posture changes, and reviewable remediation/export artifacts. The capture path and selected API, Wi-Fi, inference, baseline, and remediation behavior are supported by the supplied excerpts; other README-documented capabilities are shown at subsystem level where their source was not sampled.

Main entry points: [`cipherguard/api/server.py`](https://github.com/git-huber2007/cipherguard/blob/main/cipherguard/api/server.py) (Dashboard API), [`cipherguard/pipeline.py`](https://github.com/git-huber2007/cipherguard/blob/main/cipherguard/pipeline.py) (Capture Pipeline), [`cipherguard/api/static/js/dashboard.js`](https://github.com/git-huber2007/cipherguard/blob/main/cipherguard/api/static/js/dashboard.js) (Analyst Dashboard), [`cipherguard/audit/engine.py`](https://github.com/git-huber2007/cipherguard/blob/main/cipherguard/audit/engine.py) (Finding Engine)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_ingress["Passive Ingress"]
  node_api["Dashboard API<br/>[server.py]"]
end

subgraph group_analysis["Protocol Analysis"]
  node_pipeline["Capture Pipeline<br/>[pipeline.py]"]
  node_pcap["PCAP Reader<br/>[pcap.py]"]
  node_ike["IKE Dissector<br/>[ike.py]"]
  node_esp["ESP Tracker<br/>[esp.py]"]
  node_classifier["ESP Inference<br/>[classifier.py]"]
  node_wifi["Wi-Fi Auditor<br/>[auditor.py]"]
end

subgraph group_assessment["Assessment and Context"]
  node_audit["Finding Engine<br/>[engine.py]"]
  node_policy["Audit Policies<br/>[policy.py]"]
  node_pqc["Quantum Readiness<br/>[pqc.py]"]
  node_baseline[("Posture Baseline<br/>[baseline.py]")]
  node_remediation["Playbook Synthesis<br/>[synth.py]"]
  node_rollback["Rollback Plans<br/>[rollback.py]"]
  node_plan_store[("Plan Store<br/>[store.py]")]
  node_vpn["VPN Status<br/>[detector.py]"]
end

subgraph group_delivery["Analyst Delivery"]
  node_dashboard["Analyst Dashboard<br/>[dashboard.js]"]
  node_cbom["Compliance Dossier<br/>[cbom.py]"]
  node_site_export["Static Export<br/>[static_site.py]"]
end

node_analyst(("Security Analyst"))
node_capture["Mirrored Capture"]
node_wifi_hw(("Host Wi-Fi Adapter"))

node_analyst -->|"requests assessment"| node_api
node_capture -->|"uploads capture"| node_api
node_api -->|"analyzes capture"| node_pipeline
node_pipeline -->|"reads packets"| node_pcap
node_pipeline -->|"parses IKE"| node_ike
node_pipeline -->|"tracks ESP"| node_esp
node_pipeline -->|"annotates flows"| node_classifier
node_pipeline -->|"evaluates assessment"| node_audit
node_audit -->|"consults rules"| node_policy
node_api -->|"requests Wi-Fi audit"| node_wifi
node_wifi_hw -->|"provides telemetry"| node_wifi
node_api -->|"requests tunnel status"| node_vpn
node_api -->|"records posture"| node_baseline
node_api -->|"requests quantum ranking"| node_pqc
node_api -->|"builds playbooks"| node_remediation
node_remediation -->|"generates rollback"| node_rollback
node_api -->|"stores plans"| node_plan_store
node_api -->|"serves assessment data"| node_dashboard
node_dashboard -->|"requests results"| node_api
node_api -->|"exports dossier"| node_cbom
node_api -->|"exports static report"| node_site_export
node_dashboard -->|"presents findings"| node_analyst

click node_api "https://github.com/git-huber2007/cipherguard/blob/main/cipherguard/api/server.py"
click node_pipeline "https://github.com/git-huber2007/cipherguard/blob/main/cipherguard/pipeline.py"
click node_pcap "https://github.com/git-huber2007/cipherguard/blob/main/cipherguard/dissector/pcap.py"
click node_ike "https://github.com/git-huber2007/cipherguard/blob/main/cipherguard/dissector/ike.py"
click node_esp "https://github.com/git-huber2007/cipherguard/blob/main/cipherguard/dissector/esp.py"
click node_classifier "https://github.com/git-huber2007/cipherguard/blob/main/cipherguard/ml/classifier.py"
click node_wifi "https://github.com/git-huber2007/cipherguard/blob/main/cipherguard/wifi/auditor.py"
click node_audit "https://github.com/git-huber2007/cipherguard/blob/main/cipherguard/audit/engine.py"
click node_policy "https://github.com/git-huber2007/cipherguard/blob/main/cipherguard/audit/policy.py"
click node_pqc "https://github.com/git-huber2007/cipherguard/blob/main/cipherguard/intel/pqc.py"
click node_baseline "https://github.com/git-huber2007/cipherguard/blob/main/cipherguard/intel/baseline.py"
click node_remediation "https://github.com/git-huber2007/cipherguard/blob/main/cipherguard/remediation/synth.py"
click node_rollback "https://github.com/git-huber2007/cipherguard/blob/main/cipherguard/remediation/rollback.py"
click node_plan_store "https://github.com/git-huber2007/cipherguard/blob/main/cipherguard/remediation/store.py"
click node_vpn "https://github.com/git-huber2007/cipherguard/blob/main/cipherguard/vpn/detector.py"
click node_dashboard "https://github.com/git-huber2007/cipherguard/blob/main/cipherguard/api/static/js/dashboard.js"
click node_cbom "https://github.com/git-huber2007/cipherguard/blob/main/cipherguard/export/cbom.py"
click node_site_export "https://github.com/git-huber2007/cipherguard/blob/main/cipherguard/export/static_site.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_api toneBlue
class node_pipeline,node_pcap,node_ike,node_esp,node_classifier,node_wifi toneAmber
class node_audit,node_policy,node_pqc,node_baseline,node_remediation,node_rollback,node_plan_store,node_vpn toneMint
class node_dashboard,node_cbom,node_site_export toneRose
class node_analyst,node_capture,node_wifi_hw toneIndigo
```

## Components

### Passive Ingress

- [Dashboard API](https://github.com/git-huber2007/cipherguard/blob/main/cipherguard/api/server.py): `cipherguard/api/server.py`

### Protocol Analysis

- [Capture Pipeline](https://github.com/git-huber2007/cipherguard/blob/main/cipherguard/pipeline.py): `cipherguard/pipeline.py`
- [PCAP Reader](https://github.com/git-huber2007/cipherguard/blob/main/cipherguard/dissector/pcap.py): `cipherguard/dissector/pcap.py`
- [IKE Dissector](https://github.com/git-huber2007/cipherguard/blob/main/cipherguard/dissector/ike.py): `cipherguard/dissector/ike.py`
- [ESP Tracker](https://github.com/git-huber2007/cipherguard/blob/main/cipherguard/dissector/esp.py): `cipherguard/dissector/esp.py`
- [ESP Inference](https://github.com/git-huber2007/cipherguard/blob/main/cipherguard/ml/classifier.py): `cipherguard/ml/classifier.py`
- [Wi-Fi Auditor](https://github.com/git-huber2007/cipherguard/blob/main/cipherguard/wifi/auditor.py): `cipherguard/wifi/auditor.py`

### Assessment and Context

- [Finding Engine](https://github.com/git-huber2007/cipherguard/blob/main/cipherguard/audit/engine.py): `cipherguard/audit/engine.py`
- [Audit Policies](https://github.com/git-huber2007/cipherguard/blob/main/cipherguard/audit/policy.py): `cipherguard/audit/policy.py`
- [Quantum Readiness](https://github.com/git-huber2007/cipherguard/blob/main/cipherguard/intel/pqc.py): `cipherguard/intel/pqc.py`
- [Posture Baseline](https://github.com/git-huber2007/cipherguard/blob/main/cipherguard/intel/baseline.py): `cipherguard/intel/baseline.py`
- [Playbook Synthesis](https://github.com/git-huber2007/cipherguard/blob/main/cipherguard/remediation/synth.py): `cipherguard/remediation/synth.py`
- [Rollback Plans](https://github.com/git-huber2007/cipherguard/blob/main/cipherguard/remediation/rollback.py): `cipherguard/remediation/rollback.py`
- [Plan Store](https://github.com/git-huber2007/cipherguard/blob/main/cipherguard/remediation/store.py): `cipherguard/remediation/store.py`
- [VPN Status](https://github.com/git-huber2007/cipherguard/blob/main/cipherguard/vpn/detector.py): `cipherguard/vpn/detector.py`

### Analyst Delivery

- [Analyst Dashboard](https://github.com/git-huber2007/cipherguard/blob/main/cipherguard/api/static/js/dashboard.js): `cipherguard/api/static/js/dashboard.js`
- [Compliance Dossier](https://github.com/git-huber2007/cipherguard/blob/main/cipherguard/export/cbom.py): `cipherguard/export/cbom.py`
- [Static Export](https://github.com/git-huber2007/cipherguard/blob/main/cipherguard/export/static_site.py): `cipherguard/export/static_site.py`

### Other components

- **Security Analyst**
- **Mirrored Capture**
- **Host Wi-Fi Adapter**

## Connections

- Security Analyst → Dashboard API: requests assessment
- Mirrored Capture → Dashboard API: uploads capture
- Dashboard API → Capture Pipeline: analyzes capture
- Capture Pipeline → PCAP Reader: reads packets
- Capture Pipeline → IKE Dissector: parses IKE
- Capture Pipeline → ESP Tracker: tracks ESP
- Capture Pipeline → ESP Inference: annotates flows
- Capture Pipeline → Finding Engine: evaluates assessment
- Finding Engine → Audit Policies: consults rules
- Dashboard API → Wi-Fi Auditor: requests Wi-Fi audit
- Host Wi-Fi Adapter → Wi-Fi Auditor: provides telemetry
- Dashboard API → VPN Status: requests tunnel status
- Dashboard API → Posture Baseline: records posture
- Dashboard API → Quantum Readiness: requests quantum ranking
- Dashboard API → Playbook Synthesis: builds playbooks
- Playbook Synthesis → Rollback Plans: generates rollback
- Dashboard API → Plan Store: stores plans
- Dashboard API → Analyst Dashboard: serves assessment data
- Analyst Dashboard → Dashboard API: requests results
- Dashboard API → Compliance Dossier: exports dossier
- Dashboard API → Static Export: exports static report
- Analyst Dashboard → Security Analyst: presents findings
