How mohamedaminesaadd/fog_cybersecurity_system works
FogShield is a decentralized security-monitoring agent: each fog node collects Suricata and Zeek logs, normalizes and stores events locally, detects alerts, and exchanges alerts and votes with peers. The Angular dashboard monitors nodes through read-only APIs; the legacy Streamlit dashboard is deprecated. The graph preserves the documented pipeline and dashboard capabilities. Some implementation links are supported only by the README or source index; unsampled internals are not inferred beyond those links.
Main entry points: node.py Node orchestration · voting_engine.py Voting rounds and tally · storage Event, alert and vote repositories · event_normalizer.py Event normalization
Components 29
Node agent
- Agent entrypoint
fog_agent/main.py - Node orchestration
fog_agent/node.py - Node configuration
fog_agent/config/settings.py - Local detection rules
fog_agent/detection/rules.py - Detection engine
fog_agent/detection/local_detector.py
Event and state
- Suricata collector
fog_agent/collectors/suricata_collector.py - Zeek collector
fog_agent/collectors/zeek_collector.py - Incremental log tailing
fog_agent/collectors/base.py - Event normalization
fog_agent/normalization/event_normalizer.py - Security events
fog_agent/models/events.py - Alert model
fog_agent/models/alerts.py - Local SQLite database
fog_agent/storage/database.py - Event, alert and vote repositories
fog_agent/storage
Peer collaboration
- Node HTTP API
fog_agent/communication/api.py - Peer client
fog_agent/communication/peer_client.py - Voting rounds and tally
fog_agent/voting/voting_engine.py - Vote evidence evaluation
fog_agent/voting/evidence.py - Vote and round models
fog_agent/models/votes.py - Fog peer nodes
Monitoring dashboards
- Angular monitoring dashboard
frontend/src/app - Node discovery
frontend/src/app/core/services/node-discovery.service.ts - Monitoring service
frontend/src/app/core/services/monitoring.service.ts - Dashboard node API client
frontend/src/app/core/services/node-api.service.ts - Dashboard views
frontend/src/app/features - Legacy Streamlit dashboard
fog_agent/dashboard/app.py - Streamlit API client
fog_agent/dashboard/api_client.py - Dashboard data shaping
fog_agent/dashboard/data_service.py
Other components
- Operator
- Dashboard user
Connections 39
- Operator → Agent entrypoint: starts agent
README.md - Agent entrypoint → Node orchestration: runs node
fog_agent/main.py - Node orchestration → Node configuration: uses configuration
README.md - Node orchestration → Suricata collector: runs collector
README.md - Node orchestration → Zeek collector: runs collector
README.md - Suricata collector → Incremental log tailing: tails logs
fog_agent/collectors/suricata_collector.py - Zeek collector → Incremental log tailing: tails logs
fog_agent/collectors/zeek_collector.py - Node orchestration → Event normalization: normalizes records
README.md - Suricata collector → Event normalization: supplies records
README.md - Zeek collector → Event normalization: supplies records
README.md - Event normalization → Security events: produces events
fog_agent/normalization/event_normalizer.py - Node orchestration → Detection engine: runs detection
README.md - Detection engine → Local detection rules: applies rules
- Detection engine → Alert model: produces alerts
README.md - Node orchestration → Event, alert and vote repositories: stores events
README.md - Event, alert and vote repositories → Local SQLite database: reads and writes
fog_agent/storage/alert_repository.py - Event, alert and vote repositories → Security events: persists events
fog_agent/storage/event_repository.py - Event, alert and vote repositories → Alert model: persists alerts
fog_agent/storage/alert_repository.py - Node orchestration → Node HTTP API: serves status
README.md - Node orchestration → Peer client: delivers alerts
README.md - Peer client → Fog peer nodes: sends messages
README.md - Fog peer nodes → Node HTTP API: sends alerts and votes
README.md - Node orchestration → Voting rounds and tally: runs voting
README.md - Voting rounds and tally → Peer client: broadcasts rounds
fog_agent/voting/voting_engine.py - Voting rounds and tally → Vote evidence evaluation: evaluates evidence
fog_agent/voting/voting_engine.py - Voting rounds and tally → Vote and round models: uses vote models
fog_agent/voting/voting_engine.py - Voting rounds and tally → Event, alert and vote repositories: stores votes
fog_agent/voting/voting_engine.py - Dashboard user → Angular monitoring dashboard: views monitoring
README.md - Angular monitoring dashboard → Node discovery: discovers nodes
frontend/src/app/app.ts - Angular monitoring dashboard → Dashboard views: routes views
frontend/src/app/app.routes.ts - Dashboard views → Monitoring service: requests monitoring
- Monitoring service → Dashboard node API client: queries nodes
frontend/src/app/core/services/monitoring.service.ts - Node discovery → Dashboard node API client: provides node list
frontend/src/app/core/services/node-api.service.ts - Dashboard node API client → Node HTTP API: queries read-only
README.md - Dashboard user → Legacy Streamlit dashboard: views legacy dashboard
README.md - Legacy Streamlit dashboard → Streamlit API client: queries nodes
fog_agent/dashboard/app.py - Legacy Streamlit dashboard → Dashboard data shaping: shapes results
fog_agent/dashboard/app.py - Streamlit API client → Node HTTP API: sends GET requests
fog_agent/dashboard/api_client.py - Dashboard data shaping → Streamlit API client: processes responses
fog_agent/dashboard/data_service.py