
python dependency vulnerability scanner, written in Rust.
Pyscan is a highly concurrent vulnerability scanner written in Rust. It automatically traverses your Python project, extracts dependencies across various packaging formats, and cross-references them against the Open Source Vulnerabilities (OSV) database in a single asynchronous batch request.
Pyscan was engineered to solve the performance and memory bottlenecks of traditional Python-based security tools:
pip-audit and safety on medium to large datasets. Pyscan's runtime operates on an $O(\text{vulns})$ time complexity model, execution time scales with the number of vulnerabilities found, not the number of dependencies you have.uv.lock, requirements.txt, pyproject.toml (Poetry, Hatch, PDM, Flit), or dynamically by parsing your raw .py source code.Read the deep-dive in Benchmarks Report.
You can install Pyscan via pipx, pip (compiled Python wheel) or cargo (native Rust binary):
# via pipx (recommended) (Note the "-rs" suffix)
pipx install pyscan-rs
# via pip (Note the "-rs" suffix)
pip install pyscan-rs
# via Cargo
cargo install pyscan
Simply run pyscan in your project's root directory, or point it to a specific source folder:
# Scan the current directory
pyscan
# Scan a specific directory
pyscan -d path/to/src
If multiple source files are present, Pyscan extracts dependencies following this priority chain:
bom.json, spdx.json)uv.lockrequirements.txtpyproject.toml.py)Pyscan will fall back to querying PyPI for the latest version if a dependency is found without a strictly pinned version, though adhering to PEP-508 syntax is highly recommended.
Pyscan requires a Rust toolchain >= v1.70 and leverages asynchronous networking via reqwest and tokio to parallelize OSV queries and maximize throughput. If you're interested in how the parser and scanner are structured, check out theArchitecture Overview.
Pyscan is a highly optimized tool, but it hasn't been battle-hardened across every edge case yet. It does not guarantee your code is 100% safe from all vectors. I highly recommend using a layered security approach alongside tools like Dependabot, pip-audit, or Trivy. PRs and issues are warmly welcomed!
I started this project when I was a broke high school student, and now I'm a broke college student. If Pyscan has saved your CI/CD pipelines some precious time and RAM, consider buying me a coffee: