# m1cckey/pyprojects architecture

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

- Interactive diagram: https://gitdiagram.com/m1cckey/pyprojects
- Repository: https://github.com/m1cckey/pyprojects

## Overview

This repository is a collection of three small security utilities rather than one integrated application. AuditDeps checks pinned Python dependencies against OSV and reports vulnerability findings; LogWatch parses access logs, detects suspicious activity, and presents statistics; JWTinspector decodes JWT parts and includes a header check. The sampled source shows AuditDeps’ runtime orchestration and much of LogWatch’s detection/reporting flow. JWTinspector’s excerpt ends during header analysis, so its caller and further behavior are not mapped.

Main entry points: [`LogWatch/LogWatch.py`](https://github.com/m1cckey/pyprojects/blob/main/LogWatch/LogWatch.py) (Analysis coordinator), [`AuditDeps/AuditDeps.py`](https://github.com/m1cckey/pyprojects/blob/main/AuditDeps/AuditDeps.py) (Audit scanner), [`JWTinspector/JWTinspector.py`](https://github.com/m1cckey/pyprojects/blob/main/JWTinspector/JWTinspector.py) (JWT decoder)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_audit["Dependency auditing"]
  node_audit_cli["Audit CLI<br/>[AuditDeps.py]"]
  node_scanner["Audit scanner<br/>[AuditDeps.py]"]
  node_requirements["Requirements input"]
  node_package_parser["Package parser<br/>[AuditDeps.py]"]
  node_cache[("JSON cache")]
  node_osv["OSV service"]
  node_vuln_analysis["Vulnerability analysis<br/>[AuditDeps.py]"]
  node_audit_report["Audit report<br/>[AuditDeps.py]"]
end

subgraph group_logwatch["Access-log analysis"]
  node_log_cli["LogWatch CLI<br/>[LogWatch.py]"]
  node_guard["Analysis coordinator<br/>[LogWatch.py]"]
  node_log_input["Access log"]
  node_log_parser["Log parser<br/>[LogWatch.py]"]
  node_sql_detector["SQL detection<br/>[LogWatch.py]"]
  node_ua_detector["User-agent detection<br/>[LogWatch.py]"]
  node_brute_detector["Brute-force detection<br/>[LogWatch.py]"]
  node_scan_detector["Scanning detection<br/>[LogWatch.py]"]
  node_xss_detector["XSS detection<br/>[LogWatch.py]"]
  node_spike_detector["Error-spike detection<br/>[LogWatch.py]"]
  node_log_report["Statistics report<br/>[LogWatch.py]"]
  node_charts["Chart views<br/>[LogWatch.py]"]
end

subgraph group_jwt["JWT inspection"]
  node_jwt_parser["JWT decoder<br/>[JWTinspector.py]"]
  node_jwt_header["Header analysis<br/>[JWTinspector.py]"]
end

node_user(("Operator"))
node_log_user(("Log operator"))
node_jwt_user(("JWT analyst"))

node_user -->|"runs"| node_audit_cli
node_audit_cli -->|"creates"| node_scanner
node_audit_cli -->|"selects"| node_requirements
node_audit_cli -->|"loads cache"| node_scanner
node_audit_cli -->|"starts scan"| node_scanner
node_audit_cli -->|"writes cache"| node_scanner
node_scanner -->|"reads and writes"| node_cache
node_scanner -->|"parses requirements"| node_package_parser
node_package_parser -->|"reads"| node_requirements
node_scanner -->|"queries"| node_osv
node_scanner -->|"analyzes findings"| node_vuln_analysis
node_scanner -->|"prints results"| node_audit_report
node_vuln_analysis -->|"formats findings"| node_audit_report
node_log_user -->|"runs"| node_log_cli
node_log_cli -->|"creates"| node_guard
node_log_cli -->|"shows statistics"| node_guard
node_guard -->|"selects"| node_log_input
node_guard -->|"parses"| node_log_parser
node_log_parser -->|"reads"| node_log_input
node_guard -->|"checks parsed logs"| node_sql_detector
node_guard -->|"checks parsed logs"| node_ua_detector
node_guard -->|"checks parsed logs"| node_brute_detector
node_guard -->|"checks parsed logs"| node_scan_detector
node_guard -->|"checks parsed logs"| node_xss_detector
node_guard -->|"checks parsed logs"| node_spike_detector
node_guard -->|"builds statistics"| node_log_report
node_log_cli -->|"displays"| node_log_report
node_jwt_user -.->|"uses"| node_jwt_parser

click node_audit_cli "https://github.com/m1cckey/pyprojects/blob/main/AuditDeps/AuditDeps.py"
click node_scanner "https://github.com/m1cckey/pyprojects/blob/main/AuditDeps/AuditDeps.py"
click node_package_parser "https://github.com/m1cckey/pyprojects/blob/main/AuditDeps/AuditDeps.py"
click node_vuln_analysis "https://github.com/m1cckey/pyprojects/blob/main/AuditDeps/AuditDeps.py"
click node_audit_report "https://github.com/m1cckey/pyprojects/blob/main/AuditDeps/AuditDeps.py"
click node_log_cli "https://github.com/m1cckey/pyprojects/blob/main/LogWatch/LogWatch.py"
click node_guard "https://github.com/m1cckey/pyprojects/blob/main/LogWatch/LogWatch.py"
click node_log_parser "https://github.com/m1cckey/pyprojects/blob/main/LogWatch/LogWatch.py"
click node_sql_detector "https://github.com/m1cckey/pyprojects/blob/main/LogWatch/LogWatch.py"
click node_ua_detector "https://github.com/m1cckey/pyprojects/blob/main/LogWatch/LogWatch.py"
click node_brute_detector "https://github.com/m1cckey/pyprojects/blob/main/LogWatch/LogWatch.py"
click node_scan_detector "https://github.com/m1cckey/pyprojects/blob/main/LogWatch/LogWatch.py"
click node_xss_detector "https://github.com/m1cckey/pyprojects/blob/main/LogWatch/LogWatch.py"
click node_spike_detector "https://github.com/m1cckey/pyprojects/blob/main/LogWatch/LogWatch.py"
click node_log_report "https://github.com/m1cckey/pyprojects/blob/main/LogWatch/LogWatch.py"
click node_charts "https://github.com/m1cckey/pyprojects/blob/main/LogWatch/LogWatch.py"
click node_jwt_parser "https://github.com/m1cckey/pyprojects/blob/main/JWTinspector/JWTinspector.py"
click node_jwt_header "https://github.com/m1cckey/pyprojects/blob/main/JWTinspector/JWTinspector.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_audit_cli,node_scanner,node_requirements,node_package_parser,node_cache,node_osv,node_vuln_analysis,node_audit_report toneBlue
class node_log_cli,node_guard,node_log_input,node_log_parser,node_sql_detector,node_ua_detector,node_brute_detector,node_scan_detector,node_xss_detector,node_spike_detector,node_log_report,node_charts toneAmber
class node_jwt_parser,node_jwt_header toneMint
class node_user,node_log_user,node_jwt_user toneIndigo
```

## Components

### Dependency auditing

- [Audit CLI](https://github.com/m1cckey/pyprojects/blob/main/AuditDeps/AuditDeps.py): `AuditDeps/AuditDeps.py`
- [Audit scanner](https://github.com/m1cckey/pyprojects/blob/main/AuditDeps/AuditDeps.py): `AuditDeps/AuditDeps.py`
- **Requirements input**
- [Package parser](https://github.com/m1cckey/pyprojects/blob/main/AuditDeps/AuditDeps.py): `AuditDeps/AuditDeps.py`
- **JSON cache**
- **OSV service**
- [Vulnerability analysis](https://github.com/m1cckey/pyprojects/blob/main/AuditDeps/AuditDeps.py): `AuditDeps/AuditDeps.py`
- [Audit report](https://github.com/m1cckey/pyprojects/blob/main/AuditDeps/AuditDeps.py): `AuditDeps/AuditDeps.py`

### Access-log analysis

- [LogWatch CLI](https://github.com/m1cckey/pyprojects/blob/main/LogWatch/LogWatch.py): `LogWatch/LogWatch.py`
- [Analysis coordinator](https://github.com/m1cckey/pyprojects/blob/main/LogWatch/LogWatch.py): `LogWatch/LogWatch.py`
- **Access log**
- [Log parser](https://github.com/m1cckey/pyprojects/blob/main/LogWatch/LogWatch.py): `LogWatch/LogWatch.py`
- [SQL detection](https://github.com/m1cckey/pyprojects/blob/main/LogWatch/LogWatch.py): `LogWatch/LogWatch.py`
- [User-agent detection](https://github.com/m1cckey/pyprojects/blob/main/LogWatch/LogWatch.py): `LogWatch/LogWatch.py`
- [Brute-force detection](https://github.com/m1cckey/pyprojects/blob/main/LogWatch/LogWatch.py): `LogWatch/LogWatch.py`
- [Scanning detection](https://github.com/m1cckey/pyprojects/blob/main/LogWatch/LogWatch.py): `LogWatch/LogWatch.py`
- [XSS detection](https://github.com/m1cckey/pyprojects/blob/main/LogWatch/LogWatch.py): `LogWatch/LogWatch.py`
- [Error-spike detection](https://github.com/m1cckey/pyprojects/blob/main/LogWatch/LogWatch.py): `LogWatch/LogWatch.py`
- [Statistics report](https://github.com/m1cckey/pyprojects/blob/main/LogWatch/LogWatch.py): `LogWatch/LogWatch.py`
- [Chart views](https://github.com/m1cckey/pyprojects/blob/main/LogWatch/LogWatch.py): `LogWatch/LogWatch.py`

### JWT inspection

- [JWT decoder](https://github.com/m1cckey/pyprojects/blob/main/JWTinspector/JWTinspector.py): `JWTinspector/JWTinspector.py`
- [Header analysis](https://github.com/m1cckey/pyprojects/blob/main/JWTinspector/JWTinspector.py): `JWTinspector/JWTinspector.py`

### Other components

- **Operator**
- **Log operator**
- **JWT analyst**

## Connections

- Operator → Audit CLI: runs (evidence: `AuditDeps/AuditDeps.py`)
- Audit CLI → Audit scanner: creates (evidence: `AuditDeps/AuditDeps.py`)
- Audit CLI → Requirements input: selects (evidence: `AuditDeps/AuditDeps.py`)
- Audit CLI → Audit scanner: loads cache (evidence: `AuditDeps/AuditDeps.py`)
- Audit CLI → Audit scanner: starts scan (evidence: `AuditDeps/AuditDeps.py`)
- Audit CLI → Audit scanner: writes cache (evidence: `AuditDeps/AuditDeps.py`)
- Audit scanner → JSON cache: reads and writes (evidence: `AuditDeps/AuditDeps.py`)
- Audit scanner → Package parser: parses requirements (evidence: `AuditDeps/AuditDeps.py`)
- Package parser → Requirements input: reads (evidence: `AuditDeps/AuditDeps.py`)
- Audit scanner → OSV service: queries (evidence: `AuditDeps/AuditDeps.py`)
- Audit scanner → Vulnerability analysis: analyzes findings (evidence: `AuditDeps/AuditDeps.py`)
- Audit scanner → Audit report: prints results (evidence: `AuditDeps/AuditDeps.py`)
- Vulnerability analysis → Audit report: formats findings (evidence: `AuditDeps/AuditDeps.py`)
- Log operator → LogWatch CLI: runs (evidence: `LogWatch/LogWatch.py`)
- LogWatch CLI → Analysis coordinator: creates (evidence: `LogWatch/LogWatch.py`)
- LogWatch CLI → Analysis coordinator: shows statistics (evidence: `LogWatch/LogWatch.py`)
- Analysis coordinator → Access log: selects (evidence: `LogWatch/LogWatch.py`)
- Analysis coordinator → Log parser: parses (evidence: `LogWatch/LogWatch.py`)
- Log parser → Access log: reads (evidence: `LogWatch/LogWatch.py`)
- Analysis coordinator → SQL detection: checks parsed logs (evidence: `LogWatch/LogWatch.py`)
- Analysis coordinator → User-agent detection: checks parsed logs (evidence: `LogWatch/LogWatch.py`)
- Analysis coordinator → Brute-force detection: checks parsed logs (evidence: `LogWatch/LogWatch.py`)
- Analysis coordinator → Scanning detection: checks parsed logs (evidence: `LogWatch/LogWatch.py`)
- Analysis coordinator → XSS detection: checks parsed logs (evidence: `LogWatch/LogWatch.py`)
- Analysis coordinator → Error-spike detection: checks parsed logs (evidence: `LogWatch/LogWatch.py`)
- Analysis coordinator → Statistics report: builds statistics (evidence: `LogWatch/LogWatch.py`)
- LogWatch CLI → Statistics report: displays (evidence: `LogWatch/LogWatch.py`)
- JWT analyst → JWT decoder: uses
