Rule Optimization

SIEM Rule Performance Tracking, Auto-Tuning, FP-Rate Analysis, and Sigma-to-Native Transpilation

Complete

FP-Rate Tracking

Per-rule, per-tenant false positive rate monitoring across 7/30/90-day windows

Complete

Auto-Tuning

Automated review and disable of noisy rules with full audit trail

Complete

Recommendations

Prioritized optimization actions: disable, tune threshold, add exclusion

Complete

Sigma Transpiler

Convert Sigma YAML rules to KQL (Sentinel), SPL (Splunk), EQL (Elastic)

Overview

The Rule Optimization module addresses the most common operational pain in SIEM management: noisy detection rules that generate excessive false positives. It provides continuous performance tracking for every detection rule, generates prioritized optimization recommendations, can auto-disable the worst offenders, and includes a full Sigma rule transpiler for cross-SIEM rule deployment.

SOC analysts spend a significant portion of their time on false positive triage. Rules with high FP rates cause alert fatigue, slow response times, and increase the risk of missing true positives. This module quantifies rule performance, surfaces actionable recommendations, and automates the tuning lifecycle.

What Was Proposed

What's Built Complete

RulePerformanceTracker

File: platform/api/app/services/rule_optimizer.py (~1020 lines)

RuleAutoTuner

SigmaTranspiler

Frontend UI

File: platform/frontend/src/app/rule-optimization/page.tsx (~520 lines)

Architecture

Frontend (Next.js)                       API (FastAPI)
+------------------------------+   +-----------------------------------+
| /rule-optimization           |   | /api/v1/rules/*                   |
| - Summary Cards              |-->|                                   |
| - Noisy Rules Table          |   | RulePerformanceTracker            |
| - Auto-Tune Controls         |   |   record_trigger()                |
| - Sigma Transpiler (KQL/     |   |   get_performance() / get_noisy() |
|   SPL/EQL)                   |   |   generate_recommendations()      |
| - Audit Log Table            |   |                                   |
+------------------------------+   | RuleAutoTuner                     |
                                   |   run(dry_run) / is_disabled()    |
      Alert Pipeline               |   audit_log / notifications       |
      +------------------+        |                                   |
      | Triage Service   |------->| SigmaTranspiler                   |
      | records triggers |        |   transpile(yaml, [kql,spl,eql])  |
      +------------------+        +-----------------------------------+
    

Routing

TypePathDescription
Frontend/rule-optimizationRule optimization dashboard with FP analysis, auto-tune, and transpiler
API Prefix/api/v1/rulesAll rule optimization endpoints

API Endpoints

MethodEndpointDescription
GET/performanceFP rates and trigger counts for all tracked rules
GET/performance/{rule_id}Performance metrics for a specific rule (multi-window)
GET/recommendationsGenerate optimization recommendations for noisy rules
POST/auto-tuneTrigger auto-tuning pass (dry_run param, admin)
POST/transpileConvert Sigma YAML to native queries (KQL/SPL/EQL)
GET/noisyList rules exceeding FP rate threshold
POST/performance/recordRecord a rule trigger event for FP tracking
GET/auto-tune/audit-logAuto-tuner audit log showing past tuning runs

Prerequisites

Data Model

Enums

EnumValues
OptimizationActiondisable, tune_threshold, add_exclusion, monitor

Key Data Structures

StructureFields
RuleTriggerEventrule_id, tenant_id, alert_id, timestamp, was_fp
RulePerformanceSnapshotrule_id, tenant_id, window_days, total_triggers, fp_count, tp_count, fp_rate, first_seen, last_seen
OptimizationRecommendationrule_id, tenant_id, action, reason, fp_rate, window_days, total_triggers, priority, created_at
AutoTuneResultrun_id, started_at, completed_at, dry_run, rules_reviewed, rules_disabled, rules_flagged, details[]

Sigma Transpiler Field Mappings

16+ Sigma fields mapped to native equivalents. Example mappings:

Sigma FieldKQL (Sentinel)SPL (Splunk)EQL (Elastic)
CommandLineProcessCommandLineprocessprocess.command_line
ImageInitiatingProcessFileNameprocess_nameprocess.executable
UserAccountNameuseruser.name
DestinationIpRemoteIPdest_ipdestination.ip

UI Description

The Rule Optimization page is organized into five sections using the ThreatOps white-and-orange design system:

  1. Summary cards (4-column grid): Total Rules Tracked, Noisy Rules (with red highlight for >40% FP), Auto-Disabled count, and Recommendations Pending
  2. Noisy rules table: Sortable table with Rule ID, Rule Name, FP Rate columns for 7d/30d/90d (color-coded: red ≥ 70%, orange ≥ 40%, green below), trigger counts, and recommendation badge (Disable=red, Tune=yellow, Exclude=blue)
  3. Auto-tune controls: Orange "Run Auto-Tune" button with spinner, dry-run toggle (ON by default), and result panel showing mode badge, rules reviewed/disabled/tuned counts, and detail lines with check icons
  4. Sigma transpiler: Two-column layout with YAML input textarea on the left (pre-populated with a Mimikatz detection example), target SIEM checkboxes (KQL/SPL/EQL), transpile button, and tabbed native query output on the right in a dark terminal-style panel with green text
  5. Audit log table: Timestamped log of past auto-tune runs with mode badge (dry-run=blue, live=green), rules reviewed, and rules disabled counts