How nhahub/nha-5-211 works
SMART IDS v3 is a network intrusion detection and SOC dashboard: it combines supervised attack classification, benign-trained anomaly detection, explanations, and dry-run response. The principal analyst workflow enters through the Streamlit app, loads persisted data and detection artifacts, scores flows, and presents results across SOC views. Separate training and evaluation modules support leakage-controlled data preparation, model fitting, and benchmark protocols. Edges reflect README statements and source-index references; unsampled implementation details are not inferred.
Main entry points: data_access.py Dashboard Data Access · app.py Dashboard App · inference.py Unified Detection · trainer.py Model Trainer
Components 25
SOC Dashboard
- Dashboard App
app.py - Dashboard Data Access
dashboard/data_access.py - SOC Overview
dashboard/pages/overview.py - Flow Prediction
dashboard/pages/predict_flow.py - Dataset Explorer
dashboard/pages/dataset_explorer.py - Model Performance
dashboard/pages/model_performance.py - Explainability View
dashboard/pages/explainability.py - Active Response View
dashboard/pages/active_response.py - System Settings
dashboard/pages/system_settings.py
Data Pipeline
- Dataset Loader
src/data/loader.py - Traffic Cleaning
src/data/cleaner.py - Leakage-Safe Preprocessing
src/data/preprocessing.py - Feature Engineering
src/data/feature_engineering.py
Detection & Response
- Unified Detection
src/detection/inference.py - Anomaly Detection
src/detection/anomaly_detection.py - Threat Scoring
src/detection/threat_scoring.py - SHAP Explainer
src/explainability/shap_explainer.py - Dry-Run Response
src/response/response_engine.py
Models & Evaluation
- Model Trainer
src/training/trainer.py - Supervised Classifiers
src/models/xgboost_model.py - Hybrid Ensemble
src/models/ensemble.py - Benign Autoencoder
src/models/autoencoder.py - Evaluation Protocols
src/evaluation/protocols.py - Artifact Registry
src/utils/model_registry.py
Other components
- SOC Analyst
Connections 37
- SOC Analyst → Dashboard App: opens
- Dashboard App → SOC Overview: routes to
app.py - Dashboard App → Flow Prediction: routes to
app.py - Dashboard App → Dataset Explorer: routes to
app.py - Dashboard App → Model Performance: routes to
app.py - Dashboard App → Explainability View: routes to
app.py - Dashboard App → Active Response View: routes to
app.py - Dashboard App → System Settings: routes to
app.py - SOC Overview → Dashboard Data Access: loads dashboard data
dashboard/pages/overview.py - Flow Prediction → Dashboard Data Access: requests predictions
dashboard/pages/predict_flow.py - Dataset Explorer → Dashboard Data Access: loads dataset data
dashboard/pages/dataset_explorer.py - Model Performance → Dashboard Data Access: loads metrics
dashboard/pages/model_performance.py - Explainability View → Dashboard Data Access: loads explanations
dashboard/pages/explainability.py - Active Response View → Dashboard Data Access: loads response data
dashboard/pages/active_response.py - System Settings → Dashboard Data Access: loads settings data
dashboard/pages/system_settings.py - Dashboard Data Access → Unified Detection: creates inference engine
dashboard/data_access.py - Dashboard Data Access → Artifact Registry: loads artifacts
dashboard/data_access.py - Dashboard Data Access → Dataset Loader: loads dataset
dashboard/data_access.py - Dataset Loader → Traffic Cleaning: cleans traffic
src/data/loader.py - Leakage-Safe Preprocessing → Dataset Loader: loads source data
src/data/preprocessing.py - Leakage-Safe Preprocessing → Traffic Cleaning: cleans before splitting
src/data/preprocessing.py - Leakage-Safe Preprocessing → Feature Engineering: transforms features
src/data/preprocessing.py - Model Trainer → Leakage-Safe Preprocessing: prepares splits
src/training/trainer.py - Model Trainer → Supervised Classifiers: trains classifiers
src/training/trainer.py - Model Trainer → Benign Autoencoder: trains anomaly model
src/training/trainer.py - Model Trainer → Hybrid Ensemble: evaluates fusion
src/training/trainer.py - Model Trainer → Evaluation Protocols: runs protocols
src/training/trainer.py - Model Trainer → Artifact Registry: persists artifacts
src/training/trainer.py - Unified Detection → Feature Engineering: validates features
src/detection/inference.py - Unified Detection → Hybrid Ensemble: combines predictions
src/detection/inference.py - Unified Detection → Anomaly Detection: detects novelty
src/detection/inference.py - Unified Detection → SHAP Explainer: requests explanations
src/detection/inference.py - Unified Detection → Dry-Run Response: invokes response
src/detection/inference.py - Anomaly Detection → Benign Autoencoder: scores reconstruction
src/detection/anomaly_detection.py - Dry-Run Response → Threat Scoring: uses threat levels
src/response/response_engine.py - Unified Detection → Threat Scoring: scores threats
src/detection/inference.py - Unified Detection → Supervised Classifiers: predicts classes