quantumsafe-scan 0.3.2__tar.gz → 0.3.3__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.
- {quantumsafe_scan-0.3.2/quantumsafe_scan.egg-info → quantumsafe_scan-0.3.3}/PKG-INFO +10 -10
- {quantumsafe_scan-0.3.2 → quantumsafe_scan-0.3.3}/README.md +9 -9
- {quantumsafe_scan-0.3.2 → quantumsafe_scan-0.3.3}/cli/__init__.py +1 -1
- {quantumsafe_scan-0.3.2 → quantumsafe_scan-0.3.3}/cli/reporter.py +1 -1
- {quantumsafe_scan-0.3.2 → quantumsafe_scan-0.3.3}/cli/scorer.py +5 -3
- {quantumsafe_scan-0.3.2 → quantumsafe_scan-0.3.3}/pyproject.toml +1 -1
- {quantumsafe_scan-0.3.2 → quantumsafe_scan-0.3.3/quantumsafe_scan.egg-info}/PKG-INFO +10 -10
- {quantumsafe_scan-0.3.2 → quantumsafe_scan-0.3.3}/tests/test_api.py +7 -0
- {quantumsafe_scan-0.3.2 → quantumsafe_scan-0.3.3}/tests/test_scorer.py +15 -0
- {quantumsafe_scan-0.3.2 → quantumsafe_scan-0.3.3}/LICENSE +0 -0
- {quantumsafe_scan-0.3.2 → quantumsafe_scan-0.3.3}/cli/callgraph.py +0 -0
- {quantumsafe_scan-0.3.2 → quantumsafe_scan-0.3.3}/cli/certchain.py +0 -0
- {quantumsafe_scan-0.3.2 → quantumsafe_scan-0.3.3}/cli/cli.py +0 -0
- {quantumsafe_scan-0.3.2 → quantumsafe_scan-0.3.3}/cli/dependencies.py +0 -0
- {quantumsafe_scan-0.3.2 → quantumsafe_scan-0.3.3}/cli/diff.py +0 -0
- {quantumsafe_scan-0.3.2 → quantumsafe_scan-0.3.3}/cli/horizon.py +0 -0
- {quantumsafe_scan-0.3.2 → quantumsafe_scan-0.3.3}/cli/origins.py +0 -0
- {quantumsafe_scan-0.3.2 → quantumsafe_scan-0.3.3}/cli/reachability.py +0 -0
- {quantumsafe_scan-0.3.2 → quantumsafe_scan-0.3.3}/cli/recommender.py +0 -0
- {quantumsafe_scan-0.3.2 → quantumsafe_scan-0.3.3}/cli/remediation.py +0 -0
- {quantumsafe_scan-0.3.2 → quantumsafe_scan-0.3.3}/cli/scanner.py +0 -0
- {quantumsafe_scan-0.3.2 → quantumsafe_scan-0.3.3}/cli/taint.py +0 -0
- {quantumsafe_scan-0.3.2 → quantumsafe_scan-0.3.3}/cli/tlsscan.py +0 -0
- {quantumsafe_scan-0.3.2 → quantumsafe_scan-0.3.3}/quantumsafe_scan.egg-info/SOURCES.txt +0 -0
- {quantumsafe_scan-0.3.2 → quantumsafe_scan-0.3.3}/quantumsafe_scan.egg-info/dependency_links.txt +0 -0
- {quantumsafe_scan-0.3.2 → quantumsafe_scan-0.3.3}/quantumsafe_scan.egg-info/entry_points.txt +0 -0
- {quantumsafe_scan-0.3.2 → quantumsafe_scan-0.3.3}/quantumsafe_scan.egg-info/requires.txt +0 -0
- {quantumsafe_scan-0.3.2 → quantumsafe_scan-0.3.3}/quantumsafe_scan.egg-info/top_level.txt +0 -0
- {quantumsafe_scan-0.3.2 → quantumsafe_scan-0.3.3}/setup.cfg +0 -0
- {quantumsafe_scan-0.3.2 → quantumsafe_scan-0.3.3}/tests/test_benchmark.py +0 -0
- {quantumsafe_scan-0.3.2 → quantumsafe_scan-0.3.3}/tests/test_callgraph.py +0 -0
- {quantumsafe_scan-0.3.2 → quantumsafe_scan-0.3.3}/tests/test_certchain.py +0 -0
- {quantumsafe_scan-0.3.2 → quantumsafe_scan-0.3.3}/tests/test_conformance.py +0 -0
- {quantumsafe_scan-0.3.2 → quantumsafe_scan-0.3.3}/tests/test_cors.py +0 -0
- {quantumsafe_scan-0.3.2 → quantumsafe_scan-0.3.3}/tests/test_diff.py +0 -0
- {quantumsafe_scan-0.3.2 → quantumsafe_scan-0.3.3}/tests/test_features.py +0 -0
- {quantumsafe_scan-0.3.2 → quantumsafe_scan-0.3.3}/tests/test_horizon.py +0 -0
- {quantumsafe_scan-0.3.2 → quantumsafe_scan-0.3.3}/tests/test_origins.py +0 -0
- {quantumsafe_scan-0.3.2 → quantumsafe_scan-0.3.3}/tests/test_pqc.py +0 -0
- {quantumsafe_scan-0.3.2 → quantumsafe_scan-0.3.3}/tests/test_quantum.py +0 -0
- {quantumsafe_scan-0.3.2 → quantumsafe_scan-0.3.3}/tests/test_remediation.py +0 -0
- {quantumsafe_scan-0.3.2 → quantumsafe_scan-0.3.3}/tests/test_scanner.py +0 -0
- {quantumsafe_scan-0.3.2 → quantumsafe_scan-0.3.3}/tests/test_schema.py +0 -0
- {quantumsafe_scan-0.3.2 → quantumsafe_scan-0.3.3}/tests/test_security_hardening.py +0 -0
- {quantumsafe_scan-0.3.2 → quantumsafe_scan-0.3.3}/tests/test_seeded.py +0 -0
- {quantumsafe_scan-0.3.2 → quantumsafe_scan-0.3.3}/tests/test_taint.py +0 -0
- {quantumsafe_scan-0.3.2 → quantumsafe_scan-0.3.3}/tests/test_tlsscan.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: quantumsafe-scan
|
|
3
|
-
Version: 0.3.
|
|
3
|
+
Version: 0.3.3
|
|
4
4
|
Summary: Scan codebases and dependencies for quantum-vulnerable cryptography and generate a NIST-aligned migration plan (SARIF + CycloneDX CBOM).
|
|
5
5
|
Author: QuantumSafe
|
|
6
6
|
License: MIT
|
|
@@ -39,16 +39,14 @@ Dynamic: license-file
|
|
|
39
39
|
<img src="https://img.shields.io/pypi/pyversions/quantumsafe-scan?style=flat-square&logo=python&logoColor=white" alt="Python versions">
|
|
40
40
|
<a href="https://github.com/Danny-397/Quantum-Safe-Scan/actions/workflows/ci.yml"><img src="https://img.shields.io/github/actions/workflow/status/Danny-397/Quantum-Safe-Scan/ci.yml?branch=main&style=flat-square&logo=githubactions&logoColor=white&label=CI" alt="CI status"></a>
|
|
41
41
|
<a href="https://github.com/Danny-397/Quantum-Safe-Scan/tags"><img src="https://img.shields.io/github/v/tag/Danny-397/Quantum-Safe-Scan?style=flat-square&logo=github&label=version&color=5b73e8" alt="Latest version"></a>
|
|
42
|
-
<a href="https://github.com/Danny-397/Quantum-Safe-Scan"><img src="https://img.shields.io/github/stars/Danny-397/Quantum-Safe-Scan?style=flat-square&logo=github" alt="Stars"></a>
|
|
43
|
-
<img src="https://img.shields.io/github/last-commit/Danny-397/Quantum-Safe-Scan?style=flat-square&color=555" alt="Last commit">
|
|
44
42
|
<img src="https://img.shields.io/github/license/Danny-397/Quantum-Safe-Scan?style=flat-square&color=3fb950" alt="License: MIT">
|
|
45
43
|
<a href="https://doi.org/10.5281/zenodo.23843488"><img src="https://img.shields.io/badge/DOI-10.5281%2Fzenodo.23843488-5b73e8?style=flat-square" alt="DOI 10.5281/zenodo.23843488"></a>
|
|
46
44
|
<br>
|
|
47
|
-
<img src="https://img.shields.io/badge/tests-
|
|
48
|
-
<img src="https://img.shields.io/badge/
|
|
45
|
+
<img src="https://img.shields.io/badge/tests-587%20passing-3fb950?style=flat-square&logo=pytest&logoColor=white" alt="587 tests passing">
|
|
46
|
+
<a href="benchmark/RESULTS-precision-current.md"><img src="https://img.shields.io/badge/real--code%20precision-95%25-3fb950?style=flat-square" alt="95% precision on a random sample of real-code findings"></a>
|
|
47
|
+
<a href="benchmark/README.md#recall-on-real-code-recall_samplepy"><img src="https://img.shields.io/badge/held--out%20recall-88%25-3fb950?style=flat-square" alt="88% recall on held-out real code"></a>
|
|
49
48
|
<img src="https://img.shields.io/badge/SARIF%202.1.0-schema--validated-3fb950?style=flat-square" alt="SARIF schema-validated">
|
|
50
49
|
<img src="https://img.shields.io/badge/NIST-FIPS%20203%2F204%2F205-5b73e8?style=flat-square" alt="NIST FIPS 203/204/205">
|
|
51
|
-
<img src="https://img.shields.io/badge/PRs-welcome-5b73e8?style=flat-square" alt="PRs welcome">
|
|
52
50
|
</p>
|
|
53
51
|
|
|
54
52
|
<strong>Scan your code for the encryption quantum computers will break, score it 0–100, and get the NIST-approved replacement for every finding — free & open source.</strong>
|
|
@@ -92,7 +90,7 @@ solution:
|
|
|
92
90
|
| Layer | Module | What it does |
|
|
93
91
|
|-------|--------|--------------|
|
|
94
92
|
| **1. Attack** | [`quantum/`](quantum/) | Shor's and Grover's algorithms in **Qiskit**, run on a quantum simulator. At simulator scale Shor factors a small number and reconstructs a toy RSA key — an educational demonstration of *why* RSA/ECC are rated HIGH (not a break of real key sizes). |
|
|
95
|
-
| **2. Detection** | [`cli/`](cli/) | A hybrid **AST + regex** static-analysis engine over 11 languages, with cross-language usage-awareness, **dependency + lockfile scanning**, **reachability ranking**, and **call-site-specific fixes**, that scores risk and produces a NIST-aligned migration plan. **100% precision on the labeled [benchmark](benchmark/)** (18 files), **100% recall on 50 seeded cases**, and **
|
|
93
|
+
| **2. Detection** | [`cli/`](cli/) | A hybrid **AST + regex** static-analysis engine over 11 languages, with cross-language usage-awareness, **dependency + lockfile scanning**, **reachability ranking**, and **call-site-specific fixes**, that scores risk and produces a NIST-aligned migration plan. **100% precision on the labeled [benchmark](benchmark/)** (18 files), **100% recall on 50 seeded cases**, and **95% precision (95% CI 89–98%) on a fresh random, hand-labeled sample of 100 findings in real PyPI packages, scanned with 0.3.2** (0.3.1 scored 93% on an earlier sample), and **88% recall (95% CI 71–96%) on a held-out random sample of real files with every usage labeled by hand** — see [methodology](benchmark/RESULTS.md), [real-code precision](benchmark/RESULTS-precision-current.md) and [real-code recall](benchmark/README.md#recall-on-real-code-recall_samplepy). |
|
|
96
94
|
| **3. Fix** | [`pqc/`](pqc/) | A from-scratch **lattice (LWE) key-encapsulation mechanism** — the math behind CRYSTALS-Kyber / ML-KEM — so the recommended fix is runnable and provable. |
|
|
97
95
|
|
|
98
96
|
The detection layer ships through three surfaces that share **one** engine:
|
|
@@ -209,6 +207,8 @@ score = min(100, 15*HIGH + 5*MEDIUM + 1*LOW)
|
|
|
209
207
|
| 61–80 | High | Prioritize migration |
|
|
210
208
|
| 81–100 | Critical | Immediate action required |
|
|
211
209
|
|
|
210
|
+
Any HIGH finding makes the band at least **Medium**: a score of 15 or 30 from one or two HIGH findings is still cryptography a quantum computer breaks.
|
|
211
|
+
|
|
212
212
|
---
|
|
213
213
|
|
|
214
214
|
## Scanning a live website (`--url`)
|
|
@@ -851,7 +851,7 @@ docker compose up --build
|
|
|
851
851
|
|
|
852
852
|
```bash
|
|
853
853
|
pip install -r requirements-dev.txt
|
|
854
|
-
pytest -q #
|
|
854
|
+
pytest -q # 587 tests; in-memory DB, no setup
|
|
855
855
|
```
|
|
856
856
|
|
|
857
857
|
Seed a demo account so the dashboard is populated:
|
|
@@ -970,8 +970,8 @@ not gates on the core detection, which is the part that should always be open.
|
|
|
970
970
|
|
|
971
971
|
Every release is archived on Zenodo. To cite QuantumSafe, use
|
|
972
972
|
[10.5281/zenodo.23843488](https://doi.org/10.5281/zenodo.23843488), which always
|
|
973
|
-
resolves to the newest version; v0.3.
|
|
974
|
-
[10.5281/zenodo.
|
|
973
|
+
resolves to the newest version; v0.3.2 on its own is
|
|
974
|
+
[10.5281/zenodo.24267519](https://doi.org/10.5281/zenodo.24267519). GitHub's
|
|
975
975
|
"Cite this repository" button reads the same details from
|
|
976
976
|
[CITATION.cff](CITATION.cff).
|
|
977
977
|
|
|
@@ -7,16 +7,14 @@
|
|
|
7
7
|
<img src="https://img.shields.io/pypi/pyversions/quantumsafe-scan?style=flat-square&logo=python&logoColor=white" alt="Python versions">
|
|
8
8
|
<a href="https://github.com/Danny-397/Quantum-Safe-Scan/actions/workflows/ci.yml"><img src="https://img.shields.io/github/actions/workflow/status/Danny-397/Quantum-Safe-Scan/ci.yml?branch=main&style=flat-square&logo=githubactions&logoColor=white&label=CI" alt="CI status"></a>
|
|
9
9
|
<a href="https://github.com/Danny-397/Quantum-Safe-Scan/tags"><img src="https://img.shields.io/github/v/tag/Danny-397/Quantum-Safe-Scan?style=flat-square&logo=github&label=version&color=5b73e8" alt="Latest version"></a>
|
|
10
|
-
<a href="https://github.com/Danny-397/Quantum-Safe-Scan"><img src="https://img.shields.io/github/stars/Danny-397/Quantum-Safe-Scan?style=flat-square&logo=github" alt="Stars"></a>
|
|
11
|
-
<img src="https://img.shields.io/github/last-commit/Danny-397/Quantum-Safe-Scan?style=flat-square&color=555" alt="Last commit">
|
|
12
10
|
<img src="https://img.shields.io/github/license/Danny-397/Quantum-Safe-Scan?style=flat-square&color=3fb950" alt="License: MIT">
|
|
13
11
|
<a href="https://doi.org/10.5281/zenodo.23843488"><img src="https://img.shields.io/badge/DOI-10.5281%2Fzenodo.23843488-5b73e8?style=flat-square" alt="DOI 10.5281/zenodo.23843488"></a>
|
|
14
12
|
<br>
|
|
15
|
-
<img src="https://img.shields.io/badge/tests-
|
|
16
|
-
<img src="https://img.shields.io/badge/
|
|
13
|
+
<img src="https://img.shields.io/badge/tests-587%20passing-3fb950?style=flat-square&logo=pytest&logoColor=white" alt="587 tests passing">
|
|
14
|
+
<a href="benchmark/RESULTS-precision-current.md"><img src="https://img.shields.io/badge/real--code%20precision-95%25-3fb950?style=flat-square" alt="95% precision on a random sample of real-code findings"></a>
|
|
15
|
+
<a href="benchmark/README.md#recall-on-real-code-recall_samplepy"><img src="https://img.shields.io/badge/held--out%20recall-88%25-3fb950?style=flat-square" alt="88% recall on held-out real code"></a>
|
|
17
16
|
<img src="https://img.shields.io/badge/SARIF%202.1.0-schema--validated-3fb950?style=flat-square" alt="SARIF schema-validated">
|
|
18
17
|
<img src="https://img.shields.io/badge/NIST-FIPS%20203%2F204%2F205-5b73e8?style=flat-square" alt="NIST FIPS 203/204/205">
|
|
19
|
-
<img src="https://img.shields.io/badge/PRs-welcome-5b73e8?style=flat-square" alt="PRs welcome">
|
|
20
18
|
</p>
|
|
21
19
|
|
|
22
20
|
<strong>Scan your code for the encryption quantum computers will break, score it 0–100, and get the NIST-approved replacement for every finding — free & open source.</strong>
|
|
@@ -60,7 +58,7 @@ solution:
|
|
|
60
58
|
| Layer | Module | What it does |
|
|
61
59
|
|-------|--------|--------------|
|
|
62
60
|
| **1. Attack** | [`quantum/`](quantum/) | Shor's and Grover's algorithms in **Qiskit**, run on a quantum simulator. At simulator scale Shor factors a small number and reconstructs a toy RSA key — an educational demonstration of *why* RSA/ECC are rated HIGH (not a break of real key sizes). |
|
|
63
|
-
| **2. Detection** | [`cli/`](cli/) | A hybrid **AST + regex** static-analysis engine over 11 languages, with cross-language usage-awareness, **dependency + lockfile scanning**, **reachability ranking**, and **call-site-specific fixes**, that scores risk and produces a NIST-aligned migration plan. **100% precision on the labeled [benchmark](benchmark/)** (18 files), **100% recall on 50 seeded cases**, and **
|
|
61
|
+
| **2. Detection** | [`cli/`](cli/) | A hybrid **AST + regex** static-analysis engine over 11 languages, with cross-language usage-awareness, **dependency + lockfile scanning**, **reachability ranking**, and **call-site-specific fixes**, that scores risk and produces a NIST-aligned migration plan. **100% precision on the labeled [benchmark](benchmark/)** (18 files), **100% recall on 50 seeded cases**, and **95% precision (95% CI 89–98%) on a fresh random, hand-labeled sample of 100 findings in real PyPI packages, scanned with 0.3.2** (0.3.1 scored 93% on an earlier sample), and **88% recall (95% CI 71–96%) on a held-out random sample of real files with every usage labeled by hand** — see [methodology](benchmark/RESULTS.md), [real-code precision](benchmark/RESULTS-precision-current.md) and [real-code recall](benchmark/README.md#recall-on-real-code-recall_samplepy). |
|
|
64
62
|
| **3. Fix** | [`pqc/`](pqc/) | A from-scratch **lattice (LWE) key-encapsulation mechanism** — the math behind CRYSTALS-Kyber / ML-KEM — so the recommended fix is runnable and provable. |
|
|
65
63
|
|
|
66
64
|
The detection layer ships through three surfaces that share **one** engine:
|
|
@@ -177,6 +175,8 @@ score = min(100, 15*HIGH + 5*MEDIUM + 1*LOW)
|
|
|
177
175
|
| 61–80 | High | Prioritize migration |
|
|
178
176
|
| 81–100 | Critical | Immediate action required |
|
|
179
177
|
|
|
178
|
+
Any HIGH finding makes the band at least **Medium**: a score of 15 or 30 from one or two HIGH findings is still cryptography a quantum computer breaks.
|
|
179
|
+
|
|
180
180
|
---
|
|
181
181
|
|
|
182
182
|
## Scanning a live website (`--url`)
|
|
@@ -819,7 +819,7 @@ docker compose up --build
|
|
|
819
819
|
|
|
820
820
|
```bash
|
|
821
821
|
pip install -r requirements-dev.txt
|
|
822
|
-
pytest -q #
|
|
822
|
+
pytest -q # 587 tests; in-memory DB, no setup
|
|
823
823
|
```
|
|
824
824
|
|
|
825
825
|
Seed a demo account so the dashboard is populated:
|
|
@@ -938,8 +938,8 @@ not gates on the core detection, which is the part that should always be open.
|
|
|
938
938
|
|
|
939
939
|
Every release is archived on Zenodo. To cite QuantumSafe, use
|
|
940
940
|
[10.5281/zenodo.23843488](https://doi.org/10.5281/zenodo.23843488), which always
|
|
941
|
-
resolves to the newest version; v0.3.
|
|
942
|
-
[10.5281/zenodo.
|
|
941
|
+
resolves to the newest version; v0.3.2 on its own is
|
|
942
|
+
[10.5281/zenodo.24267519](https://doi.org/10.5281/zenodo.24267519). GitHub's
|
|
943
943
|
"Cite this repository" button reads the same details from
|
|
944
944
|
[CITATION.cff](CITATION.cff).
|
|
945
945
|
|
|
@@ -36,8 +36,8 @@ def build_report(
|
|
|
36
36
|
asked for, because it needs an input only the caller knows.
|
|
37
37
|
"""
|
|
38
38
|
score = calculate_score(findings)
|
|
39
|
-
band = risk_band(score)
|
|
40
39
|
counts = count_by_severity(findings)
|
|
40
|
+
band = risk_band(score, counts[RISK_HIGH])
|
|
41
41
|
# Rank by risk, then by reachability (exploitable findings surface first when
|
|
42
42
|
# reachability ranking was requested), then by location for stable output.
|
|
43
43
|
ordered = sorted(
|
|
@@ -8,7 +8,9 @@ The score is derived purely from real findings — never hardcoded:
|
|
|
8
8
|
|
|
9
9
|
The total is capped at 100. Bands:
|
|
10
10
|
|
|
11
|
-
0-30 Low — good quantum hygiene
|
|
11
|
+
0-30 Low — good quantum hygiene (only with no HIGH finding;
|
|
12
|
+
otherwise Medium: one HIGH finding is already
|
|
13
|
+
cryptography a quantum computer breaks)
|
|
12
14
|
31-60 Medium — plan migration
|
|
13
15
|
61-80 High — prioritize migration
|
|
14
16
|
81-100 Critical — immediate action required
|
|
@@ -35,8 +37,8 @@ def calculate_score(findings: list[Finding]) -> int:
|
|
|
35
37
|
return min(total, MAX_SCORE)
|
|
36
38
|
|
|
37
39
|
|
|
38
|
-
def risk_band(score: int) -> str:
|
|
39
|
-
if score <= 30:
|
|
40
|
+
def risk_band(score: int, high: int = 0) -> str:
|
|
41
|
+
if score <= 30 and not high:
|
|
40
42
|
return "Low"
|
|
41
43
|
if score <= 60:
|
|
42
44
|
return "Medium"
|
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "quantumsafe-scan"
|
|
7
|
-
version = "0.3.
|
|
7
|
+
version = "0.3.3"
|
|
8
8
|
description = "Scan codebases and dependencies for quantum-vulnerable cryptography and generate a NIST-aligned migration plan (SARIF + CycloneDX CBOM)."
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
requires-python = ">=3.9"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: quantumsafe-scan
|
|
3
|
-
Version: 0.3.
|
|
3
|
+
Version: 0.3.3
|
|
4
4
|
Summary: Scan codebases and dependencies for quantum-vulnerable cryptography and generate a NIST-aligned migration plan (SARIF + CycloneDX CBOM).
|
|
5
5
|
Author: QuantumSafe
|
|
6
6
|
License: MIT
|
|
@@ -39,16 +39,14 @@ Dynamic: license-file
|
|
|
39
39
|
<img src="https://img.shields.io/pypi/pyversions/quantumsafe-scan?style=flat-square&logo=python&logoColor=white" alt="Python versions">
|
|
40
40
|
<a href="https://github.com/Danny-397/Quantum-Safe-Scan/actions/workflows/ci.yml"><img src="https://img.shields.io/github/actions/workflow/status/Danny-397/Quantum-Safe-Scan/ci.yml?branch=main&style=flat-square&logo=githubactions&logoColor=white&label=CI" alt="CI status"></a>
|
|
41
41
|
<a href="https://github.com/Danny-397/Quantum-Safe-Scan/tags"><img src="https://img.shields.io/github/v/tag/Danny-397/Quantum-Safe-Scan?style=flat-square&logo=github&label=version&color=5b73e8" alt="Latest version"></a>
|
|
42
|
-
<a href="https://github.com/Danny-397/Quantum-Safe-Scan"><img src="https://img.shields.io/github/stars/Danny-397/Quantum-Safe-Scan?style=flat-square&logo=github" alt="Stars"></a>
|
|
43
|
-
<img src="https://img.shields.io/github/last-commit/Danny-397/Quantum-Safe-Scan?style=flat-square&color=555" alt="Last commit">
|
|
44
42
|
<img src="https://img.shields.io/github/license/Danny-397/Quantum-Safe-Scan?style=flat-square&color=3fb950" alt="License: MIT">
|
|
45
43
|
<a href="https://doi.org/10.5281/zenodo.23843488"><img src="https://img.shields.io/badge/DOI-10.5281%2Fzenodo.23843488-5b73e8?style=flat-square" alt="DOI 10.5281/zenodo.23843488"></a>
|
|
46
44
|
<br>
|
|
47
|
-
<img src="https://img.shields.io/badge/tests-
|
|
48
|
-
<img src="https://img.shields.io/badge/
|
|
45
|
+
<img src="https://img.shields.io/badge/tests-587%20passing-3fb950?style=flat-square&logo=pytest&logoColor=white" alt="587 tests passing">
|
|
46
|
+
<a href="benchmark/RESULTS-precision-current.md"><img src="https://img.shields.io/badge/real--code%20precision-95%25-3fb950?style=flat-square" alt="95% precision on a random sample of real-code findings"></a>
|
|
47
|
+
<a href="benchmark/README.md#recall-on-real-code-recall_samplepy"><img src="https://img.shields.io/badge/held--out%20recall-88%25-3fb950?style=flat-square" alt="88% recall on held-out real code"></a>
|
|
49
48
|
<img src="https://img.shields.io/badge/SARIF%202.1.0-schema--validated-3fb950?style=flat-square" alt="SARIF schema-validated">
|
|
50
49
|
<img src="https://img.shields.io/badge/NIST-FIPS%20203%2F204%2F205-5b73e8?style=flat-square" alt="NIST FIPS 203/204/205">
|
|
51
|
-
<img src="https://img.shields.io/badge/PRs-welcome-5b73e8?style=flat-square" alt="PRs welcome">
|
|
52
50
|
</p>
|
|
53
51
|
|
|
54
52
|
<strong>Scan your code for the encryption quantum computers will break, score it 0–100, and get the NIST-approved replacement for every finding — free & open source.</strong>
|
|
@@ -92,7 +90,7 @@ solution:
|
|
|
92
90
|
| Layer | Module | What it does |
|
|
93
91
|
|-------|--------|--------------|
|
|
94
92
|
| **1. Attack** | [`quantum/`](quantum/) | Shor's and Grover's algorithms in **Qiskit**, run on a quantum simulator. At simulator scale Shor factors a small number and reconstructs a toy RSA key — an educational demonstration of *why* RSA/ECC are rated HIGH (not a break of real key sizes). |
|
|
95
|
-
| **2. Detection** | [`cli/`](cli/) | A hybrid **AST + regex** static-analysis engine over 11 languages, with cross-language usage-awareness, **dependency + lockfile scanning**, **reachability ranking**, and **call-site-specific fixes**, that scores risk and produces a NIST-aligned migration plan. **100% precision on the labeled [benchmark](benchmark/)** (18 files), **100% recall on 50 seeded cases**, and **
|
|
93
|
+
| **2. Detection** | [`cli/`](cli/) | A hybrid **AST + regex** static-analysis engine over 11 languages, with cross-language usage-awareness, **dependency + lockfile scanning**, **reachability ranking**, and **call-site-specific fixes**, that scores risk and produces a NIST-aligned migration plan. **100% precision on the labeled [benchmark](benchmark/)** (18 files), **100% recall on 50 seeded cases**, and **95% precision (95% CI 89–98%) on a fresh random, hand-labeled sample of 100 findings in real PyPI packages, scanned with 0.3.2** (0.3.1 scored 93% on an earlier sample), and **88% recall (95% CI 71–96%) on a held-out random sample of real files with every usage labeled by hand** — see [methodology](benchmark/RESULTS.md), [real-code precision](benchmark/RESULTS-precision-current.md) and [real-code recall](benchmark/README.md#recall-on-real-code-recall_samplepy). |
|
|
96
94
|
| **3. Fix** | [`pqc/`](pqc/) | A from-scratch **lattice (LWE) key-encapsulation mechanism** — the math behind CRYSTALS-Kyber / ML-KEM — so the recommended fix is runnable and provable. |
|
|
97
95
|
|
|
98
96
|
The detection layer ships through three surfaces that share **one** engine:
|
|
@@ -209,6 +207,8 @@ score = min(100, 15*HIGH + 5*MEDIUM + 1*LOW)
|
|
|
209
207
|
| 61–80 | High | Prioritize migration |
|
|
210
208
|
| 81–100 | Critical | Immediate action required |
|
|
211
209
|
|
|
210
|
+
Any HIGH finding makes the band at least **Medium**: a score of 15 or 30 from one or two HIGH findings is still cryptography a quantum computer breaks.
|
|
211
|
+
|
|
212
212
|
---
|
|
213
213
|
|
|
214
214
|
## Scanning a live website (`--url`)
|
|
@@ -851,7 +851,7 @@ docker compose up --build
|
|
|
851
851
|
|
|
852
852
|
```bash
|
|
853
853
|
pip install -r requirements-dev.txt
|
|
854
|
-
pytest -q #
|
|
854
|
+
pytest -q # 587 tests; in-memory DB, no setup
|
|
855
855
|
```
|
|
856
856
|
|
|
857
857
|
Seed a demo account so the dashboard is populated:
|
|
@@ -970,8 +970,8 @@ not gates on the core detection, which is the part that should always be open.
|
|
|
970
970
|
|
|
971
971
|
Every release is archived on Zenodo. To cite QuantumSafe, use
|
|
972
972
|
[10.5281/zenodo.23843488](https://doi.org/10.5281/zenodo.23843488), which always
|
|
973
|
-
resolves to the newest version; v0.3.
|
|
974
|
-
[10.5281/zenodo.
|
|
973
|
+
resolves to the newest version; v0.3.2 on its own is
|
|
974
|
+
[10.5281/zenodo.24267519](https://doi.org/10.5281/zenodo.24267519). GitHub's
|
|
975
975
|
"Cite this repository" button reads the same details from
|
|
976
976
|
[CITATION.cff](CITATION.cff).
|
|
977
977
|
|
|
@@ -219,6 +219,13 @@ def test_anonymous_export_sarif(client):
|
|
|
219
219
|
assert '"version": "2.1.0"' in text and "runs" in text
|
|
220
220
|
|
|
221
221
|
|
|
222
|
+
def test_export_carries_the_real_package_version(client):
|
|
223
|
+
from quantumsafe import __version__
|
|
224
|
+
|
|
225
|
+
r = client.post("/api/v1/export", json={"report": _anon_report(client), "format": "json"})
|
|
226
|
+
assert r.status_code == 200 and r.get_json()["version"] == __version__
|
|
227
|
+
|
|
228
|
+
|
|
222
229
|
def test_anonymous_export_rejects_bad_format(client):
|
|
223
230
|
r = client.post("/api/v1/export", json={"report": _anon_report(client), "format": "docx"})
|
|
224
231
|
assert r.status_code == 400
|
|
@@ -52,3 +52,18 @@ def test_recommend_known_family():
|
|
|
52
52
|
def test_recommend_unknown_family_falls_back():
|
|
53
53
|
rec = recommend("does-not-exist")
|
|
54
54
|
assert rec.replacement and rec.nist_reference
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
def test_a_high_finding_is_never_low():
|
|
58
|
+
assert risk_band(15, high=1) == "Medium"
|
|
59
|
+
assert risk_band(30, high=2) == "Medium"
|
|
60
|
+
assert risk_band(30, high=0) == "Low"
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
def test_report_with_two_high_findings_is_medium_not_good_hygiene():
|
|
64
|
+
from quantumsafe.reporter import build_report
|
|
65
|
+
|
|
66
|
+
report = build_report([_f(RISK_HIGH), _f(RISK_HIGH)], "t")
|
|
67
|
+
assert report["risk_score"] == 30
|
|
68
|
+
assert report["risk_band"] == "Medium"
|
|
69
|
+
assert "hygiene" not in report["risk_message"].lower()
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{quantumsafe_scan-0.3.2 → quantumsafe_scan-0.3.3}/quantumsafe_scan.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
{quantumsafe_scan-0.3.2 → quantumsafe_scan-0.3.3}/quantumsafe_scan.egg-info/entry_points.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|