feat: add Rulehound detection rule import integration (refs #38)#42
feat: add Rulehound detection rule import integration (refs #38)#42JJcyborg wants to merge 2 commits into
Conversation
PR Review: Rulehound Detection Rule Import IntegrationReviewing the diff for code correctness, error handling, test coverage, documentation quality, style consistency, and security concerns. 🔴 Critical Issue: Falco condition values are unquotedIn # Current (broken):
condition_parts.append(f"proc.name = {procs[0]}") # → proc.name = rm
condition_parts.append(f"proc.name in ({procs_str})") # → proc.name in (rm, shred)
# Required (Falco needs quoted strings):
condition_parts.append(f"proc.name = \"{procs[0]}\"") # → proc.name = "rm"
condition_parts.append(f"proc.name in ({quoted_procs_str})") # → proc.name in ("rm", "shred")Without quoted string values, Falco will fail to parse these rules. This affects every rule that extracts process names. 🟡 Should Fix1. 2. 3. 4. Silent error swallowing in 🟡 Test Coverage Gaps5. No mock-based tests for network functions 6. Integration tests skip in CI ✅ What Looks Good
Recommendation: Fix the quoting bug (item 🔴) and remove |
…mport, conditional proc_name_exists, improve HTTP error handling
7666600 to
2714ca6
Compare
|
Addressed all review feedback:
Ready for re-review. |
Adds a script to import and convert Rulehound (Sigma) detection rules into Falco-compatible format:
scripts/import_rulehound_rules.py— fetches Sigma Linux rules from SigmaHQ, converts to Falco YAML with proper event-type and MITRE tag mappingtests/test_rulehound_import.py— 33 tests covering conversion, field extraction, and output validationdocs/rulehound.md— documentation on usage, category mapping, and integration stepsCloses #38