fix ui
This commit is contained in:
@@ -11,7 +11,7 @@ from .logs import local_in_failures, read_events, summarize_events, top_field_va
|
||||
from .mitigation import parse_allowlist, suggest_block_candidates
|
||||
from .policies import audit_policies, read_policies
|
||||
from .recommendations import build_recommendations
|
||||
from .threat_intel import enrich_ips, is_public_ip
|
||||
from .threat_intel import ThreatIntelClient, enrich_ips, is_public_ip
|
||||
|
||||
|
||||
def build_status(
|
||||
@@ -37,6 +37,7 @@ def build_status(
|
||||
}
|
||||
)
|
||||
reputation = enrich_ips(intel_ips, limit=25)
|
||||
threat_intel_status = ThreatIntelClient().status()
|
||||
recommendations = build_recommendations(events, anomalies, reputation)
|
||||
block_candidates = suggest_block_candidates(
|
||||
events,
|
||||
@@ -60,8 +61,11 @@ def build_status(
|
||||
"summary": summarize_events(events),
|
||||
"anomaly_summary": anomaly_summary(anomalies),
|
||||
"baseline": {"enabled": bool(baseline), "sources_ready": len(profiles), "new_events_recorded": baseline_events},
|
||||
"capabilities": {"threat_intel": threat_intel_status},
|
||||
"diagnostics": {
|
||||
"top_source_ips": top_field_values(events, "srcip", limit=10),
|
||||
"top_destination_ips": top_field_values(events, "dstip", limit=10),
|
||||
"top_policy_ids": top_field_values(events, "policyid", limit=10),
|
||||
"top_destination_ports": top_field_values(events, "dstport", limit=10),
|
||||
"top_source_ports": top_field_values(events, "srcport", limit=10),
|
||||
"top_services": top_field_values(events, "service", limit=10),
|
||||
|
||||
Reference in New Issue
Block a user