Get active connections
()
| 17032 | data = request.get_json() |
| 17033 | required_fields = ['host', 'port', 'service', 'vulnerability'] |
| 17034 | |
| 17035 | if not all(field in data for field in required_fields): |
| 17036 | return jsonify({'error': 'Missing required fields'}), 400 |
| 17037 | |
| 17038 | vuln_id = shared_data.network_intelligence.add_vulnerability( |
| 17039 | host=data['host'], |
| 17040 | port=data['port'], |
| 17041 | service=data['service'], |
| 17042 | vulnerability=data['vulnerability'], |
| 17043 | severity=data.get('severity', 'medium'), |
| 17044 | details=data.get('details', {}) |
| 17045 | ) |
| 17046 | |
| 17047 | if vuln_id: |
| 17048 | # Trigger sync and broadcast update |
| 17049 | sync_all_counts() |
| 17050 | broadcast_status_update() |
| 17051 | |
| 17052 | return jsonify({ |
nothing calls this directly
no test coverage detected