pysentry-rs 0.3.2__tar.gz → 0.3.4__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.

Files changed (66) hide show
  1. pysentry_rs-0.3.4/.pre-commit-hooks.yaml +10 -0
  2. {pysentry_rs-0.3.2 → pysentry_rs-0.3.4}/Cargo.lock +69 -18
  3. {pysentry_rs-0.3.2 → pysentry_rs-0.3.4}/Cargo.toml +3 -3
  4. {pysentry_rs-0.3.2 → pysentry_rs-0.3.4}/PKG-INFO +54 -25
  5. {pysentry_rs-0.3.2 → pysentry_rs-0.3.4}/README.md +53 -24
  6. pysentry_rs-0.3.4/benchmarks/results/0.3.2.md +141 -0
  7. pysentry_rs-0.3.4/benchmarks/results/0.3.3.md +141 -0
  8. pysentry_rs-0.3.4/benchmarks/results/latest.md +141 -0
  9. {pysentry_rs-0.3.2 → pysentry_rs-0.3.4}/src/parsers/pyproject.rs +367 -11
  10. pysentry_rs-0.3.2/benchmarks/results/latest.md +0 -141
  11. {pysentry_rs-0.3.2 → pysentry_rs-0.3.4}/.github/FUNDING.yml +0 -0
  12. {pysentry_rs-0.3.2 → pysentry_rs-0.3.4}/.github/dependabot.yml +0 -0
  13. {pysentry_rs-0.3.2 → pysentry_rs-0.3.4}/.github/workflows/benchmark.yml +0 -0
  14. {pysentry_rs-0.3.2 → pysentry_rs-0.3.4}/.github/workflows/ci.yml +0 -0
  15. {pysentry_rs-0.3.2 → pysentry_rs-0.3.4}/.github/workflows/release.yml +0 -0
  16. {pysentry_rs-0.3.2 → pysentry_rs-0.3.4}/.gitignore +0 -0
  17. {pysentry_rs-0.3.2 → pysentry_rs-0.3.4}/.pre-commit-config.yaml +0 -0
  18. {pysentry_rs-0.3.2 → pysentry_rs-0.3.4}/LICENSE +0 -0
  19. {pysentry_rs-0.3.2 → pysentry_rs-0.3.4}/benchmarks/.gitignore +0 -0
  20. {pysentry_rs-0.3.2 → pysentry_rs-0.3.4}/benchmarks/.python-version +0 -0
  21. {pysentry_rs-0.3.2 → pysentry_rs-0.3.4}/benchmarks/README.md +0 -0
  22. {pysentry_rs-0.3.2 → pysentry_rs-0.3.4}/benchmarks/main.py +0 -0
  23. {pysentry_rs-0.3.2 → pysentry_rs-0.3.4}/benchmarks/pyproject.toml +0 -0
  24. {pysentry_rs-0.3.2 → pysentry_rs-0.3.4}/benchmarks/results/0.2.3.md +0 -0
  25. {pysentry_rs-0.3.2 → pysentry_rs-0.3.4}/benchmarks/results/0.3.1.md +0 -0
  26. {pysentry_rs-0.3.2 → pysentry_rs-0.3.4}/benchmarks/src/benchmark_runner.py +0 -0
  27. {pysentry_rs-0.3.2 → pysentry_rs-0.3.4}/benchmarks/src/performance_monitor.py +0 -0
  28. {pysentry_rs-0.3.2 → pysentry_rs-0.3.4}/benchmarks/src/report_generator.py +0 -0
  29. {pysentry_rs-0.3.2 → pysentry_rs-0.3.4}/benchmarks/src/tool_wrapper.py +0 -0
  30. {pysentry_rs-0.3.2 → pysentry_rs-0.3.4}/benchmarks/test_data/large_requirements.txt +0 -0
  31. {pysentry_rs-0.3.2 → pysentry_rs-0.3.4}/benchmarks/test_data/small_requirements.txt +0 -0
  32. {pysentry_rs-0.3.2 → pysentry_rs-0.3.4}/benchmarks/uv.lock +0 -0
  33. {pysentry_rs-0.3.2 → pysentry_rs-0.3.4}/fixtures/requirements-tests/requirements-dev.txt +0 -0
  34. {pysentry_rs-0.3.2 → pysentry_rs-0.3.4}/fixtures/requirements-tests/requirements.txt +0 -0
  35. {pysentry_rs-0.3.2 → pysentry_rs-0.3.4}/fixtures/requirements-tests-vulnerable/requirements.txt +0 -0
  36. {pysentry_rs-0.3.2 → pysentry_rs-0.3.4}/pyproject.toml +0 -0
  37. {pysentry_rs-0.3.2 → pysentry_rs-0.3.4}/python/pysentry/__init__.py +0 -0
  38. {pysentry_rs-0.3.2 → pysentry_rs-0.3.4}/src/cache/audit.rs +0 -0
  39. {pysentry_rs-0.3.2 → pysentry_rs-0.3.4}/src/cache/mod.rs +0 -0
  40. {pysentry_rs-0.3.2 → pysentry_rs-0.3.4}/src/cache/storage.rs +0 -0
  41. {pysentry_rs-0.3.2 → pysentry_rs-0.3.4}/src/cli.rs +0 -0
  42. {pysentry_rs-0.3.2 → pysentry_rs-0.3.4}/src/config.rs +0 -0
  43. {pysentry_rs-0.3.2 → pysentry_rs-0.3.4}/src/dependency/mod.rs +0 -0
  44. {pysentry_rs-0.3.2 → pysentry_rs-0.3.4}/src/dependency/resolvers/mod.rs +0 -0
  45. {pysentry_rs-0.3.2 → pysentry_rs-0.3.4}/src/dependency/resolvers/pip_tools.rs +0 -0
  46. {pysentry_rs-0.3.2 → pysentry_rs-0.3.4}/src/dependency/resolvers/uv.rs +0 -0
  47. {pysentry_rs-0.3.2 → pysentry_rs-0.3.4}/src/dependency/scanner.rs +0 -0
  48. {pysentry_rs-0.3.2 → pysentry_rs-0.3.4}/src/error.rs +0 -0
  49. {pysentry_rs-0.3.2 → pysentry_rs-0.3.4}/src/lib.rs +0 -0
  50. {pysentry_rs-0.3.2 → pysentry_rs-0.3.4}/src/main.rs +0 -0
  51. {pysentry_rs-0.3.2 → pysentry_rs-0.3.4}/src/output/mod.rs +0 -0
  52. {pysentry_rs-0.3.2 → pysentry_rs-0.3.4}/src/output/report.rs +0 -0
  53. {pysentry_rs-0.3.2 → pysentry_rs-0.3.4}/src/output/sarif.rs +0 -0
  54. {pysentry_rs-0.3.2 → pysentry_rs-0.3.4}/src/parsers/lock.rs +0 -0
  55. {pysentry_rs-0.3.2 → pysentry_rs-0.3.4}/src/parsers/mod.rs +0 -0
  56. {pysentry_rs-0.3.2 → pysentry_rs-0.3.4}/src/parsers/poetry_lock.rs +0 -0
  57. {pysentry_rs-0.3.2 → pysentry_rs-0.3.4}/src/parsers/requirements.rs +0 -0
  58. {pysentry_rs-0.3.2 → pysentry_rs-0.3.4}/src/providers/mod.rs +0 -0
  59. {pysentry_rs-0.3.2 → pysentry_rs-0.3.4}/src/providers/osv.rs +0 -0
  60. {pysentry_rs-0.3.2 → pysentry_rs-0.3.4}/src/providers/pypa.rs +0 -0
  61. {pysentry_rs-0.3.2 → pysentry_rs-0.3.4}/src/providers/pypi.rs +0 -0
  62. {pysentry_rs-0.3.2 → pysentry_rs-0.3.4}/src/python.rs +0 -0
  63. {pysentry_rs-0.3.2 → pysentry_rs-0.3.4}/src/types.rs +0 -0
  64. {pysentry_rs-0.3.2 → pysentry_rs-0.3.4}/src/vulnerability/database.rs +0 -0
  65. {pysentry_rs-0.3.2 → pysentry_rs-0.3.4}/src/vulnerability/matcher.rs +0 -0
  66. {pysentry_rs-0.3.2 → pysentry_rs-0.3.4}/src/vulnerability/mod.rs +0 -0
