Cancel a running scan
(scan_id)
| 17387 | @app.route('/api/threat-intelligence/dashboard') |
| 17388 | def get_threat_intelligence_dashboard(): |
| 17389 | """Get threat intelligence dashboard data""" |
| 17390 | with _network_context_from_request(): |
| 17391 | try: |
| 17392 | if not threat_intelligence: |
| 17393 | return jsonify({'error': 'Threat intelligence system not available'}), 503 |
| 17394 | |
| 17395 | dashboard_data = { |
| 17396 | 'summary': threat_intelligence.get_enriched_findings_summary(), |
| 17397 | 'recent_findings': [], |
| 17398 | 'risk_distribution': {'critical': 0, 'high': 0, 'medium': 0, 'low': 0}, |
| 17399 | 'threat_sources_status': [] |
| 17400 | } |
| 17401 | |
| 17402 | # Get recent enriched findings |
| 17403 | recent_findings = [] |
| 17404 | for finding_id, enriched_finding in list(threat_intelligence.enriched_findings.items())[-10:]: |
| 17405 | recent_findings.append({ |
| 17406 | 'id': finding_id, |
nothing calls this directly
no test coverage detected