Skip to main content

Yet another CVE database

Project description

CVEdb2

PyPI version Tests

This project is forked from https://github.com/trailofbits/cvedb

*** Support NVD CVE version 2.0 ***

CVEdb is yet another Python CVE database library and utility. There are lots already available. Why create another? Most existing libraries rely on a third party API like cve.circl.lu, which can and do throttle usage, require registration, and/or demand an internet connection. Some libraries are bloated, including web interfaces for search.

CVEdb Features:

  • Can be used either as a library or a command line utility
  • Simple API
  • Download directly from the National Vulnerability Database
  • Automatically, incrementally update at any time

CVEdb Anti-Features:

  • Does not require many dependencies
  • Does not have a web server
  • Does not require Internet connectivity other than to download new CVEs

Installation

$ pip3 install cvedb2

Command Line Usage

$ cvedb2 --help

Python Examples

from cvedb2.db import CVEdb

with CVEdb.open() as db:
    for cve in db.data():
        print(cve)

By default, the CVEs downloaded from NIST are saved to a sqlite database stored in cvedb.db.DEFAULT_DB_PATH, which is set to ~/.config/cvedb/cvedb.sqlite. This can be customized by passing the db_path argument to CVEdb.open.

The db.data() function returns an instance of a cvedb.feed.Data object, which has numerous methods to query CVEs. For example:

with CVEdb.open() as db:
    for cve in db.data().search("search term"):
        print(cve)

In addition to accepting strings, the data().search(...) function will accept any cvedb.search.SearchQuery object.

Known Issues

The NIST National Vulnerability Database is in the process of transitioning to a new REST API. The datasets on which CVEdb is built are still available, but it is unclear whether they may become deprecated. Also, NIST has started rate limiting downloads, which may affect CVEdb syncing. Therefore, CVEdb ships pre-seeded with a database. Therefore, CVEdb does not require any Internet connectivity after it is installed, other than to download new CVE definitions. Also, the behavior of CVEdb was changed from automatically checking for updates as necessary to now requiring the user explicitly request an update with the new --update argument. Support for the new REST API is being tracked in this GitHub issue.

License and Acknowledgements

CVEdb was created by Trail of Bits. It is licensed under the GNU Lesser General Public License v3.0. Contact us if you're looking for an exception to the terms. 짤 2021, Trail of Bits.

The CVE database shipped with CVEdb is created and maintained by NIST and is released in the public domain.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cvedb2-1.0.1.tar.gz (30.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

cvedb2-1.0.1-py3-none-any.whl (32.1 kB view details)

Uploaded Python 3

File details

Details for the file cvedb2-1.0.1.tar.gz.

File metadata

  • Download URL: cvedb2-1.0.1.tar.gz
  • Upload date:
  • Size: 30.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.5

File hashes

Hashes for cvedb2-1.0.1.tar.gz
Algorithm Hash digest
SHA256 3059e0840eefc8f59e00be52311dbc8b252a8e48b59a00c395ca02b90e17a5c7
MD5 69d2f2a5807eb2260249780a9dd4a104
BLAKE2b-256 ce4819c736d96836781ab5c5c92d86111c8daaf8bc2931f0dcb180713aad38f6

See more details on using hashes here.

File details

Details for the file cvedb2-1.0.1-py3-none-any.whl.

File metadata

  • Download URL: cvedb2-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 32.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.5

File hashes

Hashes for cvedb2-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 e333ff8603d9970785d7e3584c56b1ee50dd3266e0b31906c479aca6a9adc4a7
MD5 c429ad647bb5c279ee37d32f3bdf12b9
BLAKE2b-256 665ecb02215188f679f8a322e22a62e6f9927b9a8f6aa2d5b138e0305c68c3ac

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page