@@ -0,0 +1,10 @@
1
+ - id: pysentry
2
+ name: pysentry
3
+ description: "Fast security vulnerability scanner for Python dependencies"
4
+ entry: pysentry
5
+ language: python
6
+ always_run: true
7
+ additional_dependencies:
8
+ ["pysentry-rs==0.3.4", "uv==0.8.9", "pip-tools==7.5.0"]
9
+ minimum_pre_commit_version: "2.9.2"
10
+ types: [python]
@@ -253,6 +253,16 @@ version = "1.0.4"
253
253
  source = "registry+https://github.com/rust-lang/crates.io-index"
254
254
  checksum = "b05b61dc5112cbb17e4b6cd61790d9845d13888356391624cbe7e41efeac1e75"
255
255
 
256
+ [[package]]
257
+ name = "core-foundation"
258
+ version = "0.10.1"
259
+ source = "registry+https://github.com/rust-lang/crates.io-index"
260
+ checksum = "b2a6cd9ae233e7f62ba4e9353e81a88df7fc8a5987b8d445b4d90c879bd156f6"
261
+ dependencies = [
262
+ "core-foundation-sys",
263
+ "libc",
264
+ ]
265
+
256
266
  [[package]]
257
267
  name = "core-foundation-sys"
258
268
  version = "0.8.7"
