Get traffic analyzer status and summary
()
| 16863 | } |
| 16864 | |
| 16865 | # Enrich the finding |
| 16866 | import asyncio |
| 16867 | enriched_finding = asyncio.run(threat_intelligence.enrich_finding_with_threat_intelligence(finding)) |
| 16868 | |
| 16869 | # Convert risk score from 0-10 scale to 0-100 scale for frontend |
| 16870 | risk_score_100 = min(int(enriched_finding.dynamic_risk_score * 10), 100) |
| 16871 | |
| 16872 | return jsonify({ |
| 16873 | 'success': True, |
| 16874 | 'target': target, |
| 16875 | 'risk_score': risk_score_100, |
| 16876 | 'dynamic_risk_score': enriched_finding.dynamic_risk_score, |
| 16877 | 'executive_summary': enriched_finding.executive_summary, |
| 16878 | 'recommended_actions': enriched_finding.recommended_actions, |
| 16879 | 'threat_contexts_count': len(enriched_finding.threat_contexts), |
| 16880 | 'attribution': { |
| 16881 | 'actor_name': enriched_finding.attribution.actor_name if enriched_finding.attribution else None, |
| 16882 | 'confidence': enriched_finding.attribution.confidence if enriched_finding.attribution else 0.0 |
| 16883 | }, |
| 16884 | 'enriched_finding_id': finding['id'] |
| 16885 | }) |
| 16886 |
nothing calls this directly
no test coverage detected