CVE Vulnerability Scanner
A Python tool that scans software dependencies for known vulnerabilities using NIST's National Vulnerability Database (NVD).
Features
- 🔍 Scan software libraries for known vulnerabilities
- 📝 Generate detailed vulnerability reports in markdown format
- 🚀 Fast scanning with local caching support
- 🔑 Uses official NVD API with authentication for better rate limits
- 📊 Support CSV input format for batch processing
- 🔄 Cache results to reduce API calls
Installation
# Using pip
pip install cve-vulnerability-scanner
# From source
git clone https://github.com/changyy/py-cve-vulnerability-scanner.git
cd py-cve-vulnerability-scanner
pip install -e .
Usage
Basic Usage
# Set your NVD API key
export NVD_API_KEY='your-api-key-here'
# Run the scanner
cve-vulnerability-scanner packages.csv -o report.md
Input CSV Format
Create a CSV file (packages.csv) with your dependencies:
library_name,version
busybox,1.31.1
libiconv,1.13.1
Command Line Options
cve-vulnerability-scanner --help
Options:
-i, --input FILE Input CSV file containing libraries [default: packages.csv]
-o, --output FILE Output report file [default: report.md]
--no-cache Disable caching
--cache-dir DIR Specify cache directory [default: ./cache]
--verbose Enable verbose output
-h, --help Show this help message
-v, --version Show program version
Sample Output
The tool will generate a markdown report like this:
# Vulnerability Scan Report
Generated at: 2024-03-08 10:00:00
## Summary
- Total libraries scanned: 2
- Libraries with vulnerabilities: 1
- Total vulnerabilities found: 30
## Details
### Busybox (1.31.1)
Found 30 vulnerabilities:
1. CVE-2022-28391 (CVSS: 5.5)
- Description: Integer overflow in Busybox wget applet...
- Published: 2022-05-20
- References: [Link]
### libiconv (1.13.1)
No known vulnerabilities found.
Authentication
Get your NVD API key from: https://nvd.nist.gov/developers/request-an-api-key
The API key can be provided in three ways (in order of precedence):
- Environment variable:
NVD_API_KEY - Config file:
~/.config/cve-scanner/config.ini - Command line argument:
--api-key
Development
Setup Development Environment
# Create virtual environment
python -m venv venv
source venv/bin/activate # Linux/Mac
# or
.\venv\Scripts\activate # Windows
# Install dependencies
pip install -e ".[dev]"
Running Tests
pytest tests/
Contributing
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
License
This project is licensed under the MIT License - see the LICENSE file for details.
Acknowledgments
- NIST National Vulnerability Database (NVD) for providing the vulnerability data
- All contributors who help improve this tool
Metadata
Release files for cve-vulnerability-scanner 1.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| cve_vulnerability_scanner-1.0.1.tar.gz | 12.1 kB | With provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| cve_vulnerability_scanner-1.0.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 21.2 kB
Release files / cve_vulnerability_scanner-1.0.1.tar.gz
| Download URL | cve_vulnerability_scanner-1.0.1.tar.gz |
|---|---|
| Size | 12.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
5e328c42c52b20ff7fda33cf4be5ad33d64940408cc32b8261e084578a8f115d
|
|
BLAKE2b-256 checksum How to use checksums |
6054e21cb68b94208599a50a0ee8ad850a08a930d92cf2430dcdd9c794ff2abd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.12.9
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jun 4, 2025.
Transparency logRelease files / cve_vulnerability_scanner-1.0.1-py3-none-any.whl
| Download URL | cve_vulnerability_scanner-1.0.1-py3-none-any.whl |
|---|---|
| Size | 9.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
eff090a7451fedacc6bbe084a414f2eb053e4b19b8b148c9e9e4818dc94a4d87
|
|
BLAKE2b-256 checksum How to use checksums |
a72b38c3227de0b0ae6e457fe613c01bb6682d882b1c389ce801895b47c39e1d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.12.9
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jun 4, 2025.
Transparency logSecurity for cve-vulnerability-scanner 1.0.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for cve_vulnerability_scanner-1.0.1.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jun 4, 2025.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.