mirror of
https://github.com/okieselbach/AutopilotMonitor.git
synced 2026-10-24 04:32:32 +00:00
425502c419
Reworks PPKG detection to one aggregate event the rules parse as an array, adds a default + customizable allow-list, and makes the event storage-safe. Rule engine: - New condition source event_data_array + ItemField: iterates an array field (any-element match), with dot-path dataField support. (RuleEngine.ConditionEvaluators) Agent: - Drop per-package provisioning_package_detected events (noise: a clean Win11 VM ships ~22 OS-inbox .ppkg). One provisioning_package_scan carries an artifacts[] array; anyPpkgFound derived from it (consistent, incl. recovery residue). - Size-based chunking: split artifacts across multiple scan events so each event's Newtonsoft DataJson stays < 24k (well under the 30k Table-Storage truncation that would blind the rule); never drops a tail artifact. Per-artifact string fields (identity/dir/rank/installTime) hard-capped at 256; scanErrors capped. Rules: - ANALYZE-SEC-005 (default on) + SEC-006 (template) fire on artifacts.identity not matching an anchored allow-list (^(?:...)\b) that covers OS-inbox families. - ANALYZE-SEC-007 alarms when a per-source collection cap was hit (scanTruncated). Web/MCP/docs: event_data_array in the rule form (types + fields), analyze-rules docs section + example, event-type catalogs. Tests: rule-engine array/anchor/dot-path/SEC-007; agent artifacts/chunking/field-cap /worst-case-size. Build green; V2.Core 1236; backend rule + web tsc green. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>