PySentry

raw JSON →
0.4.5 verified Sat May 09 auth: no python

PySentry is a security vulnerability auditing tool for Python packages. It scans dependencies from lock files (uv.lock, Pipfile.lock, poetry.lock, pylock.toml) and requirements files, cross-referencing against OSV and PyPA vulnerability databases. Current version 0.4.5, released monthly. Requires Python >=3.9.

pip install pysentry-rs
error ModuleNotFoundError: No module named 'pysentry_rs'
cause Package name pysentry-rs installs module as 'pysentry', not 'pysentry_rs'.
fix
pip install pysentry-rs, then import pysentry
error ImportError: cannot import name 'PySentry' from 'pysentry'
cause Wrong import path; PySentry is not a class but a module-level scanner function in older versions.
fix
Check documentation for correct API; in v0.4.x use 'from pysentry import scan' or 'from pysentry import PySentry' depending on version.
breaking v0.4.0 introduced remote notifications system; config file format changed. Old .pysentry.toml may not be compatible.
fix Review .pysentry.toml for [notifications] section; add enabled = true/ false as needed.
gotcha Import as 'pysentry', not 'pysentry_rs'. The PyPI name is pysentry-rs but the module is pysentry.
fix Use 'from pysentry import PySentry' or 'import pysentry'.
deprecated v0.3.x configuration in pyproject.toml under [tool.pysentry] is superseded by .pysentry.toml with higher priority.
fix Migrate settings to .pysentry.toml if you need consistent priority.

Basic usage: initialize PySentry and scan dependencies for vulnerabilities.

from pysentry import PySentry

# Initialize PySentry (requires no auth for local scans)
sentry = PySentry()

# Scan current directory dependencies
vulns = sentry.scan('.')
for v in vulns:
    print(f"{v.id}: {v.package} - {v.severity}")