diff --git a/sslyze/plugins/scan_commands.py b/sslyze/plugins/scan_commands.py index 48fed41d..b184ce9f 100644 --- a/sslyze/plugins/scan_commands.py +++ b/sslyze/plugins/scan_commands.py @@ -54,6 +54,7 @@ class ScanCommand: """The list of all scan commands supported by SSLyze. """ + CERTIFICATE_INFO: Literal["certificate_info"] = "certificate_info" SSL_2_0_CIPHER_SUITES: Literal["ssl_2_0_cipher_suites"] = "ssl_2_0_cipher_suites" diff --git a/sslyze/scanner.py b/sslyze/scanner.py index c3e43ce4..128b1a48 100644 --- a/sslyze/scanner.py +++ b/sslyze/scanner.py @@ -40,6 +40,7 @@ class ScanCommandErrorReasonEnum(Enum): class ScanCommandError: """An error that prevented a specific scan command ran against a specific server from completing. .""" + reason: ScanCommandErrorReasonEnum exception_trace: TracebackException @@ -54,6 +55,7 @@ class ScanCommandExtraArgumentsDict(TypedDict, total=False): class ServerScanRequest: """A request to scan a specific server with the supplied scan commands. """ + server_info: ServerConnectivityInfo scan_commands: Set[ScanCommandType] scan_commands_extra_arguments: ScanCommandExtraArgumentsDict = field(default_factory=dict) # type: ignore @@ -73,6 +75,7 @@ def __post_init__(self) -> None: class ScanCommandResultsDict(TypedDict, total=False): """A dictionary of results for every scan command that was scheduled against a specific server. """ + # Field is present if the corresponding scan command was scheduled and was run successfully certificate_info: CertificateInfoScanResult ssl_2_0_cipher_suites: CipherSuitesScanResult @@ -100,6 +103,7 @@ class ScanCommandResultsDict(TypedDict, total=False): class ServerScanResult: """The result of a ServerScanRequest that was completed by a Scanner. """ + scan_commands_results: ScanCommandResultsDict scan_commands_errors: ScanCommandErrorsDict