Skip to content

Commit

Permalink
Fix JSON output
Browse files Browse the repository at this point in the history
  • Loading branch information
nabla-c0d3 committed Jan 3, 2025
1 parent 863fa05 commit 79377bf
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 3 deletions.
49 changes: 48 additions & 1 deletion json_output_schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
"$ref": "#/$defs/HttpHeadersScanAttemptAsJson"
},
"tls_extended_master_secret": {
"$ref": "#/$defs/EmsExtensionScanResultAsJson"
"$ref": "#/$defs/EmsExtensionScanAttemptAsJson"
}
},
"required": [
Expand Down Expand Up @@ -372,6 +372,53 @@
"title": "EarlyDataScanResultAsJson",
"type": "object"
},
"EmsExtensionScanAttemptAsJson": {
"additionalProperties": false,
"properties": {
"status": {
"$ref": "#/$defs/ScanCommandAttemptStatusEnum"
},
"error_reason": {
"anyOf": [
{
"$ref": "#/$defs/ScanCommandErrorReasonEnum"
},
{
"type": "null"
}
]
},
"error_trace": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Error Trace"
},
"result": {
"anyOf": [
{
"$ref": "#/$defs/EmsExtensionScanResultAsJson"
},
{
"type": "null"
}
]
}
},
"required": [
"status",
"error_reason",
"error_trace",
"result"
],
"title": "EmsExtensionScanAttemptAsJson",
"type": "object"
},
"EmsExtensionScanResultAsJson": {
"additionalProperties": false,
"properties": {
Expand Down
4 changes: 2 additions & 2 deletions sslyze/json/json_output.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
from sslyze.plugins.compression_plugin import CompressionScanAttemptAsJson
from sslyze.plugins.early_data_plugin import EarlyDataScanAttemptAsJson
from sslyze.plugins.elliptic_curves_plugin import SupportedEllipticCurvesScanAttemptAsJson
from sslyze.plugins.ems_extension_plugin import EmsExtensionScanResultAsJson
from sslyze.plugins.ems_extension_plugin import EmsExtensionScanAttemptAsJson
from sslyze.plugins.fallback_scsv_plugin import FallbackScsvScanAttemptAsJson
from sslyze.plugins.heartbleed_plugin import HeartbleedScanAttemptAsJson
from sslyze.plugins.http_headers_plugin import HttpHeadersScanAttemptAsJson
Expand Down Expand Up @@ -66,7 +66,7 @@ class AllScanCommandsAttemptsAsJson(BaseModelWithOrmModeAndForbid):
session_resumption: SessionResumptionSupportScanAttemptAsJson
elliptic_curves: SupportedEllipticCurvesScanAttemptAsJson
http_headers: HttpHeadersScanAttemptAsJson
tls_extended_master_secret: EmsExtensionScanResultAsJson
tls_extended_master_secret: EmsExtensionScanAttemptAsJson

@model_validator(mode="before")
@classmethod
Expand Down

0 comments on commit 79377bf

Please sign in to comment.