Skip to content

feat: add YARA memory scanning#2

Open
Karib0u wants to merge 2 commits intomainfrom
feat/yara-memory-scan
Open

feat: add YARA memory scanning#2
Karib0u wants to merge 2 commits intomainfrom
feat/yara-memory-scan

Conversation

@Karib0u
Copy link
Copy Markdown
Owner

@Karib0u Karib0u commented May 3, 2026

Summary

  • Adds optional YARA memory scanning triggered on process-start events
  • New src/memory.rs module with platform-specific readers (Linux /proc/<pid>/mem, Windows ReadProcessMemory)
  • scan_bytes() added to Scanner, collect_yara_matches() extracted as shared helper
  • Background worker with configurable delay, per-region and per-process byte caps
  • Disabled by default (yara_memory_enabled = false), non-blocking (try_send), hot-reload compatible

Test plan

  • CI fmt passes
  • CI clippy passes on Linux and Windows
  • CI tests pass on Linux and Windows
  • Verified locally: cargo fmt --check ✅, cargo clippy -D clippy::all ✅ (exit 0), cargo test ✅ 85/85

🤖 Generated with Claude Code

Karib0u and others added 2 commits May 3, 2026 15:28
MemoryRegionKind::Image is only constructed on Windows; on Linux the variant
exists for API completeness. MemoryRegion.base and .size are written but only
chunk.base is consumed by the alert builder — the fields are kept for future
use. Both suppressed with #[allow(dead_code)] so CI passes with -D warnings.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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