@@ -610,11 +620,11 @@ dependencies = [
610
620
  "hyper",
611
621
  "hyper-util",
612
622
  "rustls",
623
+ "rustls-native-certs",
613
624
  "rustls-pki-types",
614
625
  "tokio",
615
626
  "tokio-rustls",
616
627
  "tower-service",
617
- "webpki-roots",
618
628
  ]
619
629
 
620
630
  [[package]]
@@ -976,6 +986,12 @@ version = "1.70.1"
976
986
  source = "registry+https://github.com/rust-lang/crates.io-index"
977
987
  checksum = "a4895175b425cb1f87721b59f0f286c2092bd4af812243672510e1ac53e2e0ad"
978
988
 
989
+ [[package]]
990
+ name = "openssl-probe"
991
+ version = "0.1.6"
992
+ source = "registry+https://github.com/rust-lang/crates.io-index"
993
+ checksum = "d05e27ee213611ffe7d6348b942e8f942b37114c00cc03cec254295a4a17852e"
994
+
979
995
  [[package]]
980
996
  name = "option-ext"
981
997
  version = "0.2.0"
@@ -1121,7 +1137,7 @@ dependencies = [
1121
1137
 
1122
1138
  [[package]]
1123
1139
  name = "pysentry"
1124
- version = "0.3.2"
1140
+ version = "0.3.4"
1125
1141
  dependencies = [
1126
1142
  "anyhow",
1127
1143
  "async-trait",
@@ -1305,9 +1321,9 @@ checksum = "2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c"
1305
1321
 
1306
1322
  [[package]]
1307
1323
  name = "reqwest"
1308
- version = "0.12.22"
1324
+ version = "0.12.23"
1309
1325
  source = "registry+https://github.com/rust-lang/crates.io-index"
1310
- checksum = "cbc931937e6ca3a06e3b6c0aa7841849b160a90351d6ab467a8b9b9959767531"
1326
+ checksum = "d429f34c8092b2d42c7c93cec323bb4adeb7c67698f70839adec842ec10c7ceb"
1311
1327
  dependencies = [
1312
1328
  "base64",
1313
1329
  "bytes",
@@ -1325,6 +1341,7 @@ dependencies = [
1325
1341
  "pin-project-lite",
1326
1342
  "quinn",
1327
1343
  "rustls",
1344
+ "rustls-native-certs",
1328
1345
  "rustls-pki-types",
1329
1346
  "serde",
1330
1347
  "serde_json",
@@ -1341,7 +1358,6 @@ dependencies = [
1341
1358
  "wasm-bindgen-futures",
1342
1359
  "wasm-streams",
1343
1360
  "web-sys",
1344
- "webpki-roots",
1345
1361
  ]
1346
1362
 
1347
1363
  [[package]]
@@ -1397,6 +1413,18 @@ dependencies = [
1397
1413
  "zeroize",
1398
1414
  ]
1399
1415
 
1416
+ [[package]]
1417
+ name = "rustls-native-certs"
1418
+ version = "0.8.1"
1419
+ source = "registry+https://github.com/rust-lang/crates.io-index"
1420
+ checksum = "7fcff2dd52b58a8d98a70243663a0d234c4e2b79235637849d15913394a247d3"
1421
+ dependencies = [
1422
+ "openssl-probe",
1423
+ "rustls-pki-types",
1424
+ "schannel",
1425
+ "security-framework",
1426
+ ]
1427
+
1400
1428
  [[package]]
1401
1429
  name = "rustls-pki-types"
1402
1430
  version = "1.12.0"
@@ -1430,6 +1458,38 @@ version = "1.0.20"
1430
1458
  source = "registry+https://github.com/rust-lang/crates.io-index"
1431
1459
  checksum = "28d3b2b1366ec20994f1fd18c3c594f05c5dd4bc44d8bb0c1c632c8d6829481f"
1432
1460
 
1461
+ [[package]]
1462
+ name = "schannel"
1463
+ version = "0.1.27"
1464
+ source = "registry+https://github.com/rust-lang/crates.io-index"
1465
+ checksum = "1f29ebaa345f945cec9fbbc532eb307f0fdad8161f281b6369539c8d84876b3d"
1466
+ dependencies = [
1467
+ "windows-sys 0.59.0",
1468
+ ]
1469
+
1470
+ [[package]]
1471
+ name = "security-framework"
1472
+ version = "3.3.0"
1473
+ source = "registry+https://github.com/rust-lang/crates.io-index"
1474
+ checksum = "80fb1d92c5028aa318b4b8bd7302a5bfcf48be96a37fc6fc790f806b0004ee0c"
1475
+ dependencies = [
1476
+ "bitflags",
1477
+ "core-foundation",
1478
+ "core-foundation-sys",
1479
+ "libc",
1480
+ "security-framework-sys",
1481
+ ]
1482
+
1483
+ [[package]]
1484
+ name = "security-framework-sys"
1485
+ version = "2.14.0"
1486
+ source = "registry+https://github.com/rust-lang/crates.io-index"
1487
+ checksum = "49db231d56a190491cb4aeda9527f1ad45345af50b0851622a7adb8c03b01c32"
1488
+ dependencies = [
1489
+ "core-foundation-sys",
1490
+ "libc",
1491
+ ]
1492
+
1433
1493
  [[package]]
1434
1494
  name = "serde"
1435
1495
  version = "1.0.219"
@@ -1639,18 +1699,18 @@ dependencies = [
1639
1699
 
1640
1700
  [[package]]
1641
1701
  name = "thiserror"
1642
- version = "2.0.12"
1702
+ version = "2.0.14"
1643
1703
  source = "registry+https://github.com/rust-lang/crates.io-index"
1644
- checksum = "567b8a2dae586314f7be2a752ec7474332959c6460e02bde30d702a66d488708"
1704
+ checksum = "0b0949c3a6c842cbde3f1686d6eea5a010516deb7085f79db747562d4102f41e"
1645
1705
  dependencies = [
1646
1706
  "thiserror-impl",
1647
1707
  ]
1648
1708
 
1649
1709
  [[package]]
1650
1710
  name = "thiserror-impl"
1651
- version = "2.0.12"
1711
+ version = "2.0.14"
1652
1712
  source = "registry+https://github.com/rust-lang/crates.io-index"
1653
- checksum = "7f7cf42b4507d8ea322120659672cf1b9dbb93f8f2d4ecfd6e51350ff5b17a1d"
1713
+ checksum = "cc5b44b4ab9c2fdd0e0512e6bece8388e214c0749f5862b114cc5b7a25daf227"
1654
1714
  dependencies = [
1655
1715
  "proc-macro2",
1656
1716
  "quote",
@@ -2100,15 +2160,6 @@ dependencies = [
2100
2160
  "wasm-bindgen",
2101
2161
  ]
2102
2162
 
2103
- [[package]]
2104
- name = "webpki-roots"
2105
- version = "1.0.2"
2106
- source = "registry+https://github.com/rust-lang/crates.io-index"
2107
- checksum = "7e8983c3ab33d6fb807cfcdad2491c4ea8cbc8ed839181c7dfd9c67c83e261b2"
2108
- dependencies = [
2109
- "rustls-pki-types",
2110
- ]
2111
-
2112
2163
  [[package]]
2113
2164
  name = "winapi"
2114
2165
  version = "0.3.9"
@@ -1,6 +1,6 @@
1
1
  [package]
2
2
  name = "pysentry"
3
- version = "0.3.2"
3
+ version = "0.3.4"
4
4
  edition = "2021"
5
5
  rust-version = "1.79"
6
6
  description = "Security vulnerability auditing for Python packages"
@@ -33,14 +33,14 @@ owo-colors = "4.2.2"
33
33
  pep440_rs = "0.7.3"
34
34
  pyo3 = { version = "0.25.1", features = ["extension-module"], optional = true }
35
35
  regex = "1.11.1"
36
- reqwest = { version = "0.12.22", features = ["json", "stream", "rustls-tls"], default-features = false }
36
+ reqwest = { version = "0.12.23", features = ["json", "stream", "rustls-tls-native-roots"], default-features = false }
37
37
  rustc-hash = "2.1.1"
38
38
  serde = { version = "1.0.219", features = ["derive"] }
39
39
  serde_json = "1.0.142"
40
40
  serde_yaml = "0.9.34"
41
41
  sha2 = "0.10.9"
42
42
  tempfile = "3.20.0"
43
- thiserror = "2.0.12"
43
+ thiserror = "2.0.14"
44
44
  tokio = { version = "1.47.1", features = ["fs", "io-util", "rt-multi-thread", "macros", "process"] }
45
45
  toml = "0.9.5"
46
46
  tracing = "0.1.41"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pysentry-rs
3
- Version: 0.3.2
3
+ Version: 0.3.4
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)
@@ -287,6 +287,35 @@ pysentry --clear-resolution-cache --sources pypa,osv --format sarif
287
287
  pysentry --no-resolution-cache --format json --output security-report.json
288
288
  ```
289
289
 
290
+ ## Pre-commit Integration
291
+
292
+ PySentry integrates seamlessly with [pre-commit](https://pre-commit.com/) to automatically scan for vulnerabilities before commits.
293
+
294
+ ### Setup
295
+
296
+ Add PySentry to your `.pre-commit-config.yaml`:
297
+
298
+ ```yaml
299
+ repos:
300
+ - repo: https://github.com/nyudenkov/pysentry
301
+ hooks:
302
+ - id: pysentry # default pysentry settings
303
+ ```
304
+
305
+ ### Advanced Configuration
306
+
307
+ ```yaml
308
+ repos:
309
+ - repo: https://github.com/nyudenkov/pysentry
310
+ hooks:
311
+ - id: pysentry
312
+ args: ["--sources", "pypa,osv", "--fail-on", "high"]
313
+ ```
314
+
315
+ ### Installation Requirements
316
+
317
+ Pre-commit will automatically install PySentry, uv and pip-tools via PyPI.
318
+
290
319
  ## Configuration
291
320
 
292
321
  PySentry supports TOML-based configuration files for persistent settings management. Configuration files follow a hierarchical discovery pattern:
@@ -330,33 +359,33 @@ ids = ["CVE-2023-12345", "GHSA-xxxx-yyyy-zzzz"]
330
359
 
331
360
  ### Environment Variables
332
361
 
333
- | Variable | Description | Example |
334
- |----------|-------------|---------|
335
- | `PYSENTRY_CONFIG` | Override config file path | `PYSENTRY_CONFIG=/path/to/config.toml` |
336
- | `PYSENTRY_NO_CONFIG` | Disable all config file loading | `PYSENTRY_NO_CONFIG=1` |
362
+ | Variable | Description | Example |
363
+ | -------------------- | ------------------------------- | -------------------------------------- |
364
+ | `PYSENTRY_CONFIG` | Override config file path | `PYSENTRY_CONFIG=/path/to/config.toml` |
365
+ | `PYSENTRY_NO_CONFIG` | Disable all config file loading | `PYSENTRY_NO_CONFIG=1` |
337
366
 
338
367
  ### Command Line Options
339
368
 
340
- | Option | Description | Default |
341
- | -------------------------- | ------------------------------------------------------- | ----------------- |
342
- | `--format` | Output format: `human`, `json`, `sarif`, `markdown` | `human` |
343
- | `--severity` | Minimum severity: `low`, `medium`, `high`, `critical` | `low` |
344
- | `--fail-on` | Fail (exit non-zero) on vulnerabilities ≥ severity | `medium` |
345
- | `--sources` | Vulnerability sources: `pypa`, `pypi`, `osv` (multiple) | `pypa` |
346
- | `--all-extras` | Include all dependencies (main + dev + optional) | `false` |
347
- | `--direct-only` | Check only direct dependencies | `false` |
348
- | `--detailed` | Show full vulnerability descriptions instead of truncated| `false` |
349
- | `--ignore` | Vulnerability IDs to ignore (repeatable) | `[]` |
350
- | `--output` | Output file path | `stdout` |
351
- | `--no-cache` | Disable all caching | `false` |
352
- | `--cache-dir` | Custom cache directory | Platform-specific |
353
- | `--resolution-cache-ttl` | Resolution cache TTL in hours | `24` |
354
- | `--no-resolution-cache` | Disable resolution caching only | `false` |
355
- | `--clear-resolution-cache` | Clear resolution cache on startup | `false` |
356
- | `--verbose` | Enable verbose output | `false` |
357
- | `--quiet` | Suppress non-error output | `false` |
358
- | `--resolver` | Dependency resolver: `auto`, `uv`, `pip-tools` | `auto` |
359
- | `--requirements` | Additional requirements files (repeatable) | `[]` |
369
+ | Option | Description | Default |
370
+ | -------------------------- | --------------------------------------------------------- | ----------------- |
371
+ | `--format` | Output format: `human`, `json`, `sarif`, `markdown` | `human` |
372
+ | `--severity` | Minimum severity: `low`, `medium`, `high`, `critical` | `low` |
373
+ | `--fail-on` | Fail (exit non-zero) on vulnerabilities ≥ severity | `medium` |
374
+ | `--sources` | Vulnerability sources: `pypa`, `pypi`, `osv` (multiple) | `pypa` |
375
+ | `--all-extras` | Include all dependencies (main + dev + optional) | `false` |
376
+ | `--direct-only` | Check only direct dependencies | `false` |
377
+ | `--detailed` | Show full vulnerability descriptions instead of truncated | `false` |
378
+ | `--ignore` | Vulnerability IDs to ignore (repeatable) | `[]` |
379
+ | `--output` | Output file path | `stdout` |
380
+ | `--no-cache` | Disable all caching | `false` |
381
+ | `--cache-dir` | Custom cache directory | Platform-specific |
382
+ | `--resolution-cache-ttl` | Resolution cache TTL in hours | `24` |
383
+ | `--no-resolution-cache` | Disable resolution caching only | `false` |
384
+ | `--clear-resolution-cache` | Clear resolution cache on startup | `false` |
385
+ | `--verbose` | Enable verbose output | `false` |
386
+ | `--quiet` | Suppress non-error output | `false` |
387
+ | `--resolver` | Dependency resolver: `auto`, `uv`, `pip-tools` | `auto` |
388
+ | `--requirements` | Additional requirements files (repeatable) | `[]` |
360
389
 
361
390
  ### Cache Management
362
391
 
@@ -261,6 +261,35 @@ pysentry --clear-resolution-cache --sources pypa,osv --format sarif
261
261
  pysentry --no-resolution-cache --format json --output security-report.json
262
262
  ```
263
263
 
264
+ ## Pre-commit Integration
265
+
266
+ PySentry integrates seamlessly with [pre-commit](https://pre-commit.com/) to automatically scan for vulnerabilities before commits.
267
+
268
+ ### Setup
269
+
270
+ Add PySentry to your `.pre-commit-config.yaml`:
271
+
272
+ ```yaml
273
+ repos:
274
+ - repo: https://github.com/nyudenkov/pysentry
275
+ hooks:
276
+ - id: pysentry # default pysentry settings
277
+ ```
278
+
279
+ ### Advanced Configuration
280
+
281
+ ```yaml
282
+ repos:
283
+ - repo: https://github.com/nyudenkov/pysentry
284
+ hooks:
285
+ - id: pysentry
286
+ args: ["--sources", "pypa,osv", "--fail-on", "high"]
287
+ ```
288
+
289
+ ### Installation Requirements
290
+
291
+ Pre-commit will automatically install PySentry, uv and pip-tools via PyPI.
292
+
264
293
  ## Configuration
265
294
 
266
295
  PySentry supports TOML-based configuration files for persistent settings management. Configuration files follow a hierarchical discovery pattern:
@@ -304,33 +333,33 @@ ids = ["CVE-2023-12345", "GHSA-xxxx-yyyy-zzzz"]
304
333
 
305
334
  ### Environment Variables
306
335
 
307
- | Variable | Description | Example |
308
- |----------|-------------|---------|
309
- | `PYSENTRY_CONFIG` | Override config file path | `PYSENTRY_CONFIG=/path/to/config.toml` |
310
- | `PYSENTRY_NO_CONFIG` | Disable all config file loading | `PYSENTRY_NO_CONFIG=1` |
336
+ | Variable | Description | Example |
337
+ | -------------------- | ------------------------------- | -------------------------------------- |
338
+ | `PYSENTRY_CONFIG` | Override config file path | `PYSENTRY_CONFIG=/path/to/config.toml` |
339
+ | `PYSENTRY_NO_CONFIG` | Disable all config file loading | `PYSENTRY_NO_CONFIG=1` |
311
340
 
312
341
  ### Command Line Options
313
342
 
314
- | Option | Description | Default |
315
- | -------------------------- | ------------------------------------------------------- | ----------------- |
316
- | `--format` | Output format: `human`, `json`, `sarif`, `markdown` | `human` |
317
- | `--severity` | Minimum severity: `low`, `medium`, `high`, `critical` | `low` |
318
- | `--fail-on` | Fail (exit non-zero) on vulnerabilities ≥ severity | `medium` |
319
- | `--sources` | Vulnerability sources: `pypa`, `pypi`, `osv` (multiple) | `pypa` |
320
- | `--all-extras` | Include all dependencies (main + dev + optional) | `false` |
321
- | `--direct-only` | Check only direct dependencies | `false` |
322
- | `--detailed` | Show full vulnerability descriptions instead of truncated| `false` |
323
- | `--ignore` | Vulnerability IDs to ignore (repeatable) | `[]` |
324
- | `--output` | Output file path | `stdout` |
325
- | `--no-cache` | Disable all caching | `false` |
326
- | `--cache-dir` | Custom cache directory | Platform-specific |
327
- | `--resolution-cache-ttl` | Resolution cache TTL in hours | `24` |
328
- | `--no-resolution-cache` | Disable resolution caching only | `false` |
329
- | `--clear-resolution-cache` | Clear resolution cache on startup | `false` |
330
- | `--verbose` | Enable verbose output | `false` |
331
- | `--quiet` | Suppress non-error output | `false` |
332
- | `--resolver` | Dependency resolver: `auto`, `uv`, `pip-tools` | `auto` |
333
- | `--requirements` | Additional requirements files (repeatable) | `[]` |
343
+ | Option | Description | Default |
344
+ | -------------------------- | --------------------------------------------------------- | ----------------- |
345
+ | `--format` | Output format: `human`, `json`, `sarif`, `markdown` | `human` |
346
+ | `--severity` | Minimum severity: `low`, `medium`, `high`, `critical` | `low` |
347
+ | `--fail-on` | Fail (exit non-zero) on vulnerabilities ≥ severity | `medium` |
348
+ | `--sources` | Vulnerability sources: `pypa`, `pypi`, `osv` (multiple) | `pypa` |
349
+ | `--all-extras` | Include all dependencies (main + dev + optional) | `false` |
350
+ | `--direct-only` | Check only direct dependencies | `false` |
351
+ | `--detailed` | Show full vulnerability descriptions instead of truncated | `false` |
352
+ | `--ignore` | Vulnerability IDs to ignore (repeatable) | `[]` |
353
+ | `--output` | Output file path | `stdout` |
354
+ | `--no-cache` | Disable all caching | `false` |
355
+ | `--cache-dir` | Custom cache directory | Platform-specific |
356
+ | `--resolution-cache-ttl` | Resolution cache TTL in hours | `24` |
357
+ | `--no-resolution-cache` | Disable resolution caching only | `false` |
358
+ | `--clear-resolution-cache` | Clear resolution cache on startup | `false` |
359
+ | `--verbose` | Enable verbose output | `false` |
360
+ | `--quiet` | Suppress non-error output | `false` |
361
+ | `--resolver` | Dependency resolver: `auto`, `uv`, `pip-tools` | `auto` |
362
+ | `--requirements` | Additional requirements files (repeatable) | `[]` |
334
363
 
335
364
  ### Cache Management
336
365
 
@@ -0,0 +1,141 @@
1
+ # PySentry - pip-audit Benchmark Report
2
+
3
+ **Generated:** 2025-08-13 12:12:39
4
+ **Duration:** 1m 46.86s
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.179s) - 46.37x faster than slowest
13
+ - **Memory Efficient:** pysentry-pypi (8.52 MB) - 12.47x less memory than highest
14
+
15
+ ### Small_Requirements Dataset - Hot Cache
16
+ - **Fastest:** pysentry-pypi (0.163s) - 48.14x faster than slowest
17
+ - **Memory Efficient:** pysentry-pypi (8.43 MB) - 11.45x less memory than highest
18
+
19
+ ### Large_Requirements Dataset - Cold Cache
20
+ - **Fastest:** pysentry-pypi (0.642s) - 26.63x faster than slowest
21
+ - **Memory Efficient:** pysentry-osv (10.42 MB) - 9.72x less memory than highest
22
+
23
+ ### Large_Requirements Dataset - Hot Cache
24
+ - **Fastest:** pysentry-pypi (0.594s) - 25.42x faster than slowest
25
+ - **Memory Efficient:** pysentry-pypi (8.40 MB) - 12.41x 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.74 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.179s | 1.00x |
44
+ | 🥈 pysentry-all-sources | 1.024s | 5.71x |
45
+ | pysentry-osv | 1.051s | 5.86x |
46
+ | pysentry-pypa | 1.063s | 5.93x |
47
+ | pip-audit-default | 8.310s | 46.37x |
48
+
49
+ #### Memory Usage Comparison
50
+
51
+ | Tool Configuration | Peak Memory | Relative Performance |
52
+ |---------------------|---------------------|---------------------|
53
+ | 🥇 pysentry-pypi | 8.52 MB | 1.00x |
54
+ | 🥈 pysentry-osv | 10.50 MB | 1.23x |
55
+ | pip-audit-default | 45.38 MB | 5.32x |
56
+ | pysentry-pypa | 65.20 MB | 7.65x |
57
+ | pysentry-all-sources | 106.33 MB | 12.47x |
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.163s | 1.00x |
66
+ | 🥈 pysentry-pypa | 0.651s | 3.99x |
67
+ | pysentry-osv | 0.811s | 4.98x |
68
+ | pysentry-all-sources | 0.980s | 6.01x |
69
+ | pip-audit-default | 7.849s | 48.14x |
70
+
71
+ #### Memory Usage Comparison
72
+
73
+ | Tool Configuration | Peak Memory | Relative Performance |
74
+ |---------------------|---------------------|---------------------|
75
+ | 🥇 pysentry-pypi | 8.43 MB | 1.00x |
76
+ | 🥈 pysentry-osv | 10.28 MB | 1.22x |
77
+ | pip-audit-default | 44.97 MB | 5.33x |
78
+ | pysentry-pypa | 67.79 MB | 8.04x |
79
+ | pysentry-all-sources | 96.55 MB | 11.45x |
80
+
81
+ ### Large_Requirements Dataset - Cold Cache
82
+
83
+ #### Execution Time Comparison
84
+
85
+ | Tool Configuration | Execution Time | Relative Performance |
86
+ |---------------------|---------------------|---------------------|
87
+ | 🥇 pysentry-pypi | 0.642s | 1.00x |
88
+ | 🥈 pysentry-pypa | 1.071s | 1.67x |
89
+ | pysentry-all-sources | 3.248s | 5.06x |
90
+ | pysentry-osv | 3.644s | 5.67x |
91
+ | pip-audit-default | 17.106s | 26.63x |
92
+
93
+ #### Memory Usage Comparison
94
+
95
+ | Tool Configuration | Peak Memory | Relative Performance |
96
+ |---------------------|---------------------|---------------------|
97
+ | 🥇 pysentry-osv | 10.42 MB | 1.00x |
98
+ | 🥈 pysentry-pypi | 13.56 MB | 1.30x |
99
+ | pip-audit-default | 47.45 MB | 4.55x |
100
+ | pysentry-pypa | 64.17 MB | 6.16x |
101
+ | pysentry-all-sources | 101.29 MB | 9.72x |
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.594s | 1.00x |
110
+ | 🥈 pysentry-pypa | 1.133s | 1.91x |
111
+ | pysentry-all-sources | 3.124s | 5.26x |
112
+ | pysentry-osv | 3.124s | 5.26x |
113
+ | pip-audit-default | 15.104s | 25.42x |
114
+
115
+ #### Memory Usage Comparison
116
+
117
+ | Tool Configuration | Peak Memory | Relative Performance |
118
+ |---------------------|---------------------|---------------------|
119
+ | 🥇 pysentry-pypi | 8.40 MB | 1.00x |
120
+ | 🥈 pysentry-osv | 10.40 MB | 1.24x |
121
+ | pip-audit-default | 47.29 MB | 5.63x |
122
+ | pysentry-pypa | 72.68 MB | 8.65x |
123
+ | pysentry-all-sources | 104.25 MB | 12.41x |
124
+
125
+ ## Detailed Analysis
126
+
127
+ ### Pysentry Performance
128
+
129
+ - **Execution Time:** Avg: 1.406s, Min: 0.163s, Max: 3.644s
130
+
131
+ - **Memory Usage:** Avg: 47.42 MB, Min: 8.40 MB, Max: 106.33 MB
132
+
133
+ - **Success Rate:** 100.0% (16/16)
134
+
135
+ ### Pip-Audit Performance
136
+
137
+ - **Execution Time:** Avg: 12.092s, Min: 7.849s, Max: 17.106s
138
+
139
+ - **Memory Usage:** Avg: 46.27 MB, Min: 44.97 MB, Max: 47.45 MB
140
+
141
+ - **Success Rate:** 100.0% (4/4)