-
Notifications
You must be signed in to change notification settings - Fork 456
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[#487] Refactor JSON output logic to switch from TypedDict to pydantic
Fix some tests Fix tests Add tests and JSON schema Fix requirements Fix imports Update documentation
- Loading branch information
1 parent
3a59a75
commit 3a9df3a
Showing
63 changed files
with
20,022 additions
and
1,007 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
Exporting and processing scan results in JSON | ||
############################################# | ||
|
||
The result of SSLyze scans can be serialized to JSON for further processing. SSLyze also provides a helper class to | ||
parse JSON scan results; it can be used to process the results of SSLyze scans in a separate Python program. | ||
|
||
A schema of the JSON output is available in the code repository at | ||
`./json_output_schema.json <https://github.com/nabla-c0d3/sslyze/blob/release/json_output_schema.json>`_. | ||
|
||
JSON output when using the CLI | ||
****************************** | ||
|
||
When using the CLI, the scan results can be exported to a JSON file using the ``--json_out`` option:: | ||
|
||
$ python -m sslyze www.google.com www.facebook.com --json_out=result.json | ||
|
||
The generated JSON file can then be parsed using the ``SslyzeOutputAsJson.from_file()`` method: | ||
|
||
.. literalinclude:: ../api_sample.py | ||
:pyobject: example_json_result_parsing | ||
|
||
The resulting Python object then contains the scan results. Type annotations are available for all fields, thereby | ||
making it easier to process the results. | ||
|
||
.. autoclass:: SslyzeOutputAsJson |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.