# kaithepallivijayvardhan08-spec/shadow-linux-hardening-tool architecture

> Architecture diagram of the GitHub repository kaithepallivijayvardhan08-spec/shadow-linux-hardening-tool, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-10). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/kaithepallivijayvardhan08-spec/shadow-linux-hardening-tool
- Repository: https://github.com/kaithepallivijayvardhan08-spec/shadow-linux-hardening-tool

## Overview

SHADOW is a terminal-based Linux security assessment and hardening framework. Its principal workflow starts with a CLI request, runs checks across security domains, assesses risk, and presents results in terminal and generated reports; hardening and restore are separate user-invoked workflows. The graph preserves the README’s documented security categories and capabilities. Some subsystem dispatches are documented but their implementation wiring is not shown, so those edges are dashed with no evidence path.

Main entry points: [`shadow/core/scanner.py`](https://github.com/kaithepallivijayvardhan08-spec/shadow-linux-hardening-tool/blob/main/shadow/core/scanner.py) (System scanner), [`shadow/main.py`](https://github.com/kaithepallivijayvardhan08-spec/shadow-linux-hardening-tool/blob/main/shadow/main.py) (CLI entry), [`shadow/core/engine.py`](https://github.com/kaithepallivijayvardhan08-spec/shadow-linux-hardening-tool/blob/main/shadow/core/engine.py) (Operation engine), [`shadow/core/hardener.py`](https://github.com/kaithepallivijayvardhan08-spec/shadow-linux-hardening-tool/blob/main/shadow/core/hardener.py) (Hardening engine)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["CLI and orchestration"]
  node_cli["CLI entry<br/>[main.py]"]
  node_engine["Operation engine<br/>[engine.py]"]
end

subgraph group_assessment["Assessment and risk"]
  node_scanner["System scanner<br/>[scanner.py]"]
  node_risk["Risk engine<br/>[risk_engine.py]"]
  node_display["Terminal HUD<br/>[cyborg_display.py]"]
end

subgraph group_security["Security domains"]
  node_authentication["Authentication"]
  node_remote["Remote access"]
  node_network["Network security"]
  node_file["File security"]
  node_services["Service security"]
  node_storage["Storage security"]
  node_monitoring["Monitoring"]
  node_updates["Package updates"]
  node_kernel["Kernel security"]
  node_processes["Process security"]
  node_audit["System audit"]
  node_access["Access control"]
  node_scheduled["Scheduled tasks"]
  node_integrity["File integrity"]
end

subgraph group_remediation["Remediation and output"]
  node_hardener["Hardening engine<br/>[hardener.py]"]
  node_restore["Restore manager<br/>[restore.py]"]
  node_terminal["Terminal report<br/>[terminal_report.py]"]
  node_json["JSON report<br/>[json_report.py]"]
  node_html["HTML report<br/>[html_report.py]"]
  node_pdf["PDF report<br/>[pdf_report.py]"]
end

node_operator(("Security operator"))

node_operator -->|"requests operation"| node_cli
node_cli -->|"starts scan"| node_engine
node_cli -->|"starts restore"| node_restore
node_engine -.->|"runs checks"| node_scanner
node_scanner -.->|"checks domain"| node_authentication
node_scanner -.->|"checks domain"| node_remote
node_scanner -.->|"checks domain"| node_network
node_scanner -.->|"checks domain"| node_file
node_scanner -.->|"checks domain"| node_services
node_scanner -.->|"checks domain"| node_storage
node_scanner -.->|"checks domain"| node_monitoring
node_scanner -.->|"checks domain"| node_updates
node_scanner -.->|"checks domain"| node_kernel
node_scanner -.->|"checks domain"| node_processes
node_scanner -.->|"checks domain"| node_audit
node_scanner -.->|"checks domain"| node_access
node_scanner -.->|"checks domain"| node_scheduled
node_scanner -.->|"checks domain"| node_integrity
node_engine -.->|"assesses findings"| node_risk
node_scanner -->|"updates display"| node_display
node_engine -->|"renders results"| node_terminal
node_cli -.->|"starts hardening"| node_hardener
node_hardener -->|"uses detection"| node_integrity
node_cli -->|"requests report"| node_terminal
node_cli -.->|"generates report"| node_json
node_cli -.->|"generates report"| node_html
node_cli -.->|"generates report"| node_pdf

click node_cli "https://github.com/kaithepallivijayvardhan08-spec/shadow-linux-hardening-tool/blob/main/shadow/main.py"
click node_engine "https://github.com/kaithepallivijayvardhan08-spec/shadow-linux-hardening-tool/blob/main/shadow/core/engine.py"
click node_scanner "https://github.com/kaithepallivijayvardhan08-spec/shadow-linux-hardening-tool/blob/main/shadow/core/scanner.py"
click node_risk "https://github.com/kaithepallivijayvardhan08-spec/shadow-linux-hardening-tool/blob/main/shadow/core/risk_engine.py"
click node_display "https://github.com/kaithepallivijayvardhan08-spec/shadow-linux-hardening-tool/blob/main/shadow/core/cyborg_display.py"
click node_authentication "https://github.com/kaithepallivijayvardhan08-spec/shadow-linux-hardening-tool/tree/main/shadow/modules/authentication"
click node_remote "https://github.com/kaithepallivijayvardhan08-spec/shadow-linux-hardening-tool/tree/main/shadow/modules/remote_access"
click node_network "https://github.com/kaithepallivijayvardhan08-spec/shadow-linux-hardening-tool/tree/main/shadow/modules/network"
click node_file "https://github.com/kaithepallivijayvardhan08-spec/shadow-linux-hardening-tool/tree/main/shadow/modules/file_security"
click node_services "https://github.com/kaithepallivijayvardhan08-spec/shadow-linux-hardening-tool/tree/main/shadow/modules/services"
click node_storage "https://github.com/kaithepallivijayvardhan08-spec/shadow-linux-hardening-tool/tree/main/shadow/modules/storage"
click node_monitoring "https://github.com/kaithepallivijayvardhan08-spec/shadow-linux-hardening-tool/tree/main/shadow/modules/monitoring"
click node_updates "https://github.com/kaithepallivijayvardhan08-spec/shadow-linux-hardening-tool/tree/main/shadow/modules/updates"
click node_kernel "https://github.com/kaithepallivijayvardhan08-spec/shadow-linux-hardening-tool/tree/main/shadow/modules/kernel"
click node_processes "https://github.com/kaithepallivijayvardhan08-spec/shadow-linux-hardening-tool/tree/main/shadow/modules/processes"
click node_audit "https://github.com/kaithepallivijayvardhan08-spec/shadow-linux-hardening-tool/tree/main/shadow/modules/audit"
click node_access "https://github.com/kaithepallivijayvardhan08-spec/shadow-linux-hardening-tool/tree/main/shadow/modules/access_control"
click node_scheduled "https://github.com/kaithepallivijayvardhan08-spec/shadow-linux-hardening-tool/tree/main/shadow/modules/scheduled_tasks"
click node_integrity "https://github.com/kaithepallivijayvardhan08-spec/shadow-linux-hardening-tool/tree/main/shadow/modules/integrity"
click node_hardener "https://github.com/kaithepallivijayvardhan08-spec/shadow-linux-hardening-tool/blob/main/shadow/core/hardener.py"
click node_restore "https://github.com/kaithepallivijayvardhan08-spec/shadow-linux-hardening-tool/blob/main/shadow/core/restore.py"
click node_terminal "https://github.com/kaithepallivijayvardhan08-spec/shadow-linux-hardening-tool/blob/main/shadow/reports/terminal_report.py"
click node_json "https://github.com/kaithepallivijayvardhan08-spec/shadow-linux-hardening-tool/blob/main/shadow/reports/json_report.py"
click node_html "https://github.com/kaithepallivijayvardhan08-spec/shadow-linux-hardening-tool/blob/main/shadow/reports/html_report.py"
click node_pdf "https://github.com/kaithepallivijayvardhan08-spec/shadow-linux-hardening-tool/blob/main/shadow/reports/pdf_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_cli,node_engine toneBlue
class node_scanner,node_risk,node_display toneAmber
class node_authentication,node_remote,node_network,node_file,node_services,node_storage,node_monitoring,node_updates,node_kernel,node_processes,node_audit,node_access,node_scheduled,node_integrity toneMint
class node_hardener,node_restore,node_terminal,node_json,node_html,node_pdf toneRose
class node_operator toneIndigo
```

## Components

### CLI and orchestration

- [CLI entry](https://github.com/kaithepallivijayvardhan08-spec/shadow-linux-hardening-tool/blob/main/shadow/main.py): `shadow/main.py`
- [Operation engine](https://github.com/kaithepallivijayvardhan08-spec/shadow-linux-hardening-tool/blob/main/shadow/core/engine.py): `shadow/core/engine.py`

### Assessment and risk

- [System scanner](https://github.com/kaithepallivijayvardhan08-spec/shadow-linux-hardening-tool/blob/main/shadow/core/scanner.py): `shadow/core/scanner.py`
- [Risk engine](https://github.com/kaithepallivijayvardhan08-spec/shadow-linux-hardening-tool/blob/main/shadow/core/risk_engine.py): `shadow/core/risk_engine.py`
- [Terminal HUD](https://github.com/kaithepallivijayvardhan08-spec/shadow-linux-hardening-tool/blob/main/shadow/core/cyborg_display.py): `shadow/core/cyborg_display.py`

### Security domains

- [Authentication](https://github.com/kaithepallivijayvardhan08-spec/shadow-linux-hardening-tool/tree/main/shadow/modules/authentication): `shadow/modules/authentication`
- [Remote access](https://github.com/kaithepallivijayvardhan08-spec/shadow-linux-hardening-tool/tree/main/shadow/modules/remote_access): `shadow/modules/remote_access`
- [Network security](https://github.com/kaithepallivijayvardhan08-spec/shadow-linux-hardening-tool/tree/main/shadow/modules/network): `shadow/modules/network`
- [File security](https://github.com/kaithepallivijayvardhan08-spec/shadow-linux-hardening-tool/tree/main/shadow/modules/file_security): `shadow/modules/file_security`
- [Service security](https://github.com/kaithepallivijayvardhan08-spec/shadow-linux-hardening-tool/tree/main/shadow/modules/services): `shadow/modules/services`
- [Storage security](https://github.com/kaithepallivijayvardhan08-spec/shadow-linux-hardening-tool/tree/main/shadow/modules/storage): `shadow/modules/storage`
- [Monitoring](https://github.com/kaithepallivijayvardhan08-spec/shadow-linux-hardening-tool/tree/main/shadow/modules/monitoring): `shadow/modules/monitoring`
- [Package updates](https://github.com/kaithepallivijayvardhan08-spec/shadow-linux-hardening-tool/tree/main/shadow/modules/updates): `shadow/modules/updates`
- [Kernel security](https://github.com/kaithepallivijayvardhan08-spec/shadow-linux-hardening-tool/tree/main/shadow/modules/kernel): `shadow/modules/kernel`
- [Process security](https://github.com/kaithepallivijayvardhan08-spec/shadow-linux-hardening-tool/tree/main/shadow/modules/processes): `shadow/modules/processes`
- [System audit](https://github.com/kaithepallivijayvardhan08-spec/shadow-linux-hardening-tool/tree/main/shadow/modules/audit): `shadow/modules/audit`
- [Access control](https://github.com/kaithepallivijayvardhan08-spec/shadow-linux-hardening-tool/tree/main/shadow/modules/access_control): `shadow/modules/access_control`
- [Scheduled tasks](https://github.com/kaithepallivijayvardhan08-spec/shadow-linux-hardening-tool/tree/main/shadow/modules/scheduled_tasks): `shadow/modules/scheduled_tasks`
- [File integrity](https://github.com/kaithepallivijayvardhan08-spec/shadow-linux-hardening-tool/tree/main/shadow/modules/integrity): `shadow/modules/integrity`

### Remediation and output

- [Hardening engine](https://github.com/kaithepallivijayvardhan08-spec/shadow-linux-hardening-tool/blob/main/shadow/core/hardener.py): `shadow/core/hardener.py`
- [Restore manager](https://github.com/kaithepallivijayvardhan08-spec/shadow-linux-hardening-tool/blob/main/shadow/core/restore.py): `shadow/core/restore.py`
- [Terminal report](https://github.com/kaithepallivijayvardhan08-spec/shadow-linux-hardening-tool/blob/main/shadow/reports/terminal_report.py): `shadow/reports/terminal_report.py`
- [JSON report](https://github.com/kaithepallivijayvardhan08-spec/shadow-linux-hardening-tool/blob/main/shadow/reports/json_report.py): `shadow/reports/json_report.py`
- [HTML report](https://github.com/kaithepallivijayvardhan08-spec/shadow-linux-hardening-tool/blob/main/shadow/reports/html_report.py): `shadow/reports/html_report.py`
- [PDF report](https://github.com/kaithepallivijayvardhan08-spec/shadow-linux-hardening-tool/blob/main/shadow/reports/pdf_report.py): `shadow/reports/pdf_report.py`

### Other components

- **Security operator**

## Connections

- Security operator → CLI entry: requests operation
- CLI entry → Operation engine: starts scan (evidence: `shadow/main.py`)
- CLI entry → Restore manager: starts restore (evidence: `shadow/main.py`)
- Operation engine → System scanner: runs checks
- System scanner → Authentication: checks domain
- System scanner → Remote access: checks domain
- System scanner → Network security: checks domain
- System scanner → File security: checks domain
- System scanner → Service security: checks domain
- System scanner → Storage security: checks domain
- System scanner → Monitoring: checks domain
- System scanner → Package updates: checks domain
- System scanner → Kernel security: checks domain
- System scanner → Process security: checks domain
- System scanner → System audit: checks domain
- System scanner → Access control: checks domain
- System scanner → Scheduled tasks: checks domain
- System scanner → File integrity: checks domain
- Operation engine → Risk engine: assesses findings
- System scanner → Terminal HUD: updates display (evidence: `shadow/core/scanner.py`)
- Operation engine → Terminal report: renders results (evidence: `shadow/core/engine.py`)
- CLI entry → Hardening engine: starts hardening
- Hardening engine → File integrity: uses detection (evidence: `shadow/core/hardener.py`)
- CLI entry → Terminal report: requests report (evidence: `shadow/main.py`)
- CLI entry → JSON report: generates report
- CLI entry → HTML report: generates report
- CLI entry → PDF report: generates report
