nvdlib


Namenvdlib JSON
Version 0.7.7 PyPI version JSON
download
home_pagehttps://github.com/Vehemont/nvdlib/
SummaryNational Vulnerability Database CPE/CVE API Library for Python
upload_time2024-06-02 16:14:30
maintainerNone
docs_urlNone
authorVehemont
requires_python>3.7.9
licenseMIT
keywords
VCS
bugtrack_url
requirements requests
Travis-CI No Travis.
coveralls test coverage No coveralls.
            
<img src="docs/source/logo.png" width=300 align=left>

## Simple NIST NVD API wrapper library

![License](https://img.shields.io/github/license/bradleeriley/nvdlib) 
[![Written](https://img.shields.io/badge/Python%203.8.3-https%3A%2F%2Fpypi.org%2Fproject%2Fnvdlib%2F-yellowgreen)](https://pypi.org/project/nvdlib/)
[![Documentation Status](https://readthedocs.org/projects/nvdlib/badge/?version=latest)](https://nvdlib.readthedocs.io/en/latest/?badge=latest)

**NVDlib** is a Python library that allows you to interface with the [NIST National Vulnerability Database](https://nvd.nist.gov/) (NVD), pull vulnerabilities (CVEs), and [Common Platform Enumeration](https://nvd.nist.gov/products/cpe) (CPEs) into easily accessible objects.

<br/>

### Features

- Search the NVD for CVEs using all parameters allowed by the NVD API (recently updated to utilize version 2 of the API). Including search criteria such as CVE publish and modification date, keywords, severity, score, or CPE name.
- Search CPE names by keywords, CPE match strings, or modification dates. Then pull the CVE ID's that are relevant to those CPEs. 
- Retrieve details on individual CVEs, their relevant CPE names, and more.
- Built in rate limiting according to [NIST NVD recommendations](https://nvd.nist.gov/developers/start-here). <br> Get an API key (https://nvd.nist.gov/developers/request-an-api-key) to allow for a delay argument to be passed. Otherwise it is 6 seconds between requests by default.

### Install
```bash
$ pip install nvdlib
```


### Demo
```python
>>> import nvdlib
>>> r = nvdlib.searchCVE(cveId='CVE-2021-26855')[0]
>>> print(r.v31severity + ' - ' + str(r.v31score))
CRITICAL - 9.8
>>> print(r.descriptions[0].value)
Microsoft Exchange Server Remote Code Execution Vulnerability This CVE ID is unique from CVE-2021-26412, 
CVE-2021-26854, CVE-2021-26857, CVE-2021-26858, CVE-2021-27065, CVE-2021-27078.
>>> print(r.v31vector)
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H 
```


### Development

Run the tests with

```bash
$ pip install -e '.[dev]'
$ pytest
```

### Documentation

https://nvdlib.com

#### More information

This is my first attempt at creating a library while utilizing all my Python experience from classes to functions.

For more information on the NIST NVD API for CPE and CVEs, see the documentation here: 
https://nvd.nist.gov/General/News/New-NVD-CVE-CPE-API-and-SOAP-Retirement

---

This product uses data from the NVD API but is not endorsed or certified by the NVD.

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/Vehemont/nvdlib/",
    "name": "nvdlib",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">3.7.9",
    "maintainer_email": null,
    "keywords": null,
    "author": "Vehemont",
    "author_email": "brad@nvdlib.com",
    "download_url": null,
    "platform": null,
    "description": "\r\n<img src=\"docs/source/logo.png\" width=300 align=left>\r\n\r\n## Simple NIST NVD API wrapper library\r\n\r\n![License](https://img.shields.io/github/license/bradleeriley/nvdlib) \r\n[![Written](https://img.shields.io/badge/Python%203.8.3-https%3A%2F%2Fpypi.org%2Fproject%2Fnvdlib%2F-yellowgreen)](https://pypi.org/project/nvdlib/)\r\n[![Documentation Status](https://readthedocs.org/projects/nvdlib/badge/?version=latest)](https://nvdlib.readthedocs.io/en/latest/?badge=latest)\r\n\r\n**NVDlib** is a Python library that allows you to interface with the [NIST National Vulnerability Database](https://nvd.nist.gov/) (NVD), pull vulnerabilities (CVEs), and [Common Platform Enumeration](https://nvd.nist.gov/products/cpe) (CPEs) into easily accessible objects.\r\n\r\n<br/>\r\n\r\n### Features\r\n\r\n- Search the NVD for CVEs using all parameters allowed by the NVD API (recently updated to utilize version 2 of the API). Including search criteria such as CVE publish and modification date, keywords, severity, score, or CPE name.\r\n- Search CPE names by keywords, CPE match strings, or modification dates. Then pull the CVE ID's that are relevant to those CPEs. \r\n- Retrieve details on individual CVEs, their relevant CPE names, and more.\r\n- Built in rate limiting according to [NIST NVD recommendations](https://nvd.nist.gov/developers/start-here). <br> Get an API key (https://nvd.nist.gov/developers/request-an-api-key) to allow for a delay argument to be passed. Otherwise it is 6 seconds between requests by default.\r\n\r\n### Install\r\n```bash\r\n$ pip install nvdlib\r\n```\r\n\r\n\r\n### Demo\r\n```python\r\n>>> import nvdlib\r\n>>> r = nvdlib.searchCVE(cveId='CVE-2021-26855')[0]\r\n>>> print(r.v31severity + ' - ' + str(r.v31score))\r\nCRITICAL - 9.8\r\n>>> print(r.descriptions[0].value)\r\nMicrosoft Exchange Server Remote Code Execution Vulnerability This CVE ID is unique from CVE-2021-26412, \r\nCVE-2021-26854, CVE-2021-26857, CVE-2021-26858, CVE-2021-27065, CVE-2021-27078.\r\n>>> print(r.v31vector)\r\nCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H \r\n```\r\n\r\n\r\n### Development\r\n\r\nRun the tests with\r\n\r\n```bash\r\n$ pip install -e '.[dev]'\r\n$ pytest\r\n```\r\n\r\n### Documentation\r\n\r\nhttps://nvdlib.com\r\n\r\n#### More information\r\n\r\nThis is my first attempt at creating a library while utilizing all my Python experience from classes to functions.\r\n\r\nFor more information on the NIST NVD API for CPE and CVEs, see the documentation here: \r\nhttps://nvd.nist.gov/General/News/New-NVD-CVE-CPE-API-and-SOAP-Retirement\r\n\r\n---\r\n\r\nThis product uses data from the NVD API but is not endorsed or certified by the NVD.\r\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "National Vulnerability Database CPE/CVE API Library for Python",
    "version": "0.7.7",
    "project_urls": {
        "Homepage": "https://github.com/Vehemont/nvdlib/"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "a5fee56d88ead664119f280d0618176a7456d4cdf10dbcd050300ce5d6763701",
                "md5": "786b40746fc5ff4e70307c0284adbfc4",
                "sha256": "ed46c60c3b6440aa4627546cac44536cf5142214006d03c7bf7a1a0b7763f42f"
            },
            "downloads": -1,
            "filename": "nvdlib-0.7.7-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "786b40746fc5ff4e70307c0284adbfc4",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">3.7.9",
            "size": 14511,
            "upload_time": "2024-06-02T16:14:30",
            "upload_time_iso_8601": "2024-06-02T16:14:30.437250Z",
            "url": "https://files.pythonhosted.org/packages/a5/fe/e56d88ead664119f280d0618176a7456d4cdf10dbcd050300ce5d6763701/nvdlib-0.7.7-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-06-02 16:14:30",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "Vehemont",
    "github_project": "nvdlib",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "requirements": [
        {
            "name": "requests",
            "specs": [
                [
                    ">=",
                    "2.24.0"
                ]
            ]
        }
    ],
    "lcname": "nvdlib"
}
        
Elapsed time: 0.31969s