# fleajion/sawit-framework architecture

> Architecture diagram of the GitHub repository fleajion/sawit-framework, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-29). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/fleajion/sawit-framework
- Repository: https://github.com/fleajion/sawit-framework

## Overview

SAWIT is a CLI framework for target reconnaissance and attack-surface reporting. The user supplies a host or URL; the CLI normalizes it, loads YAML configuration, and starts the pipeline engine. The engine dispatches configured stages, collecting per-stage state and workspace artifacts; full scans merge outputs and render reports, while DNS/IP-only mode runs passive collection and skips report generation. README-listed discovery stages are represented at the shared module path, but their individual implementations and wiring were not fully sampled.

Main entry points: [`sawit/engine.py`](https://github.com/fleajion/sawit-framework/blob/main/sawit/engine.py) (Pipeline Engine), [`sawit/core.py`](https://github.com/fleajion/sawit-framework/blob/main/sawit/core.py) (Scan Setup), [`sawit/modules.py`](https://github.com/fleajion/sawit-framework/blob/main/sawit/modules.py) (Passive Recon), [`sawit-tools.py`](https://github.com/fleajion/sawit-framework/blob/main/sawit-tools.py) (CLI)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["Entry and Setup"]
  node_cli["CLI<br/>[sawit-tools.py]"]
  node_core["Scan Setup<br/>[core.py]"]
  node_config["Configuration Loader<br/>[config.py]"]
end

subgraph group_pipeline["Recon Pipeline"]
  node_engine["Pipeline Engine<br/>[engine.py]"]
  node_scope["Scope Validation<br/>[modules.py]"]
  node_passive["Passive Recon<br/>[modules.py]"]
  node_active["Active Recon<br/>[modules.py]"]
  node_content["Content Discovery<br/>[modules.py]"]
  node_javascript["JavaScript Recon<br/>[modules.py]"]
  node_parameters["Parameter Discovery<br/>[modules.py]"]
  node_api["API Enumeration<br/>[modules.py]"]
  node_authentication["Authentication Mapping<br/>[modules.py]"]
  node_storage["Storage Discovery<br/>[modules.py]"]
  node_admin["Admin Discovery<br/>[modules.py]"]
  node_cloud["Cloud Discovery<br/>[modules.py]"]
end

subgraph group_analysis["Correlation and Analysis"]
  node_mapping["Attack Surface Mapping<br/>[modules.py]"]
  node_security["Security Analysis<br/>[modules.py]"]
  node_summary["Summary<br/>[modules.py]"]
  node_normalizer["Output Merger<br/>[normalize.py]"]
end

subgraph group_outputs["Outputs"]
  node_renderer["Report Renderer<br/>[renderer.py]"]
  node_workspace[("Scan Workspace")]
end

node_user(("User / Team"))
node_dns(("DNS Infrastructure"))
node_target(("Target Website"))

node_user -->|"provides target"| node_cli
node_cli -->|"starts scan"| node_core
node_core -->|"loads settings"| node_config
node_core -->|"starts pipeline"| node_engine
node_core -->|"creates workspace"| node_workspace
node_engine -->|"dispatches stage"| node_scope
node_engine -->|"dispatches stage"| node_passive
node_engine -->|"dispatches stage"| node_active
node_engine -->|"dispatches stage"| node_content
node_engine -->|"dispatches stage"| node_javascript
node_engine -->|"dispatches stage"| node_parameters
node_engine -->|"dispatches stage"| node_api
node_engine -->|"dispatches stage"| node_authentication
node_engine -->|"dispatches stage"| node_storage
node_engine -->|"dispatches stage"| node_admin
node_engine -->|"dispatches stage"| node_cloud
node_engine -->|"dispatches stage"| node_mapping
node_engine -->|"dispatches stage"| node_security
node_engine -->|"dispatches stage"| node_summary
node_engine -->|"passes workspace"| node_workspace
node_passive -->|"queries records"| node_dns
node_passive -->|"probes host"| node_target
node_active -->|"inspects site"| node_target
node_javascript -->|"renders pages"| node_target
node_engine -->|"merges outputs"| node_normalizer
node_normalizer -->|"reads JSON"| node_workspace
node_engine -->|"renders reports"| node_renderer
node_renderer -->|"writes artifacts"| node_workspace

click node_cli "https://github.com/fleajion/sawit-framework/blob/main/sawit-tools.py"
click node_core "https://github.com/fleajion/sawit-framework/blob/main/sawit/core.py"
click node_config "https://github.com/fleajion/sawit-framework/blob/main/sawit/config.py"
click node_engine "https://github.com/fleajion/sawit-framework/blob/main/sawit/engine.py"
click node_scope "https://github.com/fleajion/sawit-framework/blob/main/sawit/modules.py"
click node_passive "https://github.com/fleajion/sawit-framework/blob/main/sawit/modules.py"
click node_active "https://github.com/fleajion/sawit-framework/blob/main/sawit/modules.py"
click node_content "https://github.com/fleajion/sawit-framework/blob/main/sawit/modules.py"
click node_javascript "https://github.com/fleajion/sawit-framework/blob/main/sawit/modules.py"
click node_parameters "https://github.com/fleajion/sawit-framework/blob/main/sawit/modules.py"
click node_api "https://github.com/fleajion/sawit-framework/blob/main/sawit/modules.py"
click node_authentication "https://github.com/fleajion/sawit-framework/blob/main/sawit/modules.py"
click node_storage "https://github.com/fleajion/sawit-framework/blob/main/sawit/modules.py"
click node_admin "https://github.com/fleajion/sawit-framework/blob/main/sawit/modules.py"
click node_cloud "https://github.com/fleajion/sawit-framework/blob/main/sawit/modules.py"
click node_mapping "https://github.com/fleajion/sawit-framework/blob/main/sawit/modules.py"
click node_security "https://github.com/fleajion/sawit-framework/blob/main/sawit/modules.py"
click node_summary "https://github.com/fleajion/sawit-framework/blob/main/sawit/modules.py"
click node_normalizer "https://github.com/fleajion/sawit-framework/blob/main/sawit/normalize.py"
click node_renderer "https://github.com/fleajion/sawit-framework/blob/main/sawit/renderer.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_core,node_config,node_user toneBlue
class node_engine,node_scope,node_passive,node_active,node_content,node_javascript,node_parameters,node_api,node_authentication,node_storage,node_admin,node_cloud toneAmber
class node_mapping,node_security,node_summary,node_normalizer toneMint
class node_renderer,node_workspace toneRose
class node_dns,node_target toneIndigo
```

## Components

### Entry and Setup

- [CLI](https://github.com/fleajion/sawit-framework/blob/main/sawit-tools.py): `sawit-tools.py`
- [Scan Setup](https://github.com/fleajion/sawit-framework/blob/main/sawit/core.py): `sawit/core.py`
- [Configuration Loader](https://github.com/fleajion/sawit-framework/blob/main/sawit/config.py): `sawit/config.py`

### Recon Pipeline

- [Pipeline Engine](https://github.com/fleajion/sawit-framework/blob/main/sawit/engine.py): `sawit/engine.py`
- [Scope Validation](https://github.com/fleajion/sawit-framework/blob/main/sawit/modules.py): `sawit/modules.py`
- [Passive Recon](https://github.com/fleajion/sawit-framework/blob/main/sawit/modules.py): `sawit/modules.py`
- [Active Recon](https://github.com/fleajion/sawit-framework/blob/main/sawit/modules.py): `sawit/modules.py`
- [Content Discovery](https://github.com/fleajion/sawit-framework/blob/main/sawit/modules.py): `sawit/modules.py`
- [JavaScript Recon](https://github.com/fleajion/sawit-framework/blob/main/sawit/modules.py): `sawit/modules.py`
- [Parameter Discovery](https://github.com/fleajion/sawit-framework/blob/main/sawit/modules.py): `sawit/modules.py`
- [API Enumeration](https://github.com/fleajion/sawit-framework/blob/main/sawit/modules.py): `sawit/modules.py`
- [Authentication Mapping](https://github.com/fleajion/sawit-framework/blob/main/sawit/modules.py): `sawit/modules.py`
- [Storage Discovery](https://github.com/fleajion/sawit-framework/blob/main/sawit/modules.py): `sawit/modules.py`
- [Admin Discovery](https://github.com/fleajion/sawit-framework/blob/main/sawit/modules.py): `sawit/modules.py`
- [Cloud Discovery](https://github.com/fleajion/sawit-framework/blob/main/sawit/modules.py): `sawit/modules.py`

### Correlation and Analysis

- [Attack Surface Mapping](https://github.com/fleajion/sawit-framework/blob/main/sawit/modules.py): `sawit/modules.py`
- [Security Analysis](https://github.com/fleajion/sawit-framework/blob/main/sawit/modules.py): `sawit/modules.py`
- [Summary](https://github.com/fleajion/sawit-framework/blob/main/sawit/modules.py): `sawit/modules.py`
- [Output Merger](https://github.com/fleajion/sawit-framework/blob/main/sawit/normalize.py): `sawit/normalize.py`

### Outputs

- [Report Renderer](https://github.com/fleajion/sawit-framework/blob/main/sawit/renderer.py): `sawit/renderer.py`
- **Scan Workspace**

### Other components

- **User / Team**
- **DNS Infrastructure**
- **Target Website**

## Connections

- User / Team → CLI: provides target
- CLI → Scan Setup: starts scan
- Scan Setup → Configuration Loader: loads settings
- Scan Setup → Pipeline Engine: starts pipeline
- Scan Setup → Scan Workspace: creates workspace
- Pipeline Engine → Scope Validation: dispatches stage
- Pipeline Engine → Passive Recon: dispatches stage
- Pipeline Engine → Active Recon: dispatches stage
- Pipeline Engine → Content Discovery: dispatches stage
- Pipeline Engine → JavaScript Recon: dispatches stage
- Pipeline Engine → Parameter Discovery: dispatches stage
- Pipeline Engine → API Enumeration: dispatches stage
- Pipeline Engine → Authentication Mapping: dispatches stage
- Pipeline Engine → Storage Discovery: dispatches stage
- Pipeline Engine → Admin Discovery: dispatches stage
- Pipeline Engine → Cloud Discovery: dispatches stage
- Pipeline Engine → Attack Surface Mapping: dispatches stage
- Pipeline Engine → Security Analysis: dispatches stage
- Pipeline Engine → Summary: dispatches stage
- Pipeline Engine → Scan Workspace: passes workspace
- Passive Recon → DNS Infrastructure: queries records
- Passive Recon → Target Website: probes host
- Active Recon → Target Website: inspects site
- JavaScript Recon → Target Website: renders pages
- Pipeline Engine → Output Merger: merges outputs
- Output Merger → Scan Workspace: reads JSON
- Pipeline Engine → Report Renderer: renders reports
- Report Renderer → Scan Workspace: writes artifacts
