Skip to main content

This library provides functionality for fetching and parsing information about Common Vulnerabilities and Exposures (CVE) using the NIST National Vulnerability Database (NVD) RESTful API.

Project description

cveutils

logo

PyPI MIT License

This library provides functionality for fetching and parsing information about Common Vulnerabilities and Exposures (CVE) using the NIST National Vulnerability Database (NVD) RESTful API.

Instalation

pip install cveutils

Usage

To use this library, simply import the CVE class and initialize an instance with a CVE ID as a string.

from cveutils import CVE

cve = CVE('CVE-2021-12345')

CVE Object

The CVE object has the following attributes:

  • ID: The CVE ID
  • info: The full JSON response from the NVD API for the given CVE ID
  • description: The description of the CVE
  • cvss_v2: A dictionary containing the CVSSv2 score and related metrics (if available)
  • cvss_v3: A dictionary containing the CVSSv3 score and related metrics (if available)
  • published_date: The published date of the CVE in ISO format (YYYY-MM-DD)
  • last_modified_date: The last modified date of the CVE in ISO format (YYYY-MM-DD)
  • assigner: The organization that assigned the CVE ID
  • references: A list of references related to the CVE

The cvss_v2 and cvss_v3 attributes are instances of the CVSSDictionary class, which allows access to the dictionary keys as attributes.

Example Usage

from cveutils import CVE

cve = CVE('CVE-2021-12345')

print(cve.ID)
print(cve.description)
print(cve.cvss_v3.baseScore)
print(cve.published_date)
print(cve.last_modified_date)
print(cve.assigner)
print(cve.references)

Output:

CVE-2021-12345
Description of the vulnerability
7.8
2021-01-01
2021-02-01
MITRE
['https://example.com/reference1', 'https://example.com/reference2']

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

cveutils-0.6.tar.gz (3.9 kB view details)

Uploaded Source

Built Distribution

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

cveutils-0.6-py3-none-any.whl (5.0 kB view details)

Uploaded Python 3

File details

Details for the file cveutils-0.6.tar.gz.

File metadata

  • Download URL: cveutils-0.6.tar.gz
  • Upload date:
  • Size: 3.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.10

File hashes

Hashes for cveutils-0.6.tar.gz
Algorithm Hash digest
SHA256 3057f77b38fdefed5798166d7b4630af63adaf2baddd2a0cd0ae78d1d40fc0fe
MD5 ebbe0b6dd1cc2f212046ee225c9f2982
BLAKE2b-256 baba74ba54bab0dd04388ce1061cc73838718509c1f4dce1a1b1e167a1ddced8

See more details on using hashes here.

File details

Details for the file cveutils-0.6-py3-none-any.whl.

File metadata

  • Download URL: cveutils-0.6-py3-none-any.whl
  • Upload date:
  • Size: 5.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.10

File hashes

Hashes for cveutils-0.6-py3-none-any.whl
Algorithm Hash digest
SHA256 b164dfbf974a4f394204d2120533836137ef5c646ba4f4b5012075e516dd7654
MD5 c50aadf6cd5c69db32a9e88975fc8cc7
BLAKE2b-256 9c641724c43440f7937b179b183d11c1925bdfc96366cc9e75ec0070cd4367c3

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