Add typed host event egress rule

This commit is contained in:
Luna 2026-07-09 06:04:30 -07:00
parent 0b010df514
commit 3b037646d2
15 changed files with 360 additions and 31 deletions

View file

@ -10,6 +10,7 @@ from enodia_sentinel.detectors import (
stealth_network,
)
from enodia_sentinel.events.rules import DEFAULT_EXEC_RULES
from enodia_sentinel.events.host_rules import DEFAULT_HOST_RULES
from enodia_sentinel.events.syscall_rules import DEFAULT_SYSCALL_RULES
@ -19,7 +20,7 @@ class TestRegistry(unittest.TestCase):
self.assertEqual(len(nums), len(set(nums)))
def test_count_and_helpers(self):
self.assertEqual(len(sids.BUILTIN_SIDS), 52)
self.assertEqual(len(sids.BUILTIN_SIDS), 53)
self.assertEqual(
sids.all_sids(), frozenset(s.sid for s in sids.BUILTIN_SIDS)
)
@ -37,6 +38,10 @@ class TestRegistry(unittest.TestCase):
sids.engine_sids("syscall_rule"),
frozenset(r.sid for r in DEFAULT_SYSCALL_RULES),
)
self.assertEqual(
sids.engine_sids("host_rule"),
frozenset(r.sid for r in DEFAULT_HOST_RULES),
)
def test_registry_uses_the_source_constants(self):
by_sid = {s.sid: s for s in sids.BUILTIN_SIDS}