Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dev 6.0.0 #643

Merged
merged 13 commits into from
Mar 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/build_windows_exe.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ jobs:
runs-on: windows-2022

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v2
uses: actions/setup-python@v5
with:
python-version: "3.11"

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release_to_docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Docker Meta
id: docker_meta
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/run_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.7, 3.8, 3.9, "3.10", "3.11"]
python-version: [3.8, 3.9, "3.10", "3.11", "3.12"]

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

Expand All @@ -34,7 +34,7 @@ jobs:

- name: Run linters
# Only do linting once
if: matrix.python-version == 3.7
if: matrix.python-version == 3.8
run: python -m invoke lint

- name: Run tests
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
# TODO(#617): Delete this file
name: Run tests with pydantic 1.10
name: Run tests with lowest supported version of pydantic

on:
push:
Expand All @@ -12,19 +11,19 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v2
uses: actions/setup-python@v5
with:
python-version: 3.7
python-version: 3.8

- name: Install sslyze dependencies
run: |
python -m pip install --upgrade pip setuptools
python -m pip install -e .

- name: Install pydantic 1.10
run: python -m pip install "pydantic<2"
- name: Install pydantic 2.2
run: python -m pip install "pydantic==2.2"

- name: Install dev dependencies
run: python -m pip install -r requirements-dev.txt
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/scan_apache2_server.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v2
uses: actions/setup-python@v5
with:
python-version: 3.8

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/scan_iis_server.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ jobs:
runs-on: windows-2019

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v2
uses: actions/setup-python@v5
with:
python-version: 3.8

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/scan_nginx_server.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v2
uses: actions/setup-python@v5
with:
python-version: 3.8

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test_module_setup.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v2
uses: actions/setup-python@v5
with:
python-version: 3.8

Expand Down
3 changes: 0 additions & 3 deletions MANIFEST.in

This file was deleted.

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ $ invoke test
License
-------

Copyright (c) 2023 Alban Diquet
Copyright (c) 2024 Alban Diquet

SSLyze is made available under the terms of the GNU Affero General Public License (AGPL). See LICENSE.txt for details and exceptions.

Expand Down
6 changes: 3 additions & 3 deletions api_sample.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,12 +118,12 @@ def example_json_result_output(
date_scans_completed: datetime,
) -> None:
json_output = SslyzeOutputAsJson(
server_scan_results=[ServerScanResultAsJson.from_orm(result) for result in all_server_scan_results],
server_scan_results=[ServerScanResultAsJson.model_validate(result) for result in all_server_scan_results],
invalid_server_strings=[], # Not needed here - specific to the CLI interface
date_scans_started=date_scans_started,
date_scans_completed=date_scans_completed,
)
json_output_as_str = json_output.json() # TODO(#617): Switch to model_dump_json()
json_output_as_str = json_output.model_dump_json()
json_file_out.write_text(json_output_as_str)


Expand All @@ -132,7 +132,7 @@ def example_json_result_parsing(results_as_json_file: Path) -> None:
results_as_json = results_as_json_file.read_text()

# These results can be parsed
parsed_results = SslyzeOutputAsJson.parse_raw(results_as_json)
parsed_results = SslyzeOutputAsJson.model_validate_json(results_as_json)

# Making it easy to do post-processing and inspection of the results
print("The following servers were scanned:")
Expand Down
Loading
Loading