Fix anomaly detection issues and add missing functionality

Fixed issues:
- Corrected Welford's online algorithm for variance calculation
- Added NaN and infinity guards to prevent invalid calculations
- Added Serialize/Deserialize traits to AnomalyScore and ProcessProfile

Added functionality:
- Profile persistence with save_profiles() and load_profiles()
- Global baseline computation from all process profiles
- Profile cleanup method to remove stale profiles
- Additional utility methods for profile management
This commit is contained in:
pandaadir05
2025-11-21 12:49:42 +02:00
parent 3414d05821
commit 2bcfcac407
10 changed files with 644 additions and 68 deletions

View File

@@ -5,6 +5,10 @@ edition.workspace = true
authors.workspace = true
license.workspace = true
[features]
default = []
yara-scanning = ["yara"]
[dependencies]
anyhow.workspace = true
thiserror.workspace = true
@@ -14,8 +18,8 @@ serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
uuid = { version = "1.0", features = ["v4"] }
toml = "0.8"
chrono = "0.4"
yara = "0.28"
chrono = { version = "0.4", features = ["serde"] }
yara = { version = "0.28", optional = true }
sha2 = "0.10"
reqwest = { version = "0.11", features = ["json"] }