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

Method run_resolution_check

network_intelligence.py:572–599  ·  view source on GitHub ↗

Check for findings that should be resolved due to timeout

(self)

Source from the content-addressed store, hash-verified

570 return {'vulnerabilities': {}, 'credentials': {}, 'counts': {}}
571
572 def run_resolution_check(self):
573 """Check for findings that should be resolved due to timeout"""
574 try:
575 current_time = datetime.now()
576 resolved_count = 0
577
578 # Check all networks for pending resolution
579 for network_id in list(self.active_vulnerabilities.keys()):
580 for vuln_id, vuln_data in list(self.active_vulnerabilities[network_id].items()):
581 if vuln_data.get('pending_resolution'):
582 scheduled_time = datetime.fromisoformat(vuln_data.get('resolution_scheduled', current_time.isoformat()))
583 if (current_time - scheduled_time).total_seconds() > self.resolution_timeout:
584 self.resolve_finding(vuln_id, "timeout_no_confirmation")
585 resolved_count += 1
586
587 for network_id in list(self.active_credentials.keys()):
588 for cred_id, cred_data in list(self.active_credentials[network_id].items()):
589 if cred_data.get('pending_resolution'):
590 scheduled_time = datetime.fromisoformat(cred_data.get('resolution_scheduled', current_time.isoformat()))
591 if (current_time - scheduled_time).total_seconds() > self.resolution_timeout:
592 self.resolve_finding(cred_id, "timeout_no_confirmation")
593 resolved_count += 1
594
595 if resolved_count > 0:
596 self.logger.info(f"Resolved {resolved_count} findings due to timeout")
597
598 except Exception as e:
599 self.logger.error(f"Error running resolution check: {e}")
600
601 def get_network_summary(self) -> Dict:
602 """Get summary of all network intelligence"""

Callers

nothing calls this directly

Calls 6

resolve_findingMethod · 0.95
infoMethod · 0.80
errorMethod · 0.80
keysMethod · 0.45
itemsMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected