# hckr-zahid/secauto architecture

> Architecture diagram of the GitHub repository hckr-zahid/secauto, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-17). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/hckr-zahid/secauto
- Repository: https://github.com/hckr-zahid/secauto

## Overview

SecAuto is a SOAR framework: analysts or SIEM/EDR webhook senders initiate playbooks or quick triage; YAML is parsed into models, then the engine runs conditional, context-propagating actions across enrichment, analysis, scanning, containment, and notification, with reports for operators and SIEM ingestion. The graph reflects direct calls shown in excerpts and README-documented capabilities; unshown integrations and implementation details are omitted rather than inferred.

Main entry points: [`src/secauto/core/engine.py`](https://github.com/hckr-zahid/secauto/blob/main/src/secauto/core/engine.py) (Execution engine), [`src/secauto/cli.py`](https://github.com/hckr-zahid/secauto/blob/main/src/secauto/cli.py) (CLI commands), [`src/secauto/server/app.py`](https://github.com/hckr-zahid/secauto/blob/main/src/secauto/server/app.py) (Webhook listener), [`src/secauto/core/parser.py`](https://github.com/hckr-zahid/secauto/blob/main/src/secauto/core/parser.py) (Playbook parser)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["Inputs and entrypoints"]
  node_cli["CLI commands<br/>[cli.py]"]
  node_webhook["Webhook listener<br/>[app.py]"]
end

subgraph group_workflow["Playbook orchestration"]
  node_playbooks["YAML playbooks"]
  node_parser["Playbook parser<br/>[parser.py]"]
  node_models["Workflow models<br/>[models.py]"]
  node_engine["Execution engine<br/>[engine.py]"]
  node_config["Settings and paths<br/>[config.py]"]
end

subgraph group_actions["Security actions"]
  node_intel["IOC enrichment<br/>[threat_intel.py]"]
  node_email["Phishing analysis<br/>[email_analyzer.py]"]
  node_network["Network and TLS audit<br/>[network_scanner.py]"]
  node_contain["Host containment<br/>[containment.py]"]
  node_notify["Alert dispatch<br/>[notifier.py]"]
end

subgraph group_outputs["Response and reporting"]
  node_reporter["Report generator<br/>[reporter.py]"]
  node_reports["HTML and JSON reports"]
end

node_analyst(("SOC analyst"))
node_siem(("SIEM / EDR"))
node_firewall["Host firewall"]
node_account["Local account system"]
node_external_intel["Threat-intel services"]
node_collaboration["Chat / webhook endpoints"]
node_siem_feed(("SIEM ingestion feed"))

node_analyst -->|"runs commands"| node_cli
node_siem -->|"posts alerts"| node_webhook
node_cli -->|"loads playbook"| node_parser
node_cli -->|"executes playbook"| node_engine
node_cli -->|"runs quick lookup"| node_intel
node_cli -->|"runs email analysis"| node_email
node_cli -->|"runs TLS check"| node_network
node_cli -->|"starts listener"| node_webhook
node_playbooks -->|"provides definitions"| node_parser
node_parser -->|"constructs definitions"| node_models
node_webhook -->|"loads playbook"| node_parser
node_webhook -->|"executes alert"| node_engine
node_webhook -->|"uses playbook path"| node_config
node_engine -->|"builds results"| node_models
node_engine -->|"resolves variables"| node_parser
node_engine -->|"dispatches actions"| node_intel
node_engine -->|"dispatches actions"| node_email
node_engine -->|"dispatches actions"| node_network
node_engine -->|"dispatches actions"| node_contain
node_engine -->|"dispatches actions"| node_notify
node_engine -->|"returns execution result"| node_reporter
node_cli -->|"exports reports"| node_reporter
node_reporter -->|"writes HTML and JSON"| node_reports
node_reporter -->|"formats JSON feed"| node_siem_feed
node_contain -->|"blocks addresses"| node_firewall
node_contain -->|"locks accounts"| node_account
node_notify -->|"sends alerts"| node_collaboration
node_intel -.->|"enriches indicators"| node_external_intel

click node_cli "https://github.com/hckr-zahid/secauto/blob/main/src/secauto/cli.py"
click node_webhook "https://github.com/hckr-zahid/secauto/blob/main/src/secauto/server/app.py"
click node_playbooks "https://github.com/hckr-zahid/secauto/tree/main/playbooks"
click node_parser "https://github.com/hckr-zahid/secauto/blob/main/src/secauto/core/parser.py"
click node_models "https://github.com/hckr-zahid/secauto/blob/main/src/secauto/core/models.py"
click node_engine "https://github.com/hckr-zahid/secauto/blob/main/src/secauto/core/engine.py"
click node_config "https://github.com/hckr-zahid/secauto/blob/main/src/secauto/config.py"
click node_intel "https://github.com/hckr-zahid/secauto/blob/main/src/secauto/modules/threat_intel.py"
click node_email "https://github.com/hckr-zahid/secauto/blob/main/src/secauto/modules/email_analyzer.py"
click node_network "https://github.com/hckr-zahid/secauto/blob/main/src/secauto/modules/network_scanner.py"
click node_contain "https://github.com/hckr-zahid/secauto/blob/main/src/secauto/modules/containment.py"
click node_notify "https://github.com/hckr-zahid/secauto/blob/main/src/secauto/modules/notifier.py"
click node_reporter "https://github.com/hckr-zahid/secauto/blob/main/src/secauto/core/reporter.py"
click node_reports "https://github.com/hckr-zahid/secauto/tree/main/reports"

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_webhook toneBlue
class node_playbooks,node_parser,node_models,node_engine,node_config toneAmber
class node_intel,node_email,node_network,node_contain,node_notify,node_collaboration toneMint
class node_reporter,node_reports toneRose
class node_analyst,node_siem,node_firewall,node_account,node_external_intel,node_siem_feed toneIndigo
```

## Components

### Inputs and entrypoints

- [CLI commands](https://github.com/hckr-zahid/secauto/blob/main/src/secauto/cli.py): `src/secauto/cli.py`
- [Webhook listener](https://github.com/hckr-zahid/secauto/blob/main/src/secauto/server/app.py): `src/secauto/server/app.py`

### Playbook orchestration

- [YAML playbooks](https://github.com/hckr-zahid/secauto/tree/main/playbooks): `playbooks`
- [Playbook parser](https://github.com/hckr-zahid/secauto/blob/main/src/secauto/core/parser.py): `src/secauto/core/parser.py`
- [Workflow models](https://github.com/hckr-zahid/secauto/blob/main/src/secauto/core/models.py): `src/secauto/core/models.py`
- [Execution engine](https://github.com/hckr-zahid/secauto/blob/main/src/secauto/core/engine.py): `src/secauto/core/engine.py`
- [Settings and paths](https://github.com/hckr-zahid/secauto/blob/main/src/secauto/config.py): `src/secauto/config.py`

### Security actions

- [IOC enrichment](https://github.com/hckr-zahid/secauto/blob/main/src/secauto/modules/threat_intel.py): `src/secauto/modules/threat_intel.py`
- [Phishing analysis](https://github.com/hckr-zahid/secauto/blob/main/src/secauto/modules/email_analyzer.py): `src/secauto/modules/email_analyzer.py`
- [Network and TLS audit](https://github.com/hckr-zahid/secauto/blob/main/src/secauto/modules/network_scanner.py): `src/secauto/modules/network_scanner.py`
- [Host containment](https://github.com/hckr-zahid/secauto/blob/main/src/secauto/modules/containment.py): `src/secauto/modules/containment.py`
- [Alert dispatch](https://github.com/hckr-zahid/secauto/blob/main/src/secauto/modules/notifier.py): `src/secauto/modules/notifier.py`

### Response and reporting

- [Report generator](https://github.com/hckr-zahid/secauto/blob/main/src/secauto/core/reporter.py): `src/secauto/core/reporter.py`
- [HTML and JSON reports](https://github.com/hckr-zahid/secauto/tree/main/reports): `reports`

### Other components

- **SOC analyst**
- **SIEM / EDR**
- **Host firewall**
- **Local account system**
- **Threat-intel services**
- **Chat / webhook endpoints**
- **SIEM ingestion feed**

## Connections

- SOC analyst → CLI commands: runs commands (evidence: `README.md`)
- SIEM / EDR → Webhook listener: posts alerts (evidence: `README.md`)
- CLI commands → Playbook parser: loads playbook (evidence: `src/secauto/cli.py`)
- CLI commands → Execution engine: executes playbook (evidence: `src/secauto/cli.py`)
- CLI commands → IOC enrichment: runs quick lookup (evidence: `src/secauto/cli.py`)
- CLI commands → Phishing analysis: runs email analysis (evidence: `src/secauto/cli.py`)
- CLI commands → Network and TLS audit: runs TLS check (evidence: `src/secauto/cli.py`)
- CLI commands → Webhook listener: starts listener (evidence: `src/secauto/cli.py`)
- YAML playbooks → Playbook parser: provides definitions (evidence: `README.md`)
- Playbook parser → Workflow models: constructs definitions (evidence: `src/secauto/core/parser.py`)
- Webhook listener → Playbook parser: loads playbook (evidence: `src/secauto/server/app.py`)
- Webhook listener → Execution engine: executes alert (evidence: `src/secauto/server/app.py`)
- Webhook listener → Settings and paths: uses playbook path (evidence: `src/secauto/server/app.py`)
- Execution engine → Workflow models: builds results (evidence: `src/secauto/core/engine.py`)
- Execution engine → Playbook parser: resolves variables (evidence: `src/secauto/core/engine.py`)
- Execution engine → IOC enrichment: dispatches actions (evidence: `src/secauto/core/engine.py`)
- Execution engine → Phishing analysis: dispatches actions (evidence: `src/secauto/core/engine.py`)
- Execution engine → Network and TLS audit: dispatches actions (evidence: `src/secauto/core/engine.py`)
- Execution engine → Host containment: dispatches actions (evidence: `src/secauto/core/engine.py`)
- Execution engine → Alert dispatch: dispatches actions (evidence: `src/secauto/core/engine.py`)
- Execution engine → Report generator: returns execution result (evidence: `src/secauto/cli.py`)
- CLI commands → Report generator: exports reports (evidence: `src/secauto/cli.py`)
- Report generator → HTML and JSON reports: writes HTML and JSON (evidence: `src/secauto/core/reporter.py`)
- Report generator → SIEM ingestion feed: formats JSON feed (evidence: `README.md`)
- Host containment → Host firewall: blocks addresses (evidence: `src/secauto/modules/containment.py`)
- Host containment → Local account system: locks accounts (evidence: `src/secauto/modules/containment.py`)
- Alert dispatch → Chat / webhook endpoints: sends alerts (evidence: `src/secauto/modules/notifier.py`)
- IOC enrichment → Threat-intel services: enriches indicators (evidence: `README.md`)
