# richssa24/sentinel_linux2.0 architecture

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

- Interactive diagram: https://gitdiagram.com/richssa24/sentinel_linux2.0
- Repository: https://github.com/richssa24/sentinel_linux2.0

## Overview

Sentinel-Linux is an async Linux host-based intrusion detection system. Host collectors produce security observations that are normalized into ECS events, passed through a bounded, deduplicating pipeline, matched against declarative ATT&CK-mapped rules, and promoted to alerts for sink delivery. In parallel, events and alerts are persisted for authenticated API queries; Prometheus metrics expose operational state. The README documents this end-to-end wiring, and the source index identifies the runtime composition root. Some subsystem internals were not excerpted, so edges for those documented capabilities cite the README rather than implying source inspection.

Main entry points: [`src/sentinel/alerting/manager.py`](https://github.com/richssa24/sentinel_linux2.0/blob/main/src/sentinel/alerting/manager.py) (Alert manager), [`src/sentinel/normalizer/mapper.py`](https://github.com/richssa24/sentinel_linux2.0/blob/main/src/sentinel/normalizer/mapper.py) (Normalizer), [`src/sentinel/detection/engine.py`](https://github.com/richssa24/sentinel_linux2.0/blob/main/src/sentinel/detection/engine.py) (Detection engine), [`src/sentinel/collectors/network.py`](https://github.com/richssa24/sentinel_linux2.0/blob/main/src/sentinel/collectors/network.py) (Network monitor)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_collection["Collection and normalization"]
  node_authlog["Auth log<br/>[authlog.py]"]
  node_process["Process monitor<br/>[process.py]"]
  node_integrity["File integrity<br/>[integrity.py]"]
  node_network["Network monitor<br/>[network.py]"]
  node_netparse["Network parser<br/>[netparse.py]"]
  node_normalizer["Normalizer<br/>[mapper.py]"]
end

subgraph group_processing["Event processing"]
  node_events["ECS events<br/>[events.py]"]
  node_runner["Pipeline runner<br/>[runner.py]"]
  node_queue["Bounded queue<br/>[queue.py]"]
  node_dedup["Dedup window<br/>[dedup.py]"]
end

subgraph group_detection["Rule detection"]
  node_loader["Rule loader<br/>[loader.py]"]
  node_schema["Rule schema<br/>[schema.py]"]
  node_evaluator["Condition evaluator<br/>[evaluator.py]"]
  node_engine["Detection engine<br/>[engine.py]"]
end

subgraph group_response["Alerts and integrations"]
  node_manager["Alert manager<br/>[manager.py]"]
  node_alertmodel["Alert model<br/>[model.py]"]
  node_sinks["Alert sinks"]
end

subgraph group_service["Persistence and access"]
  node_database[("Database<br/>[database.py]")]
  node_repository["Storage repository<br/>[repository.py]"]
  node_api["Authenticated API<br/>[app.py]"]
  node_metrics["Prometheus metrics<br/>[metrics.py]"]
  node_runtime["Runtime composition<br/>[runtime.py]"]
end

node_host(("Linux host"))

node_host -->|"reads auth logs"| node_authlog
node_host -->|"reads processes"| node_process
node_host -->|"watches files"| node_integrity
node_host -->|"reads sockets"| node_network
node_network -->|"parses sockets"| node_netparse
node_authlog -->|"normalizes input"| node_normalizer
node_process -->|"normalizes input"| node_normalizer
node_integrity -->|"normalizes input"| node_normalizer
node_network -->|"normalizes input"| node_normalizer
node_normalizer -->|"builds events"| node_events
node_runtime -->|"assembles pipeline"| node_runner
node_runner -->|"enqueues events"| node_queue
node_queue -->|"feeds events"| node_dedup
node_dedup -->|"dispatches unique events"| node_engine
node_loader -->|"validates rules"| node_schema
node_engine -->|"evaluates conditions"| node_evaluator
node_engine -->|"emits detections"| node_manager
node_manager -->|"creates alerts"| node_alertmodel
node_manager -->|"dispatches alerts"| node_sinks
node_engine -->|"persists events"| node_repository
node_manager -->|"persists alerts"| node_repository
node_repository -->|"reads and writes"| node_database
node_database -->|"serves stored data"| node_api
node_queue -.->|"exposes metrics"| node_metrics
node_manager -.->|"exposes metrics"| node_metrics

click node_authlog "https://github.com/richssa24/sentinel_linux2.0/blob/main/src/sentinel/collectors/authlog.py"
click node_process "https://github.com/richssa24/sentinel_linux2.0/blob/main/src/sentinel/collectors/process.py"
click node_integrity "https://github.com/richssa24/sentinel_linux2.0/blob/main/src/sentinel/collectors/integrity.py"
click node_network "https://github.com/richssa24/sentinel_linux2.0/blob/main/src/sentinel/collectors/network.py"
click node_netparse "https://github.com/richssa24/sentinel_linux2.0/blob/main/src/sentinel/collectors/netparse.py"
click node_normalizer "https://github.com/richssa24/sentinel_linux2.0/blob/main/src/sentinel/normalizer/mapper.py"
click node_events "https://github.com/richssa24/sentinel_linux2.0/blob/main/src/sentinel/events.py"
click node_runner "https://github.com/richssa24/sentinel_linux2.0/blob/main/src/sentinel/pipeline/runner.py"
click node_queue "https://github.com/richssa24/sentinel_linux2.0/blob/main/src/sentinel/pipeline/queue.py"
click node_dedup "https://github.com/richssa24/sentinel_linux2.0/blob/main/src/sentinel/pipeline/dedup.py"
click node_loader "https://github.com/richssa24/sentinel_linux2.0/blob/main/src/sentinel/detection/loader.py"
click node_schema "https://github.com/richssa24/sentinel_linux2.0/blob/main/src/sentinel/detection/schema.py"
click node_evaluator "https://github.com/richssa24/sentinel_linux2.0/blob/main/src/sentinel/detection/evaluator.py"
click node_engine "https://github.com/richssa24/sentinel_linux2.0/blob/main/src/sentinel/detection/engine.py"
click node_manager "https://github.com/richssa24/sentinel_linux2.0/blob/main/src/sentinel/alerting/manager.py"
click node_alertmodel "https://github.com/richssa24/sentinel_linux2.0/blob/main/src/sentinel/alerting/model.py"
click node_sinks "https://github.com/richssa24/sentinel_linux2.0/tree/main/src/sentinel/alerting/sinks"
click node_database "https://github.com/richssa24/sentinel_linux2.0/blob/main/src/sentinel/storage/database.py"
click node_repository "https://github.com/richssa24/sentinel_linux2.0/blob/main/src/sentinel/storage/repository.py"
click node_api "https://github.com/richssa24/sentinel_linux2.0/blob/main/src/sentinel/api/app.py"
click node_metrics "https://github.com/richssa24/sentinel_linux2.0/blob/main/src/sentinel/metrics.py"
click node_runtime "https://github.com/richssa24/sentinel_linux2.0/blob/main/src/sentinel/runtime.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_authlog,node_process,node_integrity,node_network,node_netparse,node_normalizer toneBlue
class node_events,node_runner,node_queue,node_dedup toneAmber
class node_loader,node_schema,node_evaluator,node_engine toneMint
class node_manager,node_alertmodel,node_sinks toneRose
class node_database,node_repository,node_api,node_metrics,node_runtime,node_host toneIndigo
```

## Components

### Collection and normalization

- [Auth log](https://github.com/richssa24/sentinel_linux2.0/blob/main/src/sentinel/collectors/authlog.py): `src/sentinel/collectors/authlog.py`
- [Process monitor](https://github.com/richssa24/sentinel_linux2.0/blob/main/src/sentinel/collectors/process.py): `src/sentinel/collectors/process.py`
- [File integrity](https://github.com/richssa24/sentinel_linux2.0/blob/main/src/sentinel/collectors/integrity.py): `src/sentinel/collectors/integrity.py`
- [Network monitor](https://github.com/richssa24/sentinel_linux2.0/blob/main/src/sentinel/collectors/network.py): `src/sentinel/collectors/network.py`
- [Network parser](https://github.com/richssa24/sentinel_linux2.0/blob/main/src/sentinel/collectors/netparse.py): `src/sentinel/collectors/netparse.py`
- [Normalizer](https://github.com/richssa24/sentinel_linux2.0/blob/main/src/sentinel/normalizer/mapper.py): `src/sentinel/normalizer/mapper.py`

### Event processing

- [ECS events](https://github.com/richssa24/sentinel_linux2.0/blob/main/src/sentinel/events.py): `src/sentinel/events.py`
- [Pipeline runner](https://github.com/richssa24/sentinel_linux2.0/blob/main/src/sentinel/pipeline/runner.py): `src/sentinel/pipeline/runner.py`
- [Bounded queue](https://github.com/richssa24/sentinel_linux2.0/blob/main/src/sentinel/pipeline/queue.py): `src/sentinel/pipeline/queue.py`
- [Dedup window](https://github.com/richssa24/sentinel_linux2.0/blob/main/src/sentinel/pipeline/dedup.py): `src/sentinel/pipeline/dedup.py`

### Rule detection

- [Rule loader](https://github.com/richssa24/sentinel_linux2.0/blob/main/src/sentinel/detection/loader.py): `src/sentinel/detection/loader.py`
- [Rule schema](https://github.com/richssa24/sentinel_linux2.0/blob/main/src/sentinel/detection/schema.py): `src/sentinel/detection/schema.py`
- [Condition evaluator](https://github.com/richssa24/sentinel_linux2.0/blob/main/src/sentinel/detection/evaluator.py): `src/sentinel/detection/evaluator.py`
- [Detection engine](https://github.com/richssa24/sentinel_linux2.0/blob/main/src/sentinel/detection/engine.py): `src/sentinel/detection/engine.py`

### Alerts and integrations

- [Alert manager](https://github.com/richssa24/sentinel_linux2.0/blob/main/src/sentinel/alerting/manager.py): `src/sentinel/alerting/manager.py`
- [Alert model](https://github.com/richssa24/sentinel_linux2.0/blob/main/src/sentinel/alerting/model.py): `src/sentinel/alerting/model.py`
- [Alert sinks](https://github.com/richssa24/sentinel_linux2.0/tree/main/src/sentinel/alerting/sinks): `src/sentinel/alerting/sinks`

### Persistence and access

- [Database](https://github.com/richssa24/sentinel_linux2.0/blob/main/src/sentinel/storage/database.py): `src/sentinel/storage/database.py`
- [Storage repository](https://github.com/richssa24/sentinel_linux2.0/blob/main/src/sentinel/storage/repository.py): `src/sentinel/storage/repository.py`
- [Authenticated API](https://github.com/richssa24/sentinel_linux2.0/blob/main/src/sentinel/api/app.py): `src/sentinel/api/app.py`
- [Prometheus metrics](https://github.com/richssa24/sentinel_linux2.0/blob/main/src/sentinel/metrics.py): `src/sentinel/metrics.py`
- [Runtime composition](https://github.com/richssa24/sentinel_linux2.0/blob/main/src/sentinel/runtime.py): `src/sentinel/runtime.py`

### Other components

- **Linux host**

## Connections

- Linux host → Auth log: reads auth logs
- Linux host → Process monitor: reads processes
- Linux host → File integrity: watches files
- Linux host → Network monitor: reads sockets
- Network monitor → Network parser: parses sockets (evidence: `src/sentinel/collectors/network.py`)
- Auth log → Normalizer: normalizes input
- Process monitor → Normalizer: normalizes input
- File integrity → Normalizer: normalizes input
- Network monitor → Normalizer: normalizes input
- Normalizer → ECS events: builds events (evidence: `src/sentinel/normalizer/mapper.py`)
- Runtime composition → Pipeline runner: assembles pipeline
- Pipeline runner → Bounded queue: enqueues events (evidence: `src/sentinel/pipeline/runner.py`)
- Bounded queue → Dedup window: feeds events
- Dedup window → Detection engine: dispatches unique events
- Rule loader → Rule schema: validates rules (evidence: `src/sentinel/detection/loader.py`)
- Detection engine → Condition evaluator: evaluates conditions (evidence: `src/sentinel/detection/engine.py`)
- Detection engine → Alert manager: emits detections (evidence: `src/sentinel/alerting/manager.py`)
- Alert manager → Alert model: creates alerts (evidence: `src/sentinel/alerting/manager.py`)
- Alert manager → Alert sinks: dispatches alerts (evidence: `src/sentinel/alerting/manager.py`)
- Detection engine → Storage repository: persists events
- Alert manager → Storage repository: persists alerts
- Storage repository → Database: reads and writes (evidence: `src/sentinel/storage/repository.py`)
- Database → Authenticated API: serves stored data (evidence: `src/sentinel/api/app.py`)
- Bounded queue → Prometheus metrics: exposes metrics
- Alert manager → Prometheus metrics: exposes metrics
