How ranjithkumar-kb/ai-soc works
This repository is an AI-assisted security operations platform: it accepts login and network events, evaluates them for brute-force and SQL-injection activity, records blocks and alerts, and exposes SOC metrics and generated incident PDFs. The API can also query external IP intelligence. The graph includes the documented-by-code collection, MCP, and reporting surfaces, but several are isolated where the available excerpts do not establish their runtime wiring. The README is empty; relationships are limited to shown calls and imports.
Main entry points: main.py REST API · models.py Security database · agent.py Security agent · reports.py Report endpoint
Components 17
API and interface
- Dashboard UI
frontend/app.py - REST API
backend/main.py - Authentication
backend/auth.py
Detection and response
- Detection rules
ai_agent/detection_logic.py - Security agent
ai_agent/agent.py - Agent prompts
ai_agent/prompts.py - Alarm audio
alerts/sound_engine.py
Telemetry and state
- Security database
database/models.py - Schema setup
database/db_setup.py - Sample data seeding
database/seed_data.py - Packet sniffer
sniffer.py - Windows log collector
logs/win_collector.py
Reports and integrations
- Report endpoint
backend/routes/reports.py - PDF generation
reports/pdf_generator.py - MCP server
mcp_server/server.py - IP intelligence service
Other components
- SOC operator
Connections 12
- SOC operator → Dashboard UI: uses dashboard
- REST API → Security database: reads and writes
backend/main.py - REST API → Detection rules: evaluates logs
backend/main.py - REST API → Security agent: runs agent
backend/main.py - REST API → Report endpoint: mounts routes
backend/main.py - REST API → IP intelligence service: queries IP
backend/main.py - Security agent → Detection rules: runs audit
ai_agent/agent.py - Security agent → Security database: records mitigations
ai_agent/agent.py - Packet sniffer → Security database: stores packets
sniffer.py - Schema setup → Security database: creates schema
database/db_setup.py - Sample data seeding → Security database: seeds records
database/seed_data.py - Report endpoint → PDF generation: generates PDF
backend/routes/reports.py