MCPcopy Create free account
hub / github.com/PierreGode/Ragnar / get_traffic_status

Function get_traffic_status

webapp_modern.py:16865–16883  ·  view source on GitHub ↗

Get traffic analyzer status and summary

()

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 4

errorMethod · 0.80
get_traffic_analyzerFunction · 0.70
is_availableMethod · 0.45
get_summaryMethod · 0.45

Tested by

no test coverage detected