Skip to main content

A simple CVE database written in Python

Project description

cvedb

A local CVE db repository

  1. Clone the cvelistV5 github repo
  2. loop through all CVEs
    1. CVE instance will be created based on CVE json file
      1. If the CVE json file contains metrics entry, create Metrics for the CVE
      2. Otherwise, if --create-metrics argument is given, fetch metrics from NVD and create Metrics for the CVE
  3. store in local database (python pickle)

Installation

Use pip command to install:

pip install py-cvedb

Usage

Command Line

  1. Use cvedb --clone to clone the cvelistV5 repo and init the local data
    1. This action will first check if cvelistV5 repo is cloned.
      1. If not cloned yet, clone the repo first
      2. Then, loop through all CVE JSON file and create CVE instance
    2. The local database will be dumped to a compressed pickle file located in $HOME/.config/cvedb/cvedb.pickle
  2. Use cvedb --update to check if there contains update from cvelistV5 repo
    1. If contains detected
      1. Firstly, get all updated file
      2. Re-create CVE instance and do update or insert to local database
  1. The cvelistV5 repo take several minutes to clone, actual time taken is affected by Internet connection

Search

Use cvedb -s or cvedb --search to search from database

  1. using -y or --year to get CVEs in a specific year
    1. Adding -p or --pattern to filter out CVE records. Give a string start will - for negative match.
      1. If given injection -database will get all records contains injection but not database.
  2. using -i or --id to get CVE with a specific CVE id

Use it in python project

>>> from cvedb import cvedb
>>>
>>> cvedb = cvedb.init_db()
>>> type(cvedb) # <class 'cvedb.cvedb.CVEdb'>

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

py-cvedb-0.0.5.post2.tar.gz (10.7 kB view details)

Uploaded Source

Built Distribution

py_cvedb-0.0.5.post2-py3-none-any.whl (12.5 kB view details)

Uploaded Python 3

File details

Details for the file py-cvedb-0.0.5.post2.tar.gz.

File metadata

  • Download URL: py-cvedb-0.0.5.post2.tar.gz
  • Upload date:
  • Size: 10.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.7

File hashes

Hashes for py-cvedb-0.0.5.post2.tar.gz
Algorithm Hash digest
SHA256 fa5a248d02e629e1a9730b6920eca6912b517703a98b16a126e2e6b3d4416e75
MD5 bc7aceb6a157ac6537161bcbdf0f5863
BLAKE2b-256 601f36139bb1d9552c37e4256a607ff3954030e3a0ce9dfc82004ad8dad60041

See more details on using hashes here.

File details

Details for the file py_cvedb-0.0.5.post2-py3-none-any.whl.

File metadata

File hashes

Hashes for py_cvedb-0.0.5.post2-py3-none-any.whl
Algorithm Hash digest
SHA256 f6fbfea74ac733b819fce004e4fb32b914e36dd5ea978f54ddcac7f9fe91011e
MD5 d2ef4f8372fcc76982607734811f78c1
BLAKE2b-256 9708abaca6b45ac9a9fe12c0936ae4e1bb07e52ad4359e0cc8bd1c8a669c2ef9

See more details on using hashes here.

Supported by

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