Files
git.stella-ops.org/docs/features/unchecked/scanner/false-negative-drift-tracking-and-metrics.md

28 lines
1.5 KiB
Markdown

# False-negative drift (FN-Drift) tracking and metrics
## Module
Scanner
## Status
IMPLEMENTED
## Description
FN-Drift calculation, metrics export, and classification change history tracking with dedicated Postgres migration.
## Implementation Details
- **FN-Drift Calculation**:
- `src/Scanner/__Libraries/StellaOps.Scanner.Storage/Services/FnDriftCalculator.cs` - Calculates false-negative drift metrics
- `src/Scanner/__Libraries/StellaOps.Scanner.Storage/Services/FnDriftMetricsExporter.cs` - Exports FN-Drift metrics for telemetry
- **Classification Change Tracking**:
- `src/Scanner/__Libraries/StellaOps.Scanner.Storage/Services/ClassificationChangeTracker.cs` - Tracks classification changes over time
- `src/Scanner/__Libraries/StellaOps.Scanner.Storage/Models/ClassificationChangeModels.cs` - Change models
- `src/Scanner/__Libraries/StellaOps.Scanner.Storage/Repositories/IClassificationHistoryRepository.cs` - Repository interface
- `src/Scanner/__Libraries/StellaOps.Scanner.Storage/Repositories/ClassificationHistoryRepository.cs` - PostgreSQL repository
## E2E Test Plan
- [ ] Run multiple scans over time and verify `FnDriftCalculator` computes drift metrics based on classification changes
- [ ] Verify classification change history is persisted and queryable
- [ ] Verify FN-Drift metrics are exported to the telemetry system
- [ ] Verify classification changes (e.g., vulnerable -> not_affected -> vulnerable) are tracked with timestamps
- [ ] Verify drift metrics accurately reflect the rate of false-negative changes over time