(findings: List[VulnerabilityFinding], host: str, port: int, cert)
| 720 | matched_at: str = "", |
| 721 | ) -> VulnerabilityFinding: |
| 722 | return VulnerabilityFinding( |
| 723 | finding_id=uuid.uuid4().hex, |
| 724 | scanner=scanner, |
| 725 | host=host, |
| 726 | port=port, |
| 727 | severity=severity, |
| 728 | title=title, |
| 729 | description=description, |
| 730 | evidence=evidence, |
| 731 | remediation=remediation, |
| 732 | matched_at=matched_at, |
| 733 | ) |
| 734 | |
| 735 | |
| 736 | def _parse_sslyze_result(scan, host: str, port: int) -> tuple[List[VulnerabilityFinding], Dict[str, Any]]: |
| 737 | findings: List[VulnerabilityFinding] = [] |
| 738 | artifacts: Dict[str, Any] = {"host": host, "port": port} |
| 739 | |
| 740 | try: |
| 741 | attempts = scan.scan_result if hasattr(scan, "scan_result") else None |
| 742 | except Exception: |
| 743 | attempts = None |
| 744 | if attempts is None: |
| 745 | return findings, artifacts |
| 746 | |
| 747 | cert_attempt = getattr(attempts, "certificate_info", None) |
| 748 | if cert_attempt and getattr(cert_attempt, "result", None): |
| 749 | cert_result = cert_attempt.result |
| 750 | deployments = getattr(cert_result, "certificate_deployments", []) or [] |
no test coverage detected