tlscheck 0.1.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- tlscheck-0.1.0/PKG-INFO +128 -0
- tlscheck-0.1.0/README.md +118 -0
- tlscheck-0.1.0/pyproject.toml +41 -0
- tlscheck-0.1.0/pyproject.toml.orig +38 -0
- tlscheck-0.1.0/src/tlscheck/__init__.py +12 -0
- tlscheck-0.1.0/src/tlscheck/__main__.py +5 -0
- tlscheck-0.1.0/src/tlscheck/app.py +676 -0
- tlscheck-0.1.0/src/tlscheck/app.tcss +43 -0
- tlscheck-0.1.0/src/tlscheck/domains.py +224 -0
- tlscheck-0.1.0/src/tlscheck/models.py +118 -0
- tlscheck-0.1.0/src/tlscheck/probe.py +999 -0
tlscheck-0.1.0/PKG-INFO
ADDED
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
Metadata-Version: 2.3
|
|
2
|
+
Name: tlscheck
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Textual TUI that audits TLS versions, ciphers, key exchange and post-quantum readiness of hosts listed in domains.ini
|
|
5
|
+
Author: Andreas Jung
|
|
6
|
+
Author-email: Andreas Jung <info@zopyx.com>
|
|
7
|
+
Requires-Dist: textual>=8.2.8
|
|
8
|
+
Requires-Python: >=3.14
|
|
9
|
+
Description-Content-Type: text/markdown
|
|
10
|
+
|
|
11
|
+
# tlscheck
|
|
12
|
+
|
|
13
|
+
A Textual TUI that audits the TLS configuration of the hosts listed in
|
|
14
|
+
`domains.ini`: protocol versions (1.3, 1.2, 1.1, 1.0), negotiated cipher
|
|
15
|
+
suites, key-exchange groups including hybrid post-quantum groups
|
|
16
|
+
(`X25519MLKEM768`, `SecP256r1MLKEM768`, ...), certificate state, and a
|
|
17
|
+
per-host grade. It also checks the HTTP status, optional basic auth and the
|
|
18
|
+
`Strict-Transport-Security` header.
|
|
19
|
+
|
|
20
|
+

