# rk-000/flexible-domain-vulnerability-scanner architecture

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

- Interactive diagram: https://gitdiagram.com/rk-000/flexible-domain-vulnerability-scanner
- Repository: https://github.com/rk-000/flexible-domain-vulnerability-scanner

## Overview

Flexible Domain Vulnerability Scanner turns authorized domain targets into ranked, evidence-backed vulnerability reports. Its main workflow enforces scope and resolves targets, then runs recon, port and service scans, web/TLS/DNS checks, and finally correlates findings, enriches exploitability data, compares a baseline, and writes reports. The graph follows the README’s documented pipeline; the shell orchestrator and several scan stages are represented at their exact tree paths, but their source was not sampled, so their detailed internal calls are not asserted.

Main entry points: [`domain_scanner.sh`](https://github.com/rk-000/flexible-domain-vulnerability-scanner/blob/main/domain_scanner.sh) (Scan orchestrator), [`lib/parse_report.py`](https://github.com/rk-000/flexible-domain-vulnerability-scanner/blob/main/lib/parse_report.py) (Parse and correlate), [`lib/targets.py`](https://github.com/rk-000/flexible-domain-vulnerability-scanner/blob/main/lib/targets.py) (Normalize and scope-check), [`lib/web_checks.py`](https://github.com/rk-000/flexible-domain-vulnerability-scanner/blob/main/lib/web_checks.py) (Built-in web checks)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_targeting["Targeting"]
  node_target_files["Target and scope files<br/>[domains.txt]"]
  node_scanner["Scan orchestrator<br/>[domain_scanner.sh]"]
  node_target_filter["Normalize and scope-check<br/>[targets.py]"]
end

subgraph group_scanning["Scanning"]
  node_recon["Passive recon<br/>[domain_scanner.sh]"]
  node_port_scan["Port scanning<br/>[domain_scanner.sh]"]
  node_service_scan["Service and vuln scripts<br/>[domain_scanner.sh]"]
  node_web_probe["Web probing<br/>[domain_scanner.sh]"]
  node_web_checks["Built-in web checks<br/>[web_checks.py]"]
  node_tls_scan["TLS checks<br/>[domain_scanner.sh]"]
  node_dns_checks["DNS and mail checks<br/>[dns_checks.py]"]
end

subgraph group_analysis["Analysis"]
  node_findings["Parse and correlate<br/>[parse_report.py]"]
  node_enrichment["KEV EPSS NVD<br/>[enrich.py]"]
  node_baseline["Diff and resume<br/>[domain_scanner.sh]"]
end

subgraph group_delivery["Reporting"]
  node_report_outputs["HTML JSON CSV summary<br/>[parse_report.py]"]
end

node_operator(("Authorized operator"))
node_exploit_feeds["CISA EPSS NVD feeds"]
node_scanner_tools["Nmap and scan tools"]
node_report_user(("Report consumer"))

node_operator -->|"starts scan"| node_scanner
node_target_files -->|"provides targets"| node_scanner
node_scanner -->|"checks scope"| node_target_filter
node_target_filter -->|"scope-filters"| node_recon
node_scanner -.->|"runs optional"| node_recon
node_recon -->|"returns candidates"| node_target_filter
node_scanner -->|"runs scan"| node_port_scan
node_scanner -->|"runs scan"| node_service_scan
node_scanner -->|"runs stage"| node_web_probe
node_scanner -->|"runs stage"| node_tls_scan
node_scanner -->|"runs stage"| node_dns_checks
node_scanner -.->|"runs checks"| node_web_checks
node_scanner_tools -->|"scans ports"| node_port_scan
node_scanner_tools -->|"checks services"| node_service_scan
node_web_probe -->|"produces results"| node_findings
node_web_checks -.->|"produces findings"| node_findings
node_port_scan -->|"provides scan data"| node_findings
node_service_scan -->|"provides scan data"| node_findings
node_tls_scan -->|"provides results"| node_findings
node_dns_checks -->|"provides findings"| node_findings
node_findings -->|"enriches CVEs"| node_enrichment
node_enrichment -->|"queries feeds"| node_exploit_feeds
node_scanner -->|"resumes or compares"| node_baseline
node_baseline -.->|"supplies baseline"| node_findings
node_findings -->|"writes reports"| node_report_outputs
node_report_outputs -->|"presents results"| node_report_user

click node_target_files "https://github.com/rk-000/flexible-domain-vulnerability-scanner/blob/main/domains.txt"
click node_scanner "https://github.com/rk-000/flexible-domain-vulnerability-scanner/blob/main/domain_scanner.sh"
click node_target_filter "https://github.com/rk-000/flexible-domain-vulnerability-scanner/blob/main/lib/targets.py"
click node_recon "https://github.com/rk-000/flexible-domain-vulnerability-scanner/blob/main/domain_scanner.sh"
click node_port_scan "https://github.com/rk-000/flexible-domain-vulnerability-scanner/blob/main/domain_scanner.sh"
click node_service_scan "https://github.com/rk-000/flexible-domain-vulnerability-scanner/blob/main/domain_scanner.sh"
click node_web_probe "https://github.com/rk-000/flexible-domain-vulnerability-scanner/blob/main/domain_scanner.sh"
click node_web_checks "https://github.com/rk-000/flexible-domain-vulnerability-scanner/blob/main/lib/web_checks.py"
click node_tls_scan "https://github.com/rk-000/flexible-domain-vulnerability-scanner/blob/main/domain_scanner.sh"
click node_dns_checks "https://github.com/rk-000/flexible-domain-vulnerability-scanner/blob/main/lib/dns_checks.py"
click node_findings "https://github.com/rk-000/flexible-domain-vulnerability-scanner/blob/main/lib/parse_report.py"
click node_enrichment "https://github.com/rk-000/flexible-domain-vulnerability-scanner/blob/main/lib/enrich.py"
click node_baseline "https://github.com/rk-000/flexible-domain-vulnerability-scanner/blob/main/domain_scanner.sh"
click node_report_outputs "https://github.com/rk-000/flexible-domain-vulnerability-scanner/blob/main/lib/parse_report.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_target_files,node_scanner,node_target_filter toneBlue
class node_recon,node_port_scan,node_service_scan,node_web_probe,node_web_checks,node_tls_scan,node_dns_checks toneAmber
class node_findings,node_enrichment,node_baseline toneMint
class node_report_outputs toneRose
class node_operator,node_exploit_feeds,node_scanner_tools,node_report_user toneIndigo
```

## Components

### Targeting

- [Target and scope files](https://github.com/rk-000/flexible-domain-vulnerability-scanner/blob/main/domains.txt): `domains.txt`
- [Scan orchestrator](https://github.com/rk-000/flexible-domain-vulnerability-scanner/blob/main/domain_scanner.sh): `domain_scanner.sh`
- [Normalize and scope-check](https://github.com/rk-000/flexible-domain-vulnerability-scanner/blob/main/lib/targets.py): `lib/targets.py`

### Scanning

- [Passive recon](https://github.com/rk-000/flexible-domain-vulnerability-scanner/blob/main/domain_scanner.sh): `domain_scanner.sh`
- [Port scanning](https://github.com/rk-000/flexible-domain-vulnerability-scanner/blob/main/domain_scanner.sh): `domain_scanner.sh`
- [Service and vuln scripts](https://github.com/rk-000/flexible-domain-vulnerability-scanner/blob/main/domain_scanner.sh): `domain_scanner.sh`
- [Web probing](https://github.com/rk-000/flexible-domain-vulnerability-scanner/blob/main/domain_scanner.sh): `domain_scanner.sh`
- [Built-in web checks](https://github.com/rk-000/flexible-domain-vulnerability-scanner/blob/main/lib/web_checks.py): `lib/web_checks.py`
- [TLS checks](https://github.com/rk-000/flexible-domain-vulnerability-scanner/blob/main/domain_scanner.sh): `domain_scanner.sh`
- [DNS and mail checks](https://github.com/rk-000/flexible-domain-vulnerability-scanner/blob/main/lib/dns_checks.py): `lib/dns_checks.py`

### Analysis

- [Parse and correlate](https://github.com/rk-000/flexible-domain-vulnerability-scanner/blob/main/lib/parse_report.py): `lib/parse_report.py`
- [KEV EPSS NVD](https://github.com/rk-000/flexible-domain-vulnerability-scanner/blob/main/lib/enrich.py): `lib/enrich.py`
- [Diff and resume](https://github.com/rk-000/flexible-domain-vulnerability-scanner/blob/main/domain_scanner.sh): `domain_scanner.sh`

### Reporting

- [HTML JSON CSV summary](https://github.com/rk-000/flexible-domain-vulnerability-scanner/blob/main/lib/parse_report.py): `lib/parse_report.py`

### Other components

- **Authorized operator**
- **CISA EPSS NVD feeds**
- **Nmap and scan tools**
- **Report consumer**

## Connections

- Authorized operator → Scan orchestrator: starts scan (evidence: `README.md`)
- Target and scope files → Scan orchestrator: provides targets (evidence: `README.md`)
- Scan orchestrator → Normalize and scope-check: checks scope (evidence: `README.md`)
- Normalize and scope-check → Passive recon: scope-filters (evidence: `README.md`)
- Scan orchestrator → Passive recon: runs optional
- Passive recon → Normalize and scope-check: returns candidates (evidence: `README.md`)
- Scan orchestrator → Port scanning: runs scan (evidence: `README.md`)
- Scan orchestrator → Service and vuln scripts: runs scan (evidence: `README.md`)
- Scan orchestrator → Web probing: runs stage (evidence: `README.md`)
- Scan orchestrator → TLS checks: runs stage (evidence: `README.md`)
- Scan orchestrator → DNS and mail checks: runs stage (evidence: `README.md`)
- Scan orchestrator → Built-in web checks: runs checks
- Nmap and scan tools → Port scanning: scans ports (evidence: `README.md`)
- Nmap and scan tools → Service and vuln scripts: checks services (evidence: `README.md`)
- Web probing → Parse and correlate: produces results (evidence: `README.md`)
- Built-in web checks → Parse and correlate: produces findings
- Port scanning → Parse and correlate: provides scan data (evidence: `README.md`)
- Service and vuln scripts → Parse and correlate: provides scan data (evidence: `README.md`)
- TLS checks → Parse and correlate: provides results (evidence: `README.md`)
- DNS and mail checks → Parse and correlate: provides findings (evidence: `README.md`)
- Parse and correlate → KEV EPSS NVD: enriches CVEs (evidence: `lib/parse_report.py`)
- KEV EPSS NVD → CISA EPSS NVD feeds: queries feeds (evidence: `lib/enrich.py`)
- Scan orchestrator → Diff and resume: resumes or compares (evidence: `README.md`)
- Diff and resume → Parse and correlate: supplies baseline
- Parse and correlate → HTML JSON CSV summary: writes reports (evidence: `README.md`)
- HTML JSON CSV summary → Report consumer: presents results (evidence: `README.md`)
