Skip to content

feat(evtx): implement EVTX input adapter for eval command#85

Merged
mostafa merged 2 commits intomainfrom
feat/evtx-adapter
May 6, 2026
Merged

feat(evtx): implement EVTX input adapter for eval command#85
mostafa merged 2 commits intomainfrom
feat/evtx-adapter

Conversation

@mostafa
Copy link
Copy Markdown
Member

@mostafa mostafa commented May 6, 2026

Summary

  • Add EvtxFileReader in rsigma-runtime behind the evtx feature flag, wrapping evtx::EvtxParser to iterate .evtx records as serde_json::Value
  • Extend rsigma eval -e @file.evtx to auto-detect the .evtx extension and route through the binary parser instead of line-oriented NDJSON
  • Set default-features = false on the evtx dependency to avoid pulling in evtx_dump CLI deps

Test plan

  • cargo check --workspace --all-features passes
  • cargo clippy --workspace --all-targets --all-features -- -D warnings passes
  • cargo fmt --all -- --check passes
  • cargo test --workspace passes (no regressions)
  • cargo test -p rsigma-runtime --features evtx --test evtx_integration passes (2 new tests)
  • cargo deny check passes
  • CI pipeline passes

mostafa added 2 commits May 6, 2026 16:31
Add support for evaluating Sigma rules directly against Windows Event
Log (.evtx) files via `rsigma eval -e @security.evtx`, bypassing the
line-oriented parsing layer since EVTX is a binary format.

Changes:
- rsigma-runtime: add EvtxFileReader in input/evtx.rs behind the
  `evtx` feature flag, wrapping evtx::EvtxParser with single-threaded
  ParserSettings and yielding serde_json::Value per record
- rsigma-runtime: set default-features = false on evtx dep to avoid
  pulling in evtx_dump CLI dependencies
- rsigma-cli: add EvtxFile variant to EventSource, auto-detect .evtx
  extension in resolve_event_source, handle in both correlation and
  detection-only eval paths
- rsigma-cli: update --event help text to mention .evtx support
- Add integration test with a real security.evtx fixture validating
  record iteration and EventID 4624 detection
Update root README, rsigma-cli README, rsigma-runtime README, and the
Mermaid architecture diagram to cover the new EVTX input adapter: format
lists, usage examples, feature flag descriptions, event input modes
table, and architecture diagrams.
@mostafa mostafa merged commit 9301527 into main May 6, 2026
12 of 13 checks passed
@mostafa mostafa deleted the feat/evtx-adapter branch May 6, 2026 14:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant