Repository navigation
Add Windows Event Log (EVTX) parser - #37
Conversation
New EvtxParser in ax-normalize for the binary Windows Event Log format. The BinXML chunk decoding is delegated to the evtx crate, which yields one serde_json::Value per event plus the record id and timestamp; we flatten each event into dotted columns (Event.System.EventID, Event.System.Provider.#attributes.Name, Event.EventData.TargetUserName, ...) and synthesize eventRecordId and timestampEpoch (Unix seconds, via jiff's as_second). That gives Event.System.EventID for rare event-ID point detection / logon dist drift and timestampEpoch for off-hours contextual (--period 24). Binary magic ElfFile\0 (confidence MAGIC); extension .evtx. The evtx crate decodes chunks in parallel but yields records in file order, so output is deterministic. Behind the default-on evtx feature (mirrors the polars-gated binary readers), so the text-only --no-default-features build stays lean. Testing: a hand-built valid empty EVTX header roundtrips to zero rows (the crate integration), the per-record extraction is unit-tested via record_to_row on EVTX-shaped JSON (a real records fixture would need a committed binary blob), and bad magic / truncated input are clean Parse errors. Mutation gate: 0 surviving mutants on the new file. Closes #13 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
Warning Review limit reached
More reviews will be available in 43 minutes and 50 seconds. Learn how PR review limits work. Your organization has run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (4)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Implements the EVTX plugin — issue #13 (the binary Windows Event Log format).
What
The BinXML chunk decoding is delegated to the
evtxcrate, which yields oneserde_json::Valueper event plus the record id and timestamp.EvtxParserflattens each event into dotted columns (
Event.System.EventID,Event.System.Provider.#attributes.Name,Event.EventData.TargetUserName, …)and synthesizes
eventRecordIdandtimestampEpoch(Unix seconds, via jiff'sas_second). That gives the detectors what the issue asks for:Event.System.EventIDfor rare event-IDpointdetection and logondistdrift,
timestampEpochfor off-hourscontextual(--period 24).Determinism
The
evtxcrate decodes chunks in parallel but yields records in file order,and parsing is pure — so output is byte-identical regardless of thread count.
Feature gating
Behind the default-on
evtxfeature (mirrors the polars-gated binaryreaders), so the text-only
--no-default-featuresbuild stays lean anddependency-light. Verified both builds compile and test.
Routing
ElfFile\0(confidenceMAGIC); extension.evtx.Testing
roundtrips to zero rows — exercising the real crate integration.
record_to_rowon EVTX-shapedJSON (a records fixture would require committing a binary blob; the extraction
is the only hand-written, mutation-relevant logic).
AxError::Parse.Gates
fmt/clippy -D warnings/ full workspace tests green (default and--no-default-features).evtx.rs(clean first pass).Closes #13
🤖 Generated with Claude Code