Add host correlation and assurance coverage
This commit is contained in:
parent
8194d13734
commit
b40ac4252c
36 changed files with 944 additions and 23 deletions
|
|
@ -168,6 +168,12 @@ def _host_rule_record(rule: HostRule, origin: str) -> dict[str, Any]:
|
|||
conditions["local_ports"] = sorted(rule.local_ports)
|
||||
if rule.local_port_exclude:
|
||||
conditions["local_port_exclude"] = sorted(rule.local_port_exclude)
|
||||
if rule.path_prefixes:
|
||||
conditions["path_prefixes"] = list(rule.path_prefixes)
|
||||
if rule.target_uids:
|
||||
conditions["target_uids"] = sorted(rule.target_uids)
|
||||
if rule.target_gids:
|
||||
conditions["target_gids"] = sorted(rule.target_gids)
|
||||
if rule.argv_regex:
|
||||
conditions["argv_regex"] = rule.argv_regex
|
||||
return {
|
||||
|
|
@ -359,6 +365,9 @@ def _host_event(event: dict[str, Any]) -> HostEvent:
|
|||
event.get("listen_ip", "")))),
|
||||
local_port=_to_int(event.get("local_port", event.get("bind_port",
|
||||
event.get("listen_port", 0)))),
|
||||
target_uid=_to_int(event.get("target_uid", event.get("uid_target", -1))),
|
||||
target_gid=_to_int(event.get("target_gid", event.get("gid_target", -1))),
|
||||
mode=_to_int(event.get("mode", 0)),
|
||||
)
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue