# mgrant8792/cyberloganalyzer architecture

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

## Overview

CyberLogAnalyzer is a small command-line tool that reads authentication logs, identifies failed-login events, flags IPs meeting a time-window threshold, and writes a CSV summary. The workflow is orchestrated in `analyzer.py`; its parsing, detection, and reporting responsibilities are functions in that same file. The graph reflects the sampled source and README; it does not assume additional subsystems.

Main entry points: [`analyzer.py`](https://github.com/mgrant8792/cyberloganalyzer/blob/main/analyzer.py) (Analyze events)

## Diagram (Mermaid)

```mermaid
flowchart TD

node_operator(("Operator"))
node_main["CLI workflow<br/>[analyzer.py]"]
node_log["Auth log"]
node_analysis["Analyze events<br/>[analyzer.py]"]
node_timestamps["Parse timestamps<br/>[analyzer.py]"]
node_failures["Match failures<br/>[analyzer.py]"]
node_detection["Window detection<br/>[analyzer.py]"]
node_report["Write CSV<br/>[analyzer.py]"]
node_csv["CSV report"]

node_operator -->|"provides arguments"| node_main
node_main -->|"calls"| node_analysis
node_analysis -->|"reads"| node_log
node_analysis -->|"parses via"| node_timestamps
node_analysis -->|"matches"| node_failures
node_analysis -->|"tracks windows"| node_detection
node_main -->|"calls with results"| node_report
node_report -->|"writes"| node_csv

click node_main "https://github.com/mgrant8792/cyberloganalyzer/blob/main/analyzer.py"
click node_analysis "https://github.com/mgrant8792/cyberloganalyzer/blob/main/analyzer.py"
click node_timestamps "https://github.com/mgrant8792/cyberloganalyzer/blob/main/analyzer.py"
click node_failures "https://github.com/mgrant8792/cyberloganalyzer/blob/main/analyzer.py"
click node_detection "https://github.com/mgrant8792/cyberloganalyzer/blob/main/analyzer.py"
click node_report "https://github.com/mgrant8792/cyberloganalyzer/blob/main/analyzer.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_operator,node_log,node_csv toneIndigo
class node_main,node_analysis,node_timestamps,node_failures,node_detection,node_report toneTeal
```

## Components

### Other components

- **Operator**
- [CLI workflow](https://github.com/mgrant8792/cyberloganalyzer/blob/main/analyzer.py): `analyzer.py`
- **Auth log**
- [Analyze events](https://github.com/mgrant8792/cyberloganalyzer/blob/main/analyzer.py): `analyzer.py`
- [Parse timestamps](https://github.com/mgrant8792/cyberloganalyzer/blob/main/analyzer.py): `analyzer.py`
- [Match failures](https://github.com/mgrant8792/cyberloganalyzer/blob/main/analyzer.py): `analyzer.py`
- [Window detection](https://github.com/mgrant8792/cyberloganalyzer/blob/main/analyzer.py): `analyzer.py`
- [Write CSV](https://github.com/mgrant8792/cyberloganalyzer/blob/main/analyzer.py): `analyzer.py`
- **CSV report**

## Connections

- Operator → CLI workflow: provides arguments
- CLI workflow → Analyze events: calls
- Analyze events → Auth log: reads
- Analyze events → Parse timestamps: parses via
- Analyze events → Match failures: matches
- Analyze events → Window detection: tracks windows
- CLI workflow → Write CSV: calls with results
- Write CSV → CSV report: writes