|
|
21
|
+
|
|
22
|
+
## Requirements
|
|
23
|
+
|
|
24
|
+
- Python >= 3.14 and [uv](https://docs.astral.sh/uv/)
|
|
25
|
+
- `openssl` on `PATH`. OpenSSL >= 3.5 is required for post-quantum group
|
|
26
|
+
probing; the probe engine shells out to `openssl s_client -brief`.
|
|
27
|
+
|
|
28
|
+
## Usage
|
|
29
|
+
|
|
30
|
+
```bash
|
|
31
|
+
uv run tlscheck # uses ./domains.ini
|
|
32
|
+
uv run tlscheck --domains other.ini
|
|
33
|
+
uv run python -m tlscheck # same thing
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
Keys: `r` rescan all, `s` rescan selected host, `l` reload `domains.ini`,
|
|
37
|
+
`tab`/`shift+tab` move focus, `q` quit. The Versions column uses fixed slots
|
|
38
|
+
for 1.3/1.2/1.1/1.0; enabled legacy protocols (1.1/1.0) are shown in red and
|
|
39
|
+
cap the grade at B-.
|
|
40
|
+
|
|
41
|
+
For a non-interactive report (no TUI):
|
|
42
|
+
|
|
43
|
+
```bash
|
|
44
|
+
uv run python -m tlscheck.probe --ini domains.ini
|
|
45
|
+
uv run python -m tlscheck.probe --json onkopedia.com zopyx.com
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
## domains.ini
|
|
49
|
+
|
|
50
|
+
```ini
|
|
51
|
+
[onkopedia.com]
|
|
52
|
+
label = Onkopedia
|
|
53
|
+
port = 443
|
|
54
|
+
|
|
55
|
+
[internal.example.org]
|
|
56
|
+
host = 10.0.0.10 ; connect address, SNI stays internal.example.org
|
|
57
|
+
port = 8443
|
|
58
|
+
auth = user:password ; optional HTTP basic auth for the HTTPS probe
|
|
59
|
+
path = /de ; optional URL path for the HTTPS probe (default /)
|
|
60
|
+
enabled = false
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
The section name is the hostname used for SNI and certificate validation.
|
|
64
|
+
`host`, `port`, `label`, `auth`, `path` and `enabled` are optional. Credentials
|
|
65
|
+
are stored in plain text in the INI file — keep it out of version control if
|
|
66
|
+
that matters. The probe performs a `GET` of the path (default `/`) after the
|
|
67
|
+
TLS handshake, so HTTP status, basic-auth success and the
|
|
68
|
+
`Strict-Transport-Security` policy (max-age, includeSubDomains, preload) show
|
|
69
|
+
up in the HTTP/HSTS columns and the detail pane.
|
|
70
|
+
|
|
71
|
+
## Grading
|
|
72
|
+
|
|
73
|
+
| Grade | Meaning |
|
|
74
|
+
|-------|---------|
|
|
75
|
+
| A+ | TLS 1.3, AEAD cipher, and a post-quantum/hybrid group accepted |
|
|
76
|
+
| A | TLS 1.3 with an AEAD cipher |
|
|
77
|
+
| B | TLS 1.2 with AEAD + forward secrecy, no TLS 1.3 |
|
|
78
|
+
| C | TLS 1.2 with CBC/no FS, or legacy TLS 1.0/1.1 also enabled |
|
|
79
|
+
| D | only TLS <= 1.1, or a broken/weak cipher |
|
|
80
|
+
| F | unreachable / handshake failed |
|
|
81
|
+
|
|
82
|
+
The exact rule lives in the `probe.py` module docstring. Handshakes are
|
|
83
|
+
performed with certificate verification disabled for the version matrix (so
|
|
84
|
+
the report shows what the server offers), while certificate trust is checked
|
|
85
|
+
separately against the system store.
|
|
86
|
+
|
|
87
|
+
## Notes
|
|
88
|
+
|
|
89
|
+
- TLS 1.1/1.0 probes pass `-cipher DEFAULT@SECLEVEL=0`; modern OpenSSL refuses
|
|
90
|
+
those protocols otherwise.
|
|
91
|
+
- `s_client` exits 0 even when the handshake fails, so success is parsed from
|
|
92
|
+
its `-brief` output (`CONNECTION ESTABLISHED` + `Protocol version:`).
|
|
93
|
+
- Scans run concurrently, one thread per host, four version probes plus PQ
|
|
94
|
+
group probes per host.
|
|
95
|
+
|
|
96
|
+
## Development
|
|
97
|
+
|
|
98
|
+
```bash
|
|
99
|
+
uv run python -m tlscheck.probe --json onkopedia.com wbho.org zopyx.com mitglieder.dgho.de
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
## CI/CD and releases
|
|
103
|
+
|
|
104
|
+
- `.github/workflows/ci.yml` runs on every push to `master` and on pull
|
|
105
|
+
requests: `ruff format --check`, `ruff check`, `pytest`, `uv build`, and
|
|
106
|
+
uploads the distributions as an artifact.
|
|
107
|
+
- `.github/workflows/release.yml` runs on `v*` tags: it verifies that the tag
|
|
108
|
+
matches `project.version`, repeats the gates, builds, publishes to
|
|
109
|
+
**TestPyPI**, smoke-installs the published version in a fresh venv (with
|
|
110
|
+
retries while TestPyPI propagates), and attaches the wheel/sdist to a GitHub
|
|
111
|
+
release.
|
|
112
|
+
|
|
113
|
+
Cut a release with:
|
|
114
|
+
|
|
115
|
+
```bash
|
|
116
|
+
scripts/release.sh 0.1.1
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
That bumps `pyproject.toml`/`uv.lock`, runs the gates, builds, commits,
|
|
120
|
+
tags `v0.1.1` and pushes — the tag triggers publication. The publish job needs
|
|
121
|
+
a repository secret `TESTPYPI_TOKEN` (TestPyPI API token, username `__token__`).
|
|
122
|
+
|
|
123
|
+
Install the TestPyPI build (dependencies come from PyPI):
|
|
124
|
+
|
|
125
|
+
```bash
|
|
126
|
+
uv pip install --index-url https://test.pypi.org/simple/ \
|
|
127
|
+
--extra-index-url https://pypi.org/simple tlscheck
|
|
128
|
+
```
|
tlscheck-0.1.0/README.md
ADDED
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
# tlscheck
|
|
2
|
+
|
|
3
|
+
A Textual TUI that audits the TLS configuration of the hosts listed in
|
|
4
|
+
`domains.ini`: protocol versions (1.3, 1.2, 1.1, 1.0), negotiated cipher
|
|
5
|
+
suites, key-exchange groups including hybrid post-quantum groups
|
|
6
|
+
(`X25519MLKEM768`, `SecP256r1MLKEM768`, ...), certificate state, and a
|
|
7
|
+
per-host grade. It also checks the HTTP status, optional basic auth and the
|
|
8
|
+
`Strict-Transport-Security` header.
|
|
9
|
+
|
|
10
|
+

|
|
11
|
+
|
|
12
|
+
## Requirements
|
|
13
|
+
|
|
14
|
+
- Python >= 3.14 and [uv](https://docs.astral.sh/uv/)
|
|
15
|
+
- `openssl` on `PATH`. OpenSSL >= 3.5 is required for post-quantum group
|
|
16
|
+
probing; the probe engine shells out to `openssl s_client -brief`.
|
|
17
|
+
|
|
18
|
+
## Usage
|
|
19
|
+
|
|
20
|
+
```bash
|
|
21
|
+
uv run tlscheck # uses ./domains.ini
|
|
22
|
+
uv run tlscheck --domains other.ini
|
|
23
|
+
uv run python -m tlscheck # same thing
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
Keys: `r` rescan all, `s` rescan selected host, `l` reload `domains.ini`,
|
|
27
|
+
`tab`/`shift+tab` move focus, `q` quit. The Versions column uses fixed slots
|
|
28
|
+
for 1.3/1.2/1.1/1.0; enabled legacy protocols (1.1/1.0) are shown in red and
|
|
29
|
+
cap the grade at B-.
|
|
30
|
+
|
|
31
|
+
For a non-interactive report (no TUI):
|
|
32
|
+
|
|
33
|
+
```bash
|
|
34
|
+
uv run python -m tlscheck.probe --ini domains.ini
|
|
35
|
+
uv run python -m tlscheck.probe --json onkopedia.com zopyx.com
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
## domains.ini
|
|
39
|
+
|
|
40
|
+
```ini
|
|
41
|
+
[onkopedia.com]
|
|
42
|
+
label = Onkopedia
|
|
43
|
+
port = 443
|
|
44
|
+
|
|
45
|
+
[internal.example.org]
|
|
46
|
+
host = 10.0.0.10 ; connect address, SNI stays internal.example.org
|
|
47
|
+
port = 8443
|
|
48
|
+
auth = user:password ; optional HTTP basic auth for the HTTPS probe
|
|
49
|
+
path = /de ; optional URL path for the HTTPS probe (default /)
|
|
50
|
+
enabled = false
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
The section name is the hostname used for SNI and certificate validation.
|
|
54
|
+
`host`, `port`, `label`, `auth`, `path` and `enabled` are optional. Credentials
|
|
55
|
+
are stored in plain text in the INI file — keep it out of version control if
|
|
56
|
+
that matters. The probe performs a `GET` of the path (default `/`) after the
|
|
57
|
+
TLS handshake, so HTTP status, basic-auth success and the
|
|
58
|
+
`Strict-Transport-Security` policy (max-age, includeSubDomains, preload) show
|
|
59
|
+
up in the HTTP/HSTS columns and the detail pane.
|
|
60
|
+
|
|
61
|
+
## Grading
|
|
62
|
+
|
|
63
|
+
| Grade | Meaning |
|
|
64
|
+
|-------|---------|
|
|
65
|
+
| A+ | TLS 1.3, AEAD cipher, and a post-quantum/hybrid group accepted |
|
|
66
|
+
| A | TLS 1.3 with an AEAD cipher |
|
|
67
|
+
| B | TLS 1.2 with AEAD + forward secrecy, no TLS 1.3 |
|
|
68
|
+
| C | TLS 1.2 with CBC/no FS, or legacy TLS 1.0/1.1 also enabled |
|
|
69
|
+
| D | only TLS <= 1.1, or a broken/weak cipher |
|
|
70
|
+
| F | unreachable / handshake failed |
|
|
71
|
+
|
|
72
|
+
The exact rule lives in the `probe.py` module docstring. Handshakes are
|
|
73
|
+
performed with certificate verification disabled for the version matrix (so
|
|
74
|
+
the report shows what the server offers), while certificate trust is checked
|
|
75
|
+
separately against the system store.
|
|
76
|
+
|
|
77
|
+
## Notes
|
|
78
|
+
|
|
79
|
+
- TLS 1.1/1.0 probes pass `-cipher DEFAULT@SECLEVEL=0`; modern OpenSSL refuses
|
|
80
|
+
those protocols otherwise.
|
|
81
|
+
- `s_client` exits 0 even when the handshake fails, so success is parsed from
|
|
82
|
+
its `-brief` output (`CONNECTION ESTABLISHED` + `Protocol version:`).
|
|
83
|
+
- Scans run concurrently, one thread per host, four version probes plus PQ
|
|
84
|
+
group probes per host.
|
|
85
|
+
|
|
86
|
+
## Development
|
|
87
|
+
|
|
88
|
+
```bash
|
|
89
|
+
uv run python -m tlscheck.probe --json onkopedia.com wbho.org zopyx.com mitglieder.dgho.de
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
## CI/CD and releases
|
|
93
|
+
|
|
94
|
+
- `.github/workflows/ci.yml` runs on every push to `master` and on pull
|
|
95
|
+
requests: `ruff format --check`, `ruff check`, `pytest`, `uv build`, and
|
|
96
|
+
uploads the distributions as an artifact.
|
|
97
|
+
- `.github/workflows/release.yml` runs on `v*` tags: it verifies that the tag
|
|
98
|
+
matches `project.version`, repeats the gates, builds, publishes to
|
|
99
|
+
**TestPyPI**, smoke-installs the published version in a fresh venv (with
|
|
100
|
+
retries while TestPyPI propagates), and attaches the wheel/sdist to a GitHub
|
|
101
|
+
release.
|
|
102
|
+
|
|
103
|
+
Cut a release with:
|
|
104
|
+
|
|
105
|
+
```bash
|
|
106
|
+
scripts/release.sh 0.1.1
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
That bumps `pyproject.toml`/`uv.lock`, runs the gates, builds, commits,
|
|
110
|
+
tags `v0.1.1` and pushes — the tag triggers publication. The publish job needs
|
|
111
|
+
a repository secret `TESTPYPI_TOKEN` (TestPyPI API token, username `__token__`).
|
|
112
|
+
|
|
113
|
+
Install the TestPyPI build (dependencies come from PyPI):
|
|
114
|
+
|
|
115
|
+
```bash
|
|
116
|
+
uv pip install --index-url https://test.pypi.org/simple/ \
|
|
117
|
+
--extra-index-url https://pypi.org/simple tlscheck
|
|
118
|
+
```
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
[project]
|
|
2
|
+
name = "tlscheck"
|
|
3
|
+
version = "0.1.0"
|
|
4
|
+
description = "Textual TUI that audits TLS versions, ciphers, key exchange and post-quantum readiness of hosts listed in domains.ini"
|
|
5
|
+
readme = "README.md"
|
|
6
|
+
requires-python = ">=3.14"
|
|
7
|
+
dependencies = ["textual>=8.2.8"]
|
|
8
|
+
|
|
9
|
+
[[project.authors]]
|
|
10
|
+
name = "Andreas Jung"
|
|
11
|
+
email = "info@zopyx.com"
|
|
12
|
+
|
|
13
|
+
[project.scripts]
|
|
14
|
+
tlscheck = "tlscheck:main"
|
|
15
|
+
|
|
16
|
+
[build-system]
|
|
17
|
+
requires = ["uv_build>=0.13.12,<0.14.0"]
|
|
18
|
+
build-backend = "uv_build"
|
|
19
|
+
|
|
20
|
+
[dependency-groups]
|
|
21
|
+
dev = [
|
|
22
|
+
"pytest>=9.2.0",
|
|
23
|
+
"ruff>=0.17.6",
|
|
24
|
+
]
|
|
25
|
+
|
|
26
|
+
[tool.ruff]
|
|
27
|
+
target-version = "py314"
|
|
28
|
+
line-length = 88
|
|
29
|
+
|
|
30
|
+
[tool.ruff.lint]
|
|
31
|
+
select = [
|
|
32
|
+
"E",
|
|
33
|
+
"F",
|
|
34
|
+
"W",
|
|
35
|
+
"I",
|
|
36
|
+
"UP",
|
|
37
|
+
]
|
|
38
|
+
ignore = ["E501"]
|
|
39
|
+
|
|
40
|
+
[tool.ruff.lint.isort]
|
|
41
|
+
known-first-party = ["tlscheck"]
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
[project]
|
|
2
|
+
name = "tlscheck"
|
|
3
|
+
version = "0.1.0"
|
|
4
|
+
description = "Textual TUI that audits TLS versions, ciphers, key exchange and post-quantum readiness of hosts listed in domains.ini"
|
|
5
|
+
readme = "README.md"
|
|
6
|
+
authors = [
|
|
7
|
+
{ name = "Andreas Jung", email = "info@zopyx.com" }
|
|
8
|
+
]
|
|
9
|
+
requires-python = ">=3.14"
|
|
10
|
+
dependencies = [
|
|
11
|
+
"textual>=8.2.8",
|
|
12
|
+
]
|
|
13
|
+
|
|
14
|
+
[project.scripts]
|
|
15
|
+
tlscheck = "tlscheck:main"
|
|
16
|
+
|
|
17
|
+
[build-system]
|
|
18
|
+
requires = ["uv_build>=0.13.12,<0.14.0"]
|
|
19
|
+
build-backend = "uv_build"
|
|
20
|
+
|
|
21
|
+
[dependency-groups]
|
|
22
|
+
dev = [
|
|
23
|
+
"pytest>=9.2.0",
|
|
24
|
+
"ruff>=0.17.6",
|
|
25
|
+
]
|
|
26
|
+
|
|
27
|
+
[tool.ruff]
|
|
28
|
+
target-version = "py314"
|
|
29
|
+
line-length = 88
|
|
30
|
+
|
|
31
|
+
[tool.ruff.lint]
|
|
32
|
+
select = ["E", "F", "W", "I", "UP"]
|
|
33
|
+
# Long strings (error messages, CLI help) are not worth wrapping; the
|
|
34
|
+
# formatter already controls code line length.
|
|
35
|
+
ignore = ["E501"]
|
|
36
|
+
|
|
37
|
+
[tool.ruff.lint.isort]
|
|
38
|
+
known-first-party = ["tlscheck"]
|