Confirm an existing finding (vulnerability or credential)
(self, finding_id: str, finding_type: str = "auto")
| 358 | return None |
| 359 | |
| 360 | def confirm_finding(self, finding_id: str, finding_type: str = "auto"): |
| 361 | """Confirm an existing finding (vulnerability or credential)""" |
| 362 | try: |
| 363 | network_id = self.get_current_network_id() |
| 364 | confirmed = False |
| 365 | |
| 366 | # Check vulnerabilities |
| 367 | if network_id in self.active_vulnerabilities: |
| 368 | if finding_id in self.active_vulnerabilities[network_id]: |
| 369 | vuln_data = self.active_vulnerabilities[network_id][finding_id] |
| 370 | vuln_data['confirmation_count'] += 1 |
| 371 | vuln_data['last_confirmed'] = datetime.now().isoformat() |
| 372 | vuln_data['pending_resolution'] = False |
| 373 | confirmed = True |
| 374 | |
| 375 | # Check credentials |
| 376 | if network_id in self.active_credentials and not confirmed: |
| 377 | if finding_id in self.active_credentials[network_id]: |
| 378 | cred_data = self.active_credentials[network_id][finding_id] |
| 379 | cred_data['confirmation_count'] += 1 |
| 380 | cred_data['last_confirmed'] = datetime.now().isoformat() |
| 381 | cred_data['pending_resolution'] = False |
| 382 | confirmed = True |
| 383 | |
| 384 | if confirmed: |
| 385 | self.save_intelligence_data() |
| 386 | self.logger.debug(f"Confirmed finding: {finding_id}") |
| 387 | else: |
| 388 | self.logger.warning(f"Finding not found for confirmation: {finding_id}") |
| 389 | |
| 390 | except Exception as e: |
| 391 | self.logger.error(f"Error confirming finding: {e}") |
| 392 | |
| 393 | def resolve_finding(self, finding_id: str, reason: str = "no_longer_detected"): |
| 394 | """Mark a finding as resolved""" |
nothing calls this directly
no test coverage detected