pysentry-rs 0.2.3__tar.gz → 0.3.1__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.
Potentially problematic release.
This version of pysentry-rs might be problematic. Click here for more details.
- {pysentry_rs-0.2.3 → pysentry_rs-0.3.1}/.github/workflows/benchmark.yml +1 -1
- {pysentry_rs-0.2.3 → pysentry_rs-0.3.1}/.github/workflows/release.yml +2 -1
- {pysentry_rs-0.2.3 → pysentry_rs-0.3.1}/Cargo.lock +10 -3
- {pysentry_rs-0.2.3 → pysentry_rs-0.3.1}/Cargo.toml +2 -1
- {pysentry_rs-0.2.3 → pysentry_rs-0.3.1}/PKG-INFO +2 -2
- {pysentry_rs-0.2.3 → pysentry_rs-0.3.1}/README.md +1 -1
- pysentry_rs-0.3.1/benchmarks/results/0.2.3.md +141 -0
- pysentry_rs-0.3.1/benchmarks/results/latest.md +141 -0
- {pysentry_rs-0.2.3 → pysentry_rs-0.3.1}/src/cache/audit.rs +18 -0
- pysentry_rs-0.3.1/src/cache/mod.rs +25 -0
- {pysentry_rs-0.2.3 → pysentry_rs-0.3.1}/src/cache/storage.rs +19 -1
- {pysentry_rs-0.2.3 → pysentry_rs-0.3.1}/src/cli.rs +29 -6
- pysentry_rs-0.3.1/src/dependency/mod.rs +24 -0
- {pysentry_rs-0.2.3 → pysentry_rs-0.3.1}/src/dependency/resolvers/mod.rs +18 -0
- {pysentry_rs-0.2.3 → pysentry_rs-0.3.1}/src/dependency/resolvers/pip_tools.rs +18 -0
- {pysentry_rs-0.2.3 → pysentry_rs-0.3.1}/src/dependency/resolvers/uv.rs +18 -0
- {pysentry_rs-0.2.3 → pysentry_rs-0.3.1}/src/dependency/scanner.rs +18 -0
- {pysentry_rs-0.2.3 → pysentry_rs-0.3.1}/src/error.rs +18 -0
- {pysentry_rs-0.2.3 → pysentry_rs-0.3.1}/src/lib.rs +18 -0
- {pysentry_rs-0.2.3 → pysentry_rs-0.3.1}/src/main.rs +19 -7
- pysentry_rs-0.3.1/src/output/mod.rs +25 -0
- {pysentry_rs-0.2.3 → pysentry_rs-0.3.1}/src/output/report.rs +175 -95
- {pysentry_rs-0.2.3 → pysentry_rs-0.3.1}/src/output/sarif.rs +18 -0
- {pysentry_rs-0.2.3 → pysentry_rs-0.3.1}/src/parsers/lock.rs +18 -0
- {pysentry_rs-0.2.3 → pysentry_rs-0.3.1}/src/parsers/mod.rs +18 -0
- {pysentry_rs-0.2.3 → pysentry_rs-0.3.1}/src/parsers/poetry_lock.rs +18 -0
- {pysentry_rs-0.2.3 → pysentry_rs-0.3.1}/src/parsers/pyproject.rs +18 -0
- {pysentry_rs-0.2.3 → pysentry_rs-0.3.1}/src/parsers/requirements.rs +18 -0
- {pysentry_rs-0.2.3 → pysentry_rs-0.3.1}/src/providers/mod.rs +18 -0
- {pysentry_rs-0.2.3 → pysentry_rs-0.3.1}/src/providers/osv.rs +18 -0
- {pysentry_rs-0.2.3 → pysentry_rs-0.3.1}/src/providers/pypa.rs +18 -0
- {pysentry_rs-0.2.3 → pysentry_rs-0.3.1}/src/providers/pypi.rs +18 -0
- {pysentry_rs-0.2.3 → pysentry_rs-0.3.1}/src/python.rs +18 -0
- {pysentry_rs-0.2.3 → pysentry_rs-0.3.1}/src/types.rs +18 -0
- {pysentry_rs-0.2.3 → pysentry_rs-0.3.1}/src/vulnerability/database.rs +18 -0
- {pysentry_rs-0.2.3 → pysentry_rs-0.3.1}/src/vulnerability/matcher.rs +18 -0
- pysentry_rs-0.3.1/src/vulnerability/mod.rs +27 -0
- pysentry_rs-0.2.3/src/cache/mod.rs +0 -7
- pysentry_rs-0.2.3/src/dependency/mod.rs +0 -6
- pysentry_rs-0.2.3/src/output/mod.rs +0 -7
- pysentry_rs-0.2.3/src/vulnerability/mod.rs +0 -9
- {pysentry_rs-0.2.3 → pysentry_rs-0.3.1}/.github/FUNDING.yml +0 -0
- {pysentry_rs-0.2.3 → pysentry_rs-0.3.1}/.github/dependabot.yml +0 -0
- {pysentry_rs-0.2.3 → pysentry_rs-0.3.1}/.github/workflows/ci.yml +0 -0
- {pysentry_rs-0.2.3 → pysentry_rs-0.3.1}/.gitignore +0 -0
- {pysentry_rs-0.2.3 → pysentry_rs-0.3.1}/.pre-commit-config.yaml +0 -0
- {pysentry_rs-0.2.3 → pysentry_rs-0.3.1}/LICENSE +0 -0
- {pysentry_rs-0.2.3 → pysentry_rs-0.3.1}/benchmarks/.gitignore +0 -0
- {pysentry_rs-0.2.3 → pysentry_rs-0.3.1}/benchmarks/.python-version +0 -0
- {pysentry_rs-0.2.3 → pysentry_rs-0.3.1}/benchmarks/README.md +0 -0
- {pysentry_rs-0.2.3 → pysentry_rs-0.3.1}/benchmarks/main.py +0 -0
- {pysentry_rs-0.2.3 → pysentry_rs-0.3.1}/benchmarks/pyproject.toml +0 -0
- {pysentry_rs-0.2.3 → pysentry_rs-0.3.1}/benchmarks/src/benchmark_runner.py +0 -0
- {pysentry_rs-0.2.3 → pysentry_rs-0.3.1}/benchmarks/src/performance_monitor.py +0 -0
- {pysentry_rs-0.2.3 → pysentry_rs-0.3.1}/benchmarks/src/report_generator.py +0 -0
- {pysentry_rs-0.2.3 → pysentry_rs-0.3.1}/benchmarks/src/tool_wrapper.py +0 -0
- {pysentry_rs-0.2.3 → pysentry_rs-0.3.1}/benchmarks/test_data/large_requirements.txt +0 -0
- {pysentry_rs-0.2.3 → pysentry_rs-0.3.1}/benchmarks/test_data/small_requirements.txt +0 -0
- {pysentry_rs-0.2.3 → pysentry_rs-0.3.1}/benchmarks/uv.lock +0 -0
- {pysentry_rs-0.2.3 → pysentry_rs-0.3.1}/fixtures/requirements-tests/requirements-dev.txt +0 -0
- {pysentry_rs-0.2.3 → pysentry_rs-0.3.1}/fixtures/requirements-tests/requirements.txt +0 -0
- {pysentry_rs-0.2.3 → pysentry_rs-0.3.1}/fixtures/requirements-tests-vulnerable/requirements.txt +0 -0
- {pysentry_rs-0.2.3 → pysentry_rs-0.3.1}/pyproject.toml +0 -0
- {pysentry_rs-0.2.3 → pysentry_rs-0.3.1}/python/pysentry/__init__.py +0 -0
|
@@ -91,7 +91,7 @@ jobs:
|
|
|
91
91
|
|
|
92
92
|
ls -la results/
|
|
93
93
|
|
|
94
|
-
LATEST_FILE=$(ls results/*.md 2>/dev/null | sort -r | head -n 1)
|
|
94
|
+
LATEST_FILE=$(ls results/*.md 2>/dev/null | grep -v 'latest.md' | sort -r | head -n 1)
|
|
95
95
|
if [ -f "$LATEST_FILE" ]; then
|
|
96
96
|
cp "$LATEST_FILE" results/latest.md
|
|
97
97
|
echo "Created latest.md from: $LATEST_FILE"
|
|
@@ -197,6 +197,8 @@ jobs:
|
|
|
197
197
|
runs-on: ubuntu-latest
|
|
198
198
|
needs: [build-python-wheels, build-sdist]
|
|
199
199
|
if: startsWith(github.ref, 'refs/tags/v')
|
|
200
|
+
permissions:
|
|
201
|
+
id-token: write
|
|
200
202
|
steps:
|
|
201
203
|
- name: Download artifacts
|
|
202
204
|
uses: actions/download-artifact@v4
|
|
@@ -213,7 +215,6 @@ jobs:
|
|
|
213
215
|
- name: Publish to PyPI
|
|
214
216
|
uses: pypa/gh-action-pypi-publish@v1.12.4
|
|
215
217
|
with:
|
|
216
|
-
password: ${{ secrets.PYPI_API_TOKEN }}
|
|
217
218
|
packages-dir: dist/
|
|
218
219
|
|
|
219
220
|
update-release:
|
|
@@ -988,6 +988,12 @@ version = "0.1.1"
|
|
|
988
988
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
989
989
|
checksum = "b15813163c1d831bf4a13c3610c05c0d03b39feb07f7e09fa234dac9b15aaf39"
|
|
990
990
|
|
|
991
|
+
[[package]]
|
|
992
|
+
name = "owo-colors"
|
|
993
|
+
version = "4.2.2"
|
|
994
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
995
|
+
checksum = "48dd4f4a2c8405440fd0462561f0e5806bd0f77e86f51c761481bdd4018b545e"
|
|
996
|
+
|
|
991
997
|
[[package]]
|
|
992
998
|
name = "pep440_rs"
|
|
993
999
|
version = "0.7.3"
|
|
@@ -1115,7 +1121,7 @@ dependencies = [
|
|
|
1115
1121
|
|
|
1116
1122
|
[[package]]
|
|
1117
1123
|
name = "pysentry"
|
|
1118
|
-
version = "0.
|
|
1124
|
+
version = "0.3.1"
|
|
1119
1125
|
dependencies = [
|
|
1120
1126
|
"anyhow",
|
|
1121
1127
|
"async-trait",
|
|
@@ -1124,6 +1130,7 @@ dependencies = [
|
|
|
1124
1130
|
"dirs",
|
|
1125
1131
|
"fs-err",
|
|
1126
1132
|
"futures",
|
|
1133
|
+
"owo-colors",
|
|
1127
1134
|
"pep440_rs",
|
|
1128
1135
|
"pyo3",
|
|
1129
1136
|
"regex",
|
|
@@ -1532,9 +1539,9 @@ checksum = "d66dc143e6b11c1eddc06d5c423cfc97062865baf299914ab64caa38182078fe"
|
|
|
1532
1539
|
|
|
1533
1540
|
[[package]]
|
|
1534
1541
|
name = "slab"
|
|
1535
|
-
version = "0.4.
|
|
1542
|
+
version = "0.4.11"
|
|
1536
1543
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1537
|
-
checksum = "
|
|
1544
|
+
checksum = "7a2ae44ef20feb57a68b23d846850f861394c2e02dc425a50098ae8c90267589"
|
|
1538
1545
|
|
|
1539
1546
|
[[package]]
|
|
1540
1547
|
name = "smallvec"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[package]
|
|
2
2
|
name = "pysentry"
|
|
3
|
-
version = "0.
|
|
3
|
+
version = "0.3.1"
|
|
4
4
|
edition = "2021"
|
|
5
5
|
rust-version = "1.79"
|
|
6
6
|
description = "Security vulnerability auditing for Python packages"
|
|
@@ -29,6 +29,7 @@ clap = { version = "4.5.43", features = ["derive"] }
|
|
|
29
29
|
dirs = "6.0.0"
|
|
30
30
|
fs-err = "3.1.1"
|
|
31
31
|
futures = "0.3.31"
|
|
32
|
+
owo-colors = "4.2.2"
|
|
32
33
|
pep440_rs = "0.7.3"
|
|
33
34
|
pyo3 = { version = "0.25.1", features = ["extension-module"], optional = true }
|
|
34
35
|
regex = "1.11.1"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: pysentry-rs
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.3.1
|
|
4
4
|
Classifier: Development Status :: 4 - Beta
|
|
5
5
|
Classifier: Intended Audience :: Developers
|
|
6
6
|
Classifier: License :: OSI Approved :: GNU General Public License v3 (GPLv3)
|
|
@@ -28,7 +28,7 @@ Project-URL: Issues, https://github.com/nyudenkov/pysentry/issues
|
|
|
28
28
|
|
|
29
29
|
[](https://google.github.io/osv.dev/)
|
|
30
30
|
|
|
31
|
-
[Help to test and improve](https://github.com/nyudenkov/pysentry/issues/12)
|
|
31
|
+
[Help to test and improve](https://github.com/nyudenkov/pysentry/issues/12) | [Latest PySentry - pip-audit benchmark](benchmarks/results/latest.md)
|
|
32
32
|
|
|
33
33
|
A fast, reliable security vulnerability scanner for Python projects, written in Rust.
|
|
34
34
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
[](https://google.github.io/osv.dev/)
|
|
4
4
|
|
|
5
|
-
[Help to test and improve](https://github.com/nyudenkov/pysentry/issues/12)
|
|
5
|
+
[Help to test and improve](https://github.com/nyudenkov/pysentry/issues/12) | [Latest PySentry - pip-audit benchmark](benchmarks/results/latest.md)
|
|
6
6
|
|
|
7
7
|
A fast, reliable security vulnerability scanner for Python projects, written in Rust.
|
|
8
8
|
|
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
# PySentry - pip-audit Benchmark Report
|
|
2
|
+
|
|
3
|
+
**Generated:** 2025-08-12 00:03:24
|
|
4
|
+
**Duration:** 2m 3.83s
|
|
5
|
+
**Total Tests:** 20
|
|
6
|
+
|
|
7
|
+
## Executive Summary
|
|
8
|
+
|
|
9
|
+
**Overall Success Rate:** 100.0% (20/20 successful runs)
|
|
10
|
+
|
|
11
|
+
### Small_Requirements Dataset - Cold Cache
|
|
12
|
+
- **Fastest:** pysentry-pypi (0.382s) - 24.16x faster than slowest
|
|
13
|
+
- **Memory Efficient:** pysentry-osv (10.01 MB) - 9.31x less memory than highest
|
|
14
|
+
|
|
15
|
+
### Small_Requirements Dataset - Hot Cache
|
|
16
|
+
- **Fastest:** pysentry-pypi (0.261s) - 30.71x faster than slowest
|
|
17
|
+
- **Memory Efficient:** pysentry-pypi (9.69 MB) - 11.09x less memory than highest
|
|
18
|
+
|
|
19
|
+
### Large_Requirements Dataset - Cold Cache
|
|
20
|
+
- **Fastest:** pysentry-pypi (1.160s) - 18.24x faster than slowest
|
|
21
|
+
- **Memory Efficient:** pysentry-osv (10.34 MB) - 10.40x less memory than highest
|
|
22
|
+
|
|
23
|
+
### Large_Requirements Dataset - Hot Cache
|
|
24
|
+
- **Fastest:** pysentry-pypi (0.740s) - 21.90x faster than slowest
|
|
25
|
+
- **Memory Efficient:** pysentry-osv (10.33 MB) - 10.23x less memory than highest
|
|
26
|
+
|
|
27
|
+
## Test Environment
|
|
28
|
+
|
|
29
|
+
- **Platform:** Linux-6.11.0-1018-azure-x86_64-with-glibc2.39
|
|
30
|
+
- **Python Version:** 3.11.13
|
|
31
|
+
- **CPU Cores:** 4
|
|
32
|
+
- **Total Memory:** 15.62 GB
|
|
33
|
+
- **Available Memory:** 14.65 GB
|
|
34
|
+
|
|
35
|
+
## Performance Comparison
|
|
36
|
+
|
|
37
|
+
### Small_Requirements Dataset - Cold Cache
|
|
38
|
+
|
|
39
|
+
#### Execution Time Comparison
|
|
40
|
+
|
|
41
|
+
| Tool Configuration | Execution Time | Relative Performance |
|
|
42
|
+
|---------------------|---------------------|---------------------|
|
|
43
|
+
| 🥇 pysentry-pypi | 0.382s | 1.00x |
|
|
44
|
+
| 🥈 pysentry-osv | 1.080s | 2.83x |
|
|
45
|
+
| pysentry-all-sources | 1.468s | 3.85x |
|
|
46
|
+
| pysentry-pypa | 1.475s | 3.86x |
|
|
47
|
+
| pip-audit-default | 9.222s | 24.16x |
|
|
48
|
+
|
|
49
|
+
#### Memory Usage Comparison
|
|
50
|
+
|
|
51
|
+
| Tool Configuration | Peak Memory | Relative Performance |
|
|
52
|
+
|---------------------|---------------------|---------------------|
|
|
53
|
+
| 🥇 pysentry-osv | 10.01 MB | 1.00x |
|
|
54
|
+
| 🥈 pysentry-pypi | 11.70 MB | 1.17x |
|
|
55
|
+
| pip-audit-default | 45.23 MB | 4.52x |
|
|
56
|
+
| pysentry-pypa | 53.56 MB | 5.35x |
|
|
57
|
+
| pysentry-all-sources | 93.25 MB | 9.31x |
|
|
58
|
+
|
|
59
|
+
### Small_Requirements Dataset - Hot Cache
|
|
60
|
+
|
|
61
|
+
#### Execution Time Comparison
|
|
62
|
+
|
|
63
|
+
| Tool Configuration | Execution Time | Relative Performance |
|
|
64
|
+
|---------------------|---------------------|---------------------|
|
|
65
|
+
| 🥇 pysentry-pypi | 0.261s | 1.00x |
|
|
66
|
+
| 🥈 pysentry-osv | 0.999s | 3.82x |
|
|
67
|
+
| pysentry-pypa | 1.373s | 5.25x |
|
|
68
|
+
| pysentry-all-sources | 1.446s | 5.53x |
|
|
69
|
+
| pip-audit-default | 8.027s | 30.71x |
|
|
70
|
+
|
|
71
|
+
#### Memory Usage Comparison
|
|
72
|
+
|
|
73
|
+
| Tool Configuration | Peak Memory | Relative Performance |
|
|
74
|
+
|---------------------|---------------------|---------------------|
|
|
75
|
+
| 🥇 pysentry-pypi | 9.69 MB | 1.00x |
|
|
76
|
+
| 🥈 pysentry-osv | 10.16 MB | 1.05x |
|
|
77
|
+
| pip-audit-default | 45.01 MB | 4.64x |
|
|
78
|
+
| pysentry-pypa | 62.62 MB | 6.46x |
|
|
79
|
+
| pysentry-all-sources | 107.48 MB | 11.09x |
|
|
80
|
+
|
|
81
|
+
### Large_Requirements Dataset - Cold Cache
|
|
82
|
+
|
|
83
|
+
#### Execution Time Comparison
|
|
84
|
+
|
|
85
|
+
| Tool Configuration | Execution Time | Relative Performance |
|
|
86
|
+
|---------------------|---------------------|---------------------|
|
|
87
|
+
| 🥇 pysentry-pypi | 1.160s | 1.00x |
|
|
88
|
+
| 🥈 pysentry-pypa | 1.800s | 1.55x |
|
|
89
|
+
| pysentry-osv | 3.256s | 2.81x |
|
|
90
|
+
| pysentry-all-sources | 3.333s | 2.87x |
|
|
91
|
+
| pip-audit-default | 21.160s | 18.24x |
|
|
92
|
+
|
|
93
|
+
#### Memory Usage Comparison
|
|
94
|
+
|
|
95
|
+
| Tool Configuration | Peak Memory | Relative Performance |
|
|
96
|
+
|---------------------|---------------------|---------------------|
|
|
97
|
+
| 🥇 pysentry-osv | 10.34 MB | 1.00x |
|
|
98
|
+
| 🥈 pysentry-pypi | 13.09 MB | 1.27x |
|
|
99
|
+
| pip-audit-default | 47.49 MB | 4.59x |
|
|
100
|
+
| pysentry-pypa | 55.27 MB | 5.34x |
|
|
101
|
+
| pysentry-all-sources | 107.62 MB | 10.40x |
|
|
102
|
+
|
|
103
|
+
### Large_Requirements Dataset - Hot Cache
|
|
104
|
+
|
|
105
|
+
#### Execution Time Comparison
|
|
106
|
+
|
|
107
|
+
| Tool Configuration | Execution Time | Relative Performance |
|
|
108
|
+
|---------------------|---------------------|---------------------|
|
|
109
|
+
| 🥇 pysentry-pypi | 0.740s | 1.00x |
|
|
110
|
+
| 🥈 pysentry-pypa | 1.814s | 2.45x |
|
|
111
|
+
| pysentry-osv | 3.453s | 4.67x |
|
|
112
|
+
| pysentry-all-sources | 3.757s | 5.08x |
|
|
113
|
+
| pip-audit-default | 16.199s | 21.90x |
|
|
114
|
+
|
|
115
|
+
#### Memory Usage Comparison
|
|
116
|
+
|
|
117
|
+
| Tool Configuration | Peak Memory | Relative Performance |
|
|
118
|
+
|---------------------|---------------------|---------------------|
|
|
119
|
+
| 🥇 pysentry-osv | 10.33 MB | 1.00x |
|
|
120
|
+
| 🥈 pysentry-pypi | 12.99 MB | 1.26x |
|
|
121
|
+
| pip-audit-default | 46.97 MB | 4.55x |
|
|
122
|
+
| pysentry-pypa | 74.16 MB | 7.18x |
|
|
123
|
+
| pysentry-all-sources | 105.66 MB | 10.23x |
|
|
124
|
+
|
|
125
|
+
## Detailed Analysis
|
|
126
|
+
|
|
127
|
+
### Pysentry Performance
|
|
128
|
+
|
|
129
|
+
- **Execution Time:** Avg: 1.737s, Min: 0.261s, Max: 3.757s
|
|
130
|
+
|
|
131
|
+
- **Memory Usage:** Avg: 46.75 MB, Min: 9.69 MB, Max: 107.62 MB
|
|
132
|
+
|
|
133
|
+
- **Success Rate:** 100.0% (16/16)
|
|
134
|
+
|
|
135
|
+
### Pip-Audit Performance
|
|
136
|
+
|
|
137
|
+
- **Execution Time:** Avg: 13.652s, Min: 8.027s, Max: 21.160s
|
|
138
|
+
|
|
139
|
+
- **Memory Usage:** Avg: 46.17 MB, Min: 45.01 MB, Max: 47.49 MB
|
|
140
|
+
|
|
141
|
+
- **Success Rate:** 100.0% (4/4)
|
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
# PySentry - pip-audit Benchmark Report
|
|
2
|
+
|
|
3
|
+
**Generated:** 2025-08-12 00:03:24
|
|
4
|
+
**Duration:** 2m 3.83s
|
|
5
|
+
**Total Tests:** 20
|
|
6
|
+
|
|
7
|
+
## Executive Summary
|
|
8
|
+
|
|
9
|
+
**Overall Success Rate:** 100.0% (20/20 successful runs)
|
|
10
|
+
|
|
11
|
+
### Small_Requirements Dataset - Cold Cache
|
|
12
|
+
- **Fastest:** pysentry-pypi (0.382s) - 24.16x faster than slowest
|
|
13
|
+
- **Memory Efficient:** pysentry-osv (10.01 MB) - 9.31x less memory than highest
|
|
14
|
+
|
|
15
|
+
### Small_Requirements Dataset - Hot Cache
|
|
16
|
+
- **Fastest:** pysentry-pypi (0.261s) - 30.71x faster than slowest
|
|
17
|
+
- **Memory Efficient:** pysentry-pypi (9.69 MB) - 11.09x less memory than highest
|
|
18
|
+
|
|
19
|
+
### Large_Requirements Dataset - Cold Cache
|
|
20
|
+
- **Fastest:** pysentry-pypi (1.160s) - 18.24x faster than slowest
|
|
21
|
+
- **Memory Efficient:** pysentry-osv (10.34 MB) - 10.40x less memory than highest
|
|
22
|
+
|
|
23
|
+
### Large_Requirements Dataset - Hot Cache
|
|
24
|
+
- **Fastest:** pysentry-pypi (0.740s) - 21.90x faster than slowest
|
|
25
|
+
- **Memory Efficient:** pysentry-osv (10.33 MB) - 10.23x less memory than highest
|
|
26
|
+
|
|
27
|
+
## Test Environment
|
|
28
|
+
|
|
29
|
+
- **Platform:** Linux-6.11.0-1018-azure-x86_64-with-glibc2.39
|
|
30
|
+
- **Python Version:** 3.11.13
|
|
31
|
+
- **CPU Cores:** 4
|
|
32
|
+
- **Total Memory:** 15.62 GB
|
|
33
|
+
- **Available Memory:** 14.65 GB
|
|
34
|
+
|
|
35
|
+
## Performance Comparison
|
|
36
|
+
|
|
37
|
+
### Small_Requirements Dataset - Cold Cache
|
|
38
|
+
|
|
39
|
+
#### Execution Time Comparison
|
|
40
|
+
|
|
41
|
+
| Tool Configuration | Execution Time | Relative Performance |
|
|
42
|
+
|---------------------|---------------------|---------------------|
|
|
43
|
+
| 🥇 pysentry-pypi | 0.382s | 1.00x |
|
|
44
|
+
| 🥈 pysentry-osv | 1.080s | 2.83x |
|
|
45
|
+
| pysentry-all-sources | 1.468s | 3.85x |
|
|
46
|
+
| pysentry-pypa | 1.475s | 3.86x |
|
|
47
|
+
| pip-audit-default | 9.222s | 24.16x |
|
|
48
|
+
|
|
49
|
+
#### Memory Usage Comparison
|
|
50
|
+
|
|
51
|
+
| Tool Configuration | Peak Memory | Relative Performance |
|
|
52
|
+
|---------------------|---------------------|---------------------|
|
|
53
|
+
| 🥇 pysentry-osv | 10.01 MB | 1.00x |
|
|
54
|
+
| 🥈 pysentry-pypi | 11.70 MB | 1.17x |
|
|
55
|
+
| pip-audit-default | 45.23 MB | 4.52x |
|
|
56
|
+
| pysentry-pypa | 53.56 MB | 5.35x |
|
|
57
|
+
| pysentry-all-sources | 93.25 MB | 9.31x |
|
|
58
|
+
|
|
59
|
+
### Small_Requirements Dataset - Hot Cache
|
|
60
|
+
|
|
61
|
+
#### Execution Time Comparison
|
|
62
|
+
|
|
63
|
+
| Tool Configuration | Execution Time | Relative Performance |
|
|
64
|
+
|---------------------|---------------------|---------------------|
|
|
65
|
+
| 🥇 pysentry-pypi | 0.261s | 1.00x |
|
|
66
|
+
| 🥈 pysentry-osv | 0.999s | 3.82x |
|
|
67
|
+
| pysentry-pypa | 1.373s | 5.25x |
|
|
68
|
+
| pysentry-all-sources | 1.446s | 5.53x |
|
|
69
|
+
| pip-audit-default | 8.027s | 30.71x |
|
|
70
|
+
|
|
71
|
+
#### Memory Usage Comparison
|
|
72
|
+
|
|
73
|
+
| Tool Configuration | Peak Memory | Relative Performance |
|
|
74
|
+
|---------------------|---------------------|---------------------|
|
|
75
|
+
| 🥇 pysentry-pypi | 9.69 MB | 1.00x |
|
|
76
|
+
| 🥈 pysentry-osv | 10.16 MB | 1.05x |
|
|
77
|
+
| pip-audit-default | 45.01 MB | 4.64x |
|
|
78
|
+
| pysentry-pypa | 62.62 MB | 6.46x |
|
|
79
|
+
| pysentry-all-sources | 107.48 MB | 11.09x |
|
|
80
|
+
|
|
81
|
+
### Large_Requirements Dataset - Cold Cache
|
|
82
|
+
|
|
83
|
+
#### Execution Time Comparison
|
|
84
|
+
|
|
85
|
+
| Tool Configuration | Execution Time | Relative Performance |
|
|
86
|
+
|---------------------|---------------------|---------------------|
|
|
87
|
+
| 🥇 pysentry-pypi | 1.160s | 1.00x |
|
|
88
|
+
| 🥈 pysentry-pypa | 1.800s | 1.55x |
|
|
89
|
+
| pysentry-osv | 3.256s | 2.81x |
|
|
90
|
+
| pysentry-all-sources | 3.333s | 2.87x |
|
|
91
|
+
| pip-audit-default | 21.160s | 18.24x |
|
|
92
|
+
|
|
93
|
+
#### Memory Usage Comparison
|
|
94
|
+
|
|
95
|
+
| Tool Configuration | Peak Memory | Relative Performance |
|
|
96
|
+
|---------------------|---------------------|---------------------|
|
|
97
|
+
| 🥇 pysentry-osv | 10.34 MB | 1.00x |
|
|
98
|
+
| 🥈 pysentry-pypi | 13.09 MB | 1.27x |
|
|
99
|
+
| pip-audit-default | 47.49 MB | 4.59x |
|
|
100
|
+
| pysentry-pypa | 55.27 MB | 5.34x |
|
|
101
|
+
| pysentry-all-sources | 107.62 MB | 10.40x |
|
|
102
|
+
|
|
103
|
+
### Large_Requirements Dataset - Hot Cache
|
|
104
|
+
|
|
105
|
+
#### Execution Time Comparison
|
|
106
|
+
|
|
107
|
+
| Tool Configuration | Execution Time | Relative Performance |
|
|
108
|
+
|---------------------|---------------------|---------------------|
|
|
109
|
+
| 🥇 pysentry-pypi | 0.740s | 1.00x |
|
|
110
|
+
| 🥈 pysentry-pypa | 1.814s | 2.45x |
|
|
111
|
+
| pysentry-osv | 3.453s | 4.67x |
|
|
112
|
+
| pysentry-all-sources | 3.757s | 5.08x |
|
|
113
|
+
| pip-audit-default | 16.199s | 21.90x |
|
|
114
|
+
|
|
115
|
+
#### Memory Usage Comparison
|
|
116
|
+
|
|
117
|
+
| Tool Configuration | Peak Memory | Relative Performance |
|
|
118
|
+
|---------------------|---------------------|---------------------|
|
|
119
|
+
| 🥇 pysentry-osv | 10.33 MB | 1.00x |
|
|
120
|
+
| 🥈 pysentry-pypi | 12.99 MB | 1.26x |
|
|
121
|
+
| pip-audit-default | 46.97 MB | 4.55x |
|
|
122
|
+
| pysentry-pypa | 74.16 MB | 7.18x |
|
|
123
|
+
| pysentry-all-sources | 105.66 MB | 10.23x |
|
|
124
|
+
|
|
125
|
+
## Detailed Analysis
|
|
126
|
+
|
|
127
|
+
### Pysentry Performance
|
|
128
|
+
|
|
129
|
+
- **Execution Time:** Avg: 1.737s, Min: 0.261s, Max: 3.757s
|
|
130
|
+
|
|
131
|
+
- **Memory Usage:** Avg: 46.75 MB, Min: 9.69 MB, Max: 107.62 MB
|
|
132
|
+
|
|
133
|
+
- **Success Rate:** 100.0% (16/16)
|
|
134
|
+
|
|
135
|
+
### Pip-Audit Performance
|
|
136
|
+
|
|
137
|
+
- **Execution Time:** Avg: 13.652s, Min: 8.027s, Max: 21.160s
|
|
138
|
+
|
|
139
|
+
- **Memory Usage:** Avg: 46.17 MB, Min: 45.01 MB, Max: 47.49 MB
|
|
140
|
+
|
|
141
|
+
- **Success Rate:** 100.0% (4/4)
|
|
@@ -1,3 +1,21 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* pysentry - Python security vulnerability scanner
|
|
3
|
+
* Copyright (C) 2025 nyudenkov <nyudenkov@pm.me>
|
|
4
|
+
*
|
|
5
|
+
* This program is free software: you can redistribute it and/or modify
|
|
6
|
+
* it under the terms of the GNU General Public License as published by
|
|
7
|
+
* the Free Software Foundation, either version 3 of the License, or
|
|
8
|
+
* (at your option) any later version.
|
|
9
|
+
*
|
|
10
|
+
* This program is distributed in the hope that it will be useful,
|
|
11
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
12
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
13
|
+
* GNU General Public License for more details.
|
|
14
|
+
*
|
|
15
|
+
* You should have received a copy of the GNU General Public License
|
|
16
|
+
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
17
|
+
*/
|
|
18
|
+
|
|
1
19
|
use super::storage::{Cache, CacheBucket, CacheEntry, Freshness};
|
|
2
20
|
use crate::types::{ResolutionCacheEntry, ResolverType};
|
|
3
21
|
use anyhow::Result;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* pysentry - Python security vulnerability scanner
|
|
3
|
+
* Copyright (C) 2025 nyudenkov <nyudenkov@pm.me>
|
|
4
|
+
*
|
|
5
|
+
* This program is free software: you can redistribute it and/or modify
|
|
6
|
+
* it under the terms of the GNU General Public License as published by
|
|
7
|
+
* the Free Software Foundation, either version 3 of the License, or
|
|
8
|
+
* (at your option) any later version.
|
|
9
|
+
*
|
|
10
|
+
* This program is distributed in the hope that it will be useful,
|
|
11
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
12
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
13
|
+
* GNU General Public License for more details.
|
|
14
|
+
*
|
|
15
|
+
* You should have received a copy of the GNU General Public License
|
|
16
|
+
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
17
|
+
*/
|
|
18
|
+
|
|
19
|
+
//! Cache management module
|
|
20
|
+
|
|
21
|
+
pub use audit::{AuditCache, DatabaseMetadata};
|
|
22
|
+
pub use storage::{Cache, CacheBucket, CacheEntry, Freshness};
|
|
23
|
+
|
|
24
|
+
pub mod audit;
|
|
25
|
+
pub mod storage;
|
|
@@ -1,4 +1,22 @@
|
|
|
1
|
-
|
|
1
|
+
/*
|
|
2
|
+
* pysentry - Python security vulnerability scanner
|
|
3
|
+
* Copyright (C) 2025 nyudenkov <nyudenkov@pm.me>
|
|
4
|
+
*
|
|
5
|
+
* This program is free software: you can redistribute it and/or modify
|
|
6
|
+
* it under the terms of the GNU General Public License as published by
|
|
7
|
+
* the Free Software Foundation, either version 3 of the License, or
|
|
8
|
+
* (at your option) any later version.
|
|
9
|
+
*
|
|
10
|
+
* This program is distributed in the hope that it will be useful,
|
|
11
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
12
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
13
|
+
* GNU General Public License for more details.
|
|
14
|
+
*
|
|
15
|
+
* You should have received a copy of the GNU General Public License
|
|
16
|
+
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
17
|
+
*/
|
|
18
|
+
|
|
19
|
+
//! Cache implementation
|
|
2
20
|
|
|
3
21
|
use anyhow::Result;
|
|
4
22
|
use std::path::{Path, PathBuf};
|
|
@@ -1,3 +1,21 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* pysentry - Python security vulnerability scanner
|
|
3
|
+
* Copyright (C) 2025 nyudenkov <nyudenkov@pm.me>
|
|
4
|
+
*
|
|
5
|
+
* This program is free software: you can redistribute it and/or modify
|
|
6
|
+
* it under the terms of the GNU General Public License as published by
|
|
7
|
+
* the Free Software Foundation, either version 3 of the License, or
|
|
8
|
+
* (at your option) any later version.
|
|
9
|
+
*
|
|
10
|
+
* This program is distributed in the hope that it will be useful,
|
|
11
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
12
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
13
|
+
* GNU General Public License for more details.
|
|
14
|
+
*
|
|
15
|
+
* You should have received a copy of the GNU General Public License
|
|
16
|
+
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
17
|
+
*/
|
|
18
|
+
|
|
1
19
|
//! CLI interface definitions shared between binary and Python bindings
|
|
2
20
|
|
|
3
21
|
use anyhow::Result;
|
|
@@ -161,6 +179,10 @@ pub struct AuditArgs {
|
|
|
161
179
|
/// Suppress non-error output
|
|
162
180
|
#[arg(long, short)]
|
|
163
181
|
pub quiet: bool,
|
|
182
|
+
|
|
183
|
+
/// Show detailed vulnerability descriptions (full text instead of truncated)
|
|
184
|
+
#[arg(long)]
|
|
185
|
+
pub detailed: bool,
|
|
164
186
|
}
|
|
165
187
|
|
|
166
188
|
impl AuditArgs {
|
|
@@ -479,7 +501,7 @@ pub async fn check_version(verbose: bool) -> Result<()> {
|
|
|
479
501
|
}
|
|
480
502
|
|
|
481
503
|
pub async fn audit(audit_args: &AuditArgs, cache_dir: &Path) -> Result<i32> {
|
|
482
|
-
if
|
|
504
|
+
if audit_args.verbose {
|
|
483
505
|
eprintln!(
|
|
484
506
|
"Auditing dependencies for vulnerabilities in {}...",
|
|
485
507
|
audit_args.path.display()
|
|
@@ -520,6 +542,7 @@ pub async fn audit(audit_args: &AuditArgs, cache_dir: &Path) -> Result<i32> {
|
|
|
520
542
|
&report,
|
|
521
543
|
audit_args.format.clone().into(),
|
|
522
544
|
Some(&audit_args.path),
|
|
545
|
+
audit_args.detailed,
|
|
523
546
|
)
|
|
524
547
|
.map_err(|e| anyhow::anyhow!("Failed to generate report: {e}"))?;
|
|
525
548
|
|
|
@@ -562,7 +585,7 @@ async fn perform_audit(audit_args: &AuditArgs, cache_dir: &Path) -> Result<Audit
|
|
|
562
585
|
.collect();
|
|
563
586
|
|
|
564
587
|
let source_names: Vec<_> = vuln_sources.iter().map(|s| s.name()).collect();
|
|
565
|
-
if
|
|
588
|
+
if audit_args.verbose {
|
|
566
589
|
if source_names.len() == 1 {
|
|
567
590
|
eprintln!("Fetching vulnerability data from {}...", source_names[0]);
|
|
568
591
|
} else {
|
|
@@ -574,7 +597,7 @@ async fn perform_audit(audit_args: &AuditArgs, cache_dir: &Path) -> Result<Audit
|
|
|
574
597
|
}
|
|
575
598
|
}
|
|
576
599
|
|
|
577
|
-
if
|
|
600
|
+
if audit_args.verbose {
|
|
578
601
|
eprintln!("Scanning project dependencies...");
|
|
579
602
|
}
|
|
580
603
|
|
|
@@ -696,7 +719,7 @@ async fn perform_audit(audit_args: &AuditArgs, cache_dir: &Path) -> Result<Audit
|
|
|
696
719
|
.map(|dep| (dep.name.to_string(), dep.version.to_string()))
|
|
697
720
|
.collect();
|
|
698
721
|
|
|
699
|
-
if
|
|
722
|
+
if audit_args.verbose {
|
|
700
723
|
if source_names.len() == 1 {
|
|
701
724
|
eprintln!(
|
|
702
725
|
"Fetching vulnerabilities for {} packages from {}...",
|
|
@@ -731,7 +754,7 @@ async fn perform_audit(audit_args: &AuditArgs, cache_dir: &Path) -> Result<Audit
|
|
|
731
754
|
VulnerabilityDatabase::merge(databases)
|
|
732
755
|
};
|
|
733
756
|
|
|
734
|
-
if
|
|
757
|
+
if audit_args.verbose {
|
|
735
758
|
eprintln!("Matching against vulnerability database...");
|
|
736
759
|
}
|
|
737
760
|
let matcher_config = MatcherConfig::new(
|
|
@@ -756,7 +779,7 @@ async fn perform_audit(audit_args: &AuditArgs, cache_dir: &Path) -> Result<Audit
|
|
|
756
779
|
);
|
|
757
780
|
|
|
758
781
|
let summary = report.summary();
|
|
759
|
-
if
|
|
782
|
+
if audit_args.verbose {
|
|
760
783
|
eprintln!(
|
|
761
784
|
"Audit complete: {} vulnerabilities found in {} packages",
|
|
762
785
|
summary.total_vulnerabilities, summary.vulnerable_packages
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* pysentry - Python security vulnerability scanner
|
|
3
|
+
* Copyright (C) 2025 nyudenkov <nyudenkov@pm.me>
|
|
4
|
+
*
|
|
5
|
+
* This program is free software: you can redistribute it and/or modify
|
|
6
|
+
* it under the terms of the GNU General Public License as published by
|
|
7
|
+
* the Free Software Foundation, either version 3 of the License, or
|
|
8
|
+
* (at your option) any later version.
|
|
9
|
+
*
|
|
10
|
+
* This program is distributed in the hope that it will be useful,
|
|
11
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
12
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
13
|
+
* GNU General Public License for more details.
|
|
14
|
+
*
|
|
15
|
+
* You should have received a copy of the GNU General Public License
|
|
16
|
+
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
17
|
+
*/
|
|
18
|
+
|
|
19
|
+
//! Dependency analysis module
|
|
20
|
+
|
|
21
|
+
pub use scanner::{DependencyScanner, DependencyStats};
|
|
22
|
+
|
|
23
|
+
pub mod resolvers;
|
|
24
|
+
pub mod scanner;
|
|
@@ -1,3 +1,21 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* pysentry - Python security vulnerability scanner
|
|
3
|
+
* Copyright (C) 2025 nyudenkov <nyudenkov@pm.me>
|
|
4
|
+
*
|
|
5
|
+
* This program is free software: you can redistribute it and/or modify
|
|
6
|
+
* it under the terms of the GNU General Public License as published by
|
|
7
|
+
* the Free Software Foundation, either version 3 of the License, or
|
|
8
|
+
* (at your option) any later version.
|
|
9
|
+
*
|
|
10
|
+
* This program is distributed in the hope that it will be useful,
|
|
11
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
12
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
13
|
+
* GNU General Public License for more details.
|
|
14
|
+
*
|
|
15
|
+
* You should have received a copy of the GNU General Public License
|
|
16
|
+
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
17
|
+
*/
|
|
18
|
+
|
|
1
19
|
//! External dependency resolvers
|
|
2
20
|
//!
|
|
3
21
|
//! This module provides a pluggable architecture for dependency resolution
|
|
@@ -1,3 +1,21 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* pysentry - Python security vulnerability scanner
|
|
3
|
+
* Copyright (C) 2025 nyudenkov <nyudenkov@pm.me>
|
|
4
|
+
*
|
|
5
|
+
* This program is free software: you can redistribute it and/or modify
|
|
6
|
+
* it under the terms of the GNU General Public License as published by
|
|
7
|
+
* the Free Software Foundation, either version 3 of the License, or
|
|
8
|
+
* (at your option) any later version.
|
|
9
|
+
*
|
|
10
|
+
* This program is distributed in the hope that it will be useful,
|
|
11
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
12
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
13
|
+
* GNU General Public License for more details.
|
|
14
|
+
*
|
|
15
|
+
* You should have received a copy of the GNU General Public License
|
|
16
|
+
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
17
|
+
*/
|
|
18
|
+
|
|
1
19
|
//! pip-tools dependency resolver implementation
|
|
2
20
|
//!
|
|
3
21
|
//! pip-tools (pip-compile) is a popular Python-based dependency resolver.
|
|
@@ -1,3 +1,21 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* pysentry - Python security vulnerability scanner
|
|
3
|
+
* Copyright (C) 2025 nyudenkov <nyudenkov@pm.me>
|
|
4
|
+
*
|
|
5
|
+
* This program is free software: you can redistribute it and/or modify
|
|
6
|
+
* it under the terms of the GNU General Public License as published by
|
|
7
|
+
* the Free Software Foundation, either version 3 of the License, or
|
|
8
|
+
* (at your option) any later version.
|
|
9
|
+
*
|
|
10
|
+
* This program is distributed in the hope that it will be useful,
|
|
11
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
12
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
13
|
+
* GNU General Public License for more details.
|
|
14
|
+
*
|
|
15
|
+
* You should have received a copy of the GNU General Public License
|
|
16
|
+
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
17
|
+
*/
|
|
18
|
+
|
|
1
19
|
//! UV dependency resolver implementation
|
|
2
20
|
//!
|
|
3
21
|
//! UV is a fast, Rust-based Python package manager and dependency resolver.
|
|
@@ -1,3 +1,21 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* pysentry - Python security vulnerability scanner
|
|
3
|
+
* Copyright (C) 2025 nyudenkov <nyudenkov@pm.me>
|
|
4
|
+
*
|
|
5
|
+
* This program is free software: you can redistribute it and/or modify
|
|
6
|
+
* it under the terms of the GNU General Public License as published by
|
|
7
|
+
* the Free Software Foundation, either version 3 of the License, or
|
|
8
|
+
* (at your option) any later version.
|
|
9
|
+
*
|
|
10
|
+
* This program is distributed in the hope that it will be useful,
|
|
11
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
12
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
13
|
+
* GNU General Public License for more details.
|
|
14
|
+
*
|
|
15
|
+
* You should have received a copy of the GNU General Public License
|
|
16
|
+
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
17
|
+
*/
|
|
18
|
+
|
|
1
19
|
pub use crate::parsers::DependencyStats;
|
|
2
20
|
use crate::parsers::{ParsedDependency, ParserRegistry};
|
|
3
21
|
use crate::Result;
|