Get detailed traffic stats for a specific host
(ip)
| 17127 | summary = threat_intelligence.get_enriched_findings_summary() or {} |
| 17128 | default_last_update = summary.get('last_intelligence_update') |
| 17129 | |
| 17130 | serialized_findings = [ |
| 17131 | _serialize_enriched_finding(finding_id, enriched_finding, default_last_update) |
| 17132 | for finding_id, enriched_finding in threat_intelligence.enriched_findings.items() |
| 17133 | ] |
| 17134 | |
| 17135 | risk_distribution = {'critical': 0, 'high': 0, 'medium': 0, 'low': 0} |
| 17136 | active_campaigns = set() |
| 17137 | |
| 17138 | for enriched_finding in threat_intelligence.enriched_findings.values(): |
| 17139 | score = enriched_finding.dynamic_risk_score or 0.0 |
| 17140 | if score >= 9.0: |
| 17141 | risk_distribution['critical'] += 1 |
| 17142 | elif score >= 7.0: |
| 17143 | risk_distribution['high'] += 1 |
| 17144 | elif score >= 4.0: |
| 17145 | risk_distribution['medium'] += 1 |
| 17146 | else: |
nothing calls this directly
no test coverage detected