NIST URLs¶
netutils.nist
¶
Classes and functions used for building NIST URLs from the os platform values.
OsPlatform
¶
Base class for dynamically generated vendor specific platform data classes.
Source code in netutils/nist.py
get_nist_urls(network_driver, version)
¶
Generate list of possible NIST URLs for the Network Driver, and Version.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
network_driver
|
str
|
Value of device network_driver (Ex: cisco_ios, arista_eos) |
required |
version
|
str
|
OS Software Platform Version |
required |
Returns:
| Type | Description |
|---|---|
List[str]
|
t.List[str]: NIST URLs to search for possible CVE matches |
Examples:
>>> from netutils.nist import get_nist_urls
>>> get_nist_urls('cisco_ios', '15.3')
['https://services.nvd.nist.gov/rest/json/cves/2.0?cpeName=cpe:2.3:o:cisco:ios:15.3:*']
>>>
Source code in netutils/nist.py
get_nist_vendor_platform_urls(vendor, platform, version)
¶
Generate list of possible NIST URLs for the Vendor, OS Platform, and Version.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
vendor
|
str
|
OS Software Platform Vendor/Manufacturer |
required |
platform
|
str
|
OS Software Platform Name |
required |
version
|
str
|
OS Software Platform Version |
required |
Returns:
| Type | Description |
|---|---|
List[str]
|
t.List[str]: NIST URLs to search for possible CVE matches |
Examples:
>>> from netutils.nist import get_nist_vendor_platform_urls
>>> get_nist_vendor_platform_urls('cisco', 'ios', '15.3')
['https://services.nvd.nist.gov/rest/json/cves/2.0?cpeName=cpe:2.3:o:cisco:ios:15.3:*']
>>>