# timthebeastnl/nginx2root architecture

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

## Overview

nginx2root-scanner is a small Bash-based nginx exposure checker with two distinct workflows: a remote, non-exploitative scan of externally visible surfaces, and a local, read-only check of the installed nginx version and active configuration. The README documents the capabilities and their inputs; no source excerpts were provided, so internal call relationships are not inferred.

Main entry points: [`nginx2root-surface.sh`](https://github.com/timthebeastnl/nginx2root/blob/main/nginx2root-surface.sh) (Surface scanner), [`nginx2root-check.sh`](https://github.com/timthebeastnl/nginx2root/blob/main/nginx2root-check.sh) (On-host checker)

## Diagram (Mermaid)

```mermaid
flowchart TD

node_operator(("Authorized operator"))
node_surface["Surface scanner"]
node_remote_host["Remote host"]
node_version_surface["Version and protocols"]
node_mail_surface["Mail port checks"]
node_surface_report["Surface report"]
node_host_check["On-host checker"]
node_nginx_binary["Installed nginx binary"]
node_active_config["Active nginx config"]
node_host_report["Configuration report"]

node_operator -->|"runs against"| node_surface
node_surface -->|"probes remotely"| node_remote_host
node_surface -->|"checks surface"| node_version_surface
node_surface -->|"checks ports"| node_mail_surface
node_surface -->|"reports findings"| node_surface_report
node_operator -->|"runs locally"| node_host_check
node_host_check -->|"reads version"| node_nginx_binary
node_host_check -->|"reads config"| node_active_config
node_host_check -->|"reports exposure"| node_host_report

click node_surface "https://github.com/timthebeastnl/nginx2root/blob/main/nginx2root-surface.sh"
click node_version_surface "https://github.com/timthebeastnl/nginx2root/blob/main/nginx2root-surface.sh"
click node_mail_surface "https://github.com/timthebeastnl/nginx2root/blob/main/nginx2root-surface.sh"
click node_surface_report "https://github.com/timthebeastnl/nginx2root/blob/main/nginx2root-surface.sh"
click node_host_check "https://github.com/timthebeastnl/nginx2root/blob/main/nginx2root-check.sh"
click node_host_report "https://github.com/timthebeastnl/nginx2root/blob/main/nginx2root-check.sh"

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_operator,node_remote_host,node_nginx_binary,node_active_config toneIndigo
class node_surface,node_version_surface,node_mail_surface,node_surface_report,node_host_check,node_host_report toneTeal
```

## Components

### Other components

- **Authorized operator**
- [Surface scanner](https://github.com/timthebeastnl/nginx2root/blob/main/nginx2root-surface.sh): `nginx2root-surface.sh`
- **Remote host**
- [Version and protocols](https://github.com/timthebeastnl/nginx2root/blob/main/nginx2root-surface.sh): `nginx2root-surface.sh`
- [Mail port checks](https://github.com/timthebeastnl/nginx2root/blob/main/nginx2root-surface.sh): `nginx2root-surface.sh`
- [Surface report](https://github.com/timthebeastnl/nginx2root/blob/main/nginx2root-surface.sh): `nginx2root-surface.sh`
- [On-host checker](https://github.com/timthebeastnl/nginx2root/blob/main/nginx2root-check.sh): `nginx2root-check.sh`
- **Installed nginx binary**
- **Active nginx config**
- [Configuration report](https://github.com/timthebeastnl/nginx2root/blob/main/nginx2root-check.sh): `nginx2root-check.sh`

## Connections

- Authorized operator → Surface scanner: runs against (evidence: `README.md`)
- Surface scanner → Remote host: probes remotely (evidence: `README.md`)
- Surface scanner → Version and protocols: checks surface (evidence: `README.md`)
- Surface scanner → Mail port checks: checks ports (evidence: `README.md`)
- Surface scanner → Surface report: reports findings (evidence: `README.md`)
- Authorized operator → On-host checker: runs locally (evidence: `README.md`)
- On-host checker → Installed nginx binary: reads version (evidence: `README.md`)
- On-host checker → Active nginx config: reads config (evidence: `README.md`)
- On-host checker → Configuration report: reports exposure (evidence: `README.md`)
