# interplains/zero-breach architecture

> Architecture diagram of the GitHub repository interplains/zero-breach, 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/interplains/zero-breach
- Repository: https://github.com/interplains/zero-breach

## Overview

Zero Breach is a local, read-only AdFection/Candiru indicator scanner. Its main workflow loads indicators, orchestrates browser, file-hash and host checks under a no-network guard, collects graded findings and coverage gaps, then renders a human or JSON report. A separate updater can refresh indicators over HTTPS; it is deliberately outside the scanner’s no-network workflow. The graph reflects documented orchestration and sampled source references; unsampled implementation details and unshown relationships are omitted.

Main entry points: [`scan/adint_scan/cli.py`](https://github.com/interplains/zero-breach/blob/main/scan/adint_scan/cli.py) (Scan orchestrator), [`scan/adint_scan/modules/browser.py`](https://github.com/interplains/zero-breach/blob/main/scan/adint_scan/modules/browser.py) (Browser artifacts), [`scan/adint_scan/modules/hashscan.py`](https://github.com/interplains/zero-breach/blob/main/scan/adint_scan/modules/hashscan.py) (File fingerprints), [`scan/adint_scan/modules/host.py`](https://github.com/interplains/zero-breach/blob/main/scan/adint_scan/modules/host.py) (Host artifacts)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["Scan entry"]
  node_launcher["CLI launcher<br/>[adint-scan.py]"]
  node_cli["Scan orchestrator<br/>[cli.py]"]
  node_guard["Network guard<br/>[netguard.py]"]
end

subgraph group_checks["Local checks"]
  node_browser["Browser artifacts<br/>[browser.py]"]
  node_hashscan["File fingerprints<br/>[hashscan.py]"]
  node_host["Host artifacts<br/>[host.py]"]
  node_paths["Safe path checks<br/>[localpaths.py]"]
end

subgraph group_core["Evidence and reporting"]
  node_indicators["Indicator set<br/>[iocs.py]"]
  node_iocfile["Published indicators<br/>[adfection_iocs.txt]"]
  node_context["Scan context<br/>[context.py]"]
  node_result["Graded results<br/>[result.py]"]
  node_report["Report builder<br/>[report.py]"]
  node_reportout["Human / JSON report"]
end

subgraph group_refresh["Indicator refresh"]
  node_updater["IOC updater<br/>[update-iocs.py]"]
end

node_operator(("User"))
node_https(("HTTPS indicator source"))

node_operator -->|"starts scan"| node_launcher
node_launcher -->|"calls"| node_cli
node_operator -->|"requests refresh"| node_cli
node_cli -->|"loads"| node_indicators
node_iocfile -->|"provides data"| node_indicators
node_cli -->|"runs guarded"| node_guard
node_cli -->|"creates"| node_context
node_cli -->|"dispatches"| node_browser
node_cli -->|"dispatches"| node_hashscan
node_cli -->|"dispatches"| node_host
node_browser -->|"reads"| node_context
node_hashscan -->|"reads"| node_context
node_host -->|"reads"| node_context
node_browser -->|"checks paths"| node_paths
node_hashscan -->|"checks paths"| node_paths
node_host -->|"checks paths"| node_paths
node_browser -->|"records findings"| node_result
node_hashscan -->|"records findings"| node_result
node_host -->|"records findings"| node_result
node_cli -->|"builds report"| node_report
node_report -->|"summarizes"| node_result
node_report -->|"renders"| node_reportout
node_updater -->|"fetches indicators"| node_https
node_updater -.->|"refreshes"| node_iocfile

click node_launcher "https://github.com/interplains/zero-breach/blob/main/scan/adint-scan.py"
click node_cli "https://github.com/interplains/zero-breach/blob/main/scan/adint_scan/cli.py"
click node_guard "https://github.com/interplains/zero-breach/blob/main/scan/adint_scan/netguard.py"
click node_indicators "https://github.com/interplains/zero-breach/blob/main/scan/adint_scan/iocs.py"
click node_iocfile "https://github.com/interplains/zero-breach/blob/main/iocs/adfection_iocs.txt"
click node_context "https://github.com/interplains/zero-breach/blob/main/scan/adint_scan/context.py"
click node_browser "https://github.com/interplains/zero-breach/blob/main/scan/adint_scan/modules/browser.py"
click node_hashscan "https://github.com/interplains/zero-breach/blob/main/scan/adint_scan/modules/hashscan.py"
click node_host "https://github.com/interplains/zero-breach/blob/main/scan/adint_scan/modules/host.py"
click node_paths "https://github.com/interplains/zero-breach/blob/main/scan/adint_scan/localpaths.py"
click node_result "https://github.com/interplains/zero-breach/blob/main/scan/adint_scan/result.py"
click node_report "https://github.com/interplains/zero-breach/blob/main/scan/adint_scan/report.py"
click node_updater "https://github.com/interplains/zero-breach/blob/main/scan/update-iocs.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_launcher,node_cli,node_guard,node_operator toneBlue
class node_browser,node_hashscan,node_host,node_paths toneAmber
class node_indicators,node_iocfile,node_context,node_result,node_report,node_reportout toneMint
class node_updater toneRose
class node_https toneIndigo
```

## Components

### Scan entry

- [CLI launcher](https://github.com/interplains/zero-breach/blob/main/scan/adint-scan.py): `scan/adint-scan.py`
- [Scan orchestrator](https://github.com/interplains/zero-breach/blob/main/scan/adint_scan/cli.py): `scan/adint_scan/cli.py`
- [Network guard](https://github.com/interplains/zero-breach/blob/main/scan/adint_scan/netguard.py): `scan/adint_scan/netguard.py`

### Local checks

- [Browser artifacts](https://github.com/interplains/zero-breach/blob/main/scan/adint_scan/modules/browser.py): `scan/adint_scan/modules/browser.py`
- [File fingerprints](https://github.com/interplains/zero-breach/blob/main/scan/adint_scan/modules/hashscan.py): `scan/adint_scan/modules/hashscan.py`
- [Host artifacts](https://github.com/interplains/zero-breach/blob/main/scan/adint_scan/modules/host.py): `scan/adint_scan/modules/host.py`
- [Safe path checks](https://github.com/interplains/zero-breach/blob/main/scan/adint_scan/localpaths.py): `scan/adint_scan/localpaths.py`

### Evidence and reporting

- [Indicator set](https://github.com/interplains/zero-breach/blob/main/scan/adint_scan/iocs.py): `scan/adint_scan/iocs.py`
- [Published indicators](https://github.com/interplains/zero-breach/blob/main/iocs/adfection_iocs.txt): `iocs/adfection_iocs.txt`
- [Scan context](https://github.com/interplains/zero-breach/blob/main/scan/adint_scan/context.py): `scan/adint_scan/context.py`
- [Graded results](https://github.com/interplains/zero-breach/blob/main/scan/adint_scan/result.py): `scan/adint_scan/result.py`
- [Report builder](https://github.com/interplains/zero-breach/blob/main/scan/adint_scan/report.py): `scan/adint_scan/report.py`
- **Human / JSON report**

### Indicator refresh

- [IOC updater](https://github.com/interplains/zero-breach/blob/main/scan/update-iocs.py): `scan/update-iocs.py`

### Other components

- **User**
- **HTTPS indicator source**

## Connections

- User → CLI launcher: starts scan (evidence: `README.md`)
- CLI launcher → Scan orchestrator: calls (evidence: `scan/adint-scan.py`)
- User → Scan orchestrator: requests refresh
- Scan orchestrator → Indicator set: loads (evidence: `scan/adint_scan/cli.py`)
- Published indicators → Indicator set: provides data (evidence: `README.md`)
- Scan orchestrator → Network guard: runs guarded (evidence: `scan/adint_scan/cli.py`)
- Scan orchestrator → Scan context: creates (evidence: `scan/adint_scan/cli.py`)
- Scan orchestrator → Browser artifacts: dispatches (evidence: `scan/adint_scan/cli.py`)
- Scan orchestrator → File fingerprints: dispatches (evidence: `scan/adint_scan/cli.py`)
- Scan orchestrator → Host artifacts: dispatches (evidence: `scan/adint_scan/cli.py`)
- Browser artifacts → Scan context: reads (evidence: `scan/adint_scan/modules/browser.py`)
- File fingerprints → Scan context: reads (evidence: `scan/adint_scan/modules/hashscan.py`)
- Host artifacts → Scan context: reads (evidence: `scan/adint_scan/modules/host.py`)
- Browser artifacts → Safe path checks: checks paths (evidence: `scan/adint_scan/modules/browser.py`)
- File fingerprints → Safe path checks: checks paths (evidence: `scan/adint_scan/modules/hashscan.py`)
- Host artifacts → Safe path checks: checks paths (evidence: `scan/adint_scan/modules/host.py`)
- Browser artifacts → Graded results: records findings (evidence: `scan/adint_scan/modules/browser.py`)
- File fingerprints → Graded results: records findings (evidence: `scan/adint_scan/modules/hashscan.py`)
- Host artifacts → Graded results: records findings (evidence: `scan/adint_scan/modules/host.py`)
- Scan orchestrator → Report builder: builds report (evidence: `scan/adint_scan/cli.py`)
- Report builder → Graded results: summarizes (evidence: `scan/adint_scan/report.py`)
- Report builder → Human / JSON report: renders
- IOC updater → HTTPS indicator source: fetches indicators (evidence: `scan/update-iocs.py`)
- IOC updater → Published indicators: refreshes (evidence: `README.md`)
