NIST 800-30 Risk Management for Netbox
Project description
Netbox NBRisk
NetBox plugin inspired by NIST 800-30 Risk Management.
Compatibility
See the compatibility matrix for supported NetBox versions.
Installation
Add to local_requirements.txt to ensure automatic re-installation during NetBox upgrades:
echo "echo "NbRisk==^45.6.0" >> local_requirements.txt
Install, migrate, and run the initial data syncs:
source /opt/netbox/venv/bin/activate
pip install NbRisk==^45.6.0
cd /opt/netbox/netbox
python3 manage.py migrate nb_risk
python3 manage.py sync_kev # sync CISA Known Exploited Vulnerabilities catalog
python3 manage.py sync_epss # sync EPSS exploit prediction scores
sudo systemctl restart netbox netbox-rq
Enabling the Plugin
Add to configuration.py:
PLUGINS = ["nb_risk"]
Configuration
All configuration goes in PLUGINS_CONFIG in configuration.py:
PLUGINS_CONFIG = {
'nb_risk': {
# NVD API key — strongly recommended to avoid rate limiting
# 5 req/30s without a key, 50 req/30s with one
# Get a free key at https://nvd.nist.gov/developers/request-an-api-key
'nvd_api_key': 'your-api-key-here',
# Additional models to support vulnerability assignment beyond the defaults
# Defaults: dcim.device, virtualization.virtualmachine, tenancy.tenant, dcim.site
'additional_assets': [
'dcim.platform',
],
},
}
NVD API Key
The CVE search feature queries the NIST NVD API. Without an API key requests are rate-limited to 5 per 30 seconds; with a key the limit is 50 per 30 seconds. Get a free key at nvd.nist.gov/developers/request-an-api-key.
Proxy Settings
The plugin uses NetBox's built-in HTTP_PROXIES setting from configuration.py for all external API requests (NVD, CISA KEV, EPSS) — no separate proxy config needed:
HTTP_PROXIES = {
'http': 'http://proxy.example.com:8080',
'https': 'http://proxy.example.com:8080',
}
Device CVE Tab
A CVEs tab appears on every Device detail page. It queries NVD for CVEs matching the device's running software and cross-references results against the CISA KEV catalog and EPSS scores.
Requirements
- The
software_versioncustom field must be set on the device (created automatically on first install, or manually viamanage.py shell) - A CPE Mapping must exist for the device's platform or device type (see below)
CVE result columns
| Column | Source | Description |
|---|---|---|
| CVE ID | NVD | Links to nvd.nist.gov |
| KEV | CISA | Red badge if actively exploited in the wild |
| EPSS | FIRST.org | Probability of exploitation in next 30 days |
| CVSS | NVD | Version and base score with colour coding |
| Attack Vector | NVD | Network, Adjacent, Local, Physical |
| Import | — | One-click import into Vulnerabilities |
CVSS score colours
| Score | Severity |
|---|---|
| 9.0+ | 🔴 Critical |
| 7.0–8.9 | 🟡 High |
| 4.0–6.9 | 🔵 Medium |
| Below 4.0 | ⚪ Low |
EPSS score colours
| Score | Meaning |
|---|---|
| ≥ 0.5 | 🔴 High exploitation probability |
| ≥ 0.1 | 🟡 Moderate exploitation probability |
| ≥ 0.01 | 🔵 Low exploitation probability |
| < 0.01 | ⚪ Very low exploitation probability |
CPE Mappings
CPE Mappings are the key to accurate, vendor-agnostic CVE matching. They map a NetBox Platform or Device Type to a verified NVD CPE 2.3 string. Without a mapping, CVE lookups cannot be performed reliably.
CPE Lookup Assistant
Go to Risk Assessment → CVE Integration → CPE Mappings → Lookup to search the NVD CPE dictionary by keyword and create mappings with one click.
Common platform mappings
| Platform | CPE Vendor | CPE Product | Part | Target SW |
|---|---|---|---|---|
| NX-OS | cisco | nx-os | o | nexus_9000_series |
| IOS-XE | cisco | ios_xe | o | |
| IOS | cisco | ios | o | |
| Junos | juniper | junos | o | |
| EOS | arista | eos | o | |
| PAN-OS | paloaltonetworks | pan-os | o | |
| FortiOS | fortinet | fortios | o | |
| Ubuntu 22.04 | canonical | ubuntu_linux | o | |
| Windows Server 2022 | microsoft | windows_server_2022 | o |
The Target SW field (8th CPE component) scopes results to a specific platform family. For example nexus_9000_series returns only CVEs specifically affecting Nexus 9000 switches rather than all NX-OS CVEs.
CISA KEV Integration
The CISA Known Exploited Vulnerabilities catalog lists CVEs actively exploited in the wild. The plugin cross-references this automatically.
Sync command
python3 manage.py sync_kev # sync all Vulnerability records
python3 manage.py sync_kev --dry-run # preview without changes
Run this daily — the KEV catalog is updated by CISA as new exploits are confirmed.
EPSS Integration
FIRST.org EPSS (Exploit Prediction Scoring System) provides a daily-updated probability score (0.0–1.0) that a CVE will be exploited in the next 30 days. No API key required.
Sync command
python3 manage.py sync_epss # sync all Vulnerability records
python3 manage.py sync_epss --dry-run # preview scores without changes
EPSS scores are also fetched in real-time for CVE Search results and the Device CVE tab, with 24-hour per-CVE Redis caching.
Prioritization framework
Combining all three signals:
| Signal | Meaning |
|---|---|
| KEV | Already being exploited — remediate immediately |
| High EPSS (≥ 0.5) | High probability of exploitation soon |
| High CVSS (≥ 9.0) | Critical severity |
| All three | Highest priority — act now |
Management Commands
| Command | Description |
|---|---|
manage.py sync_kev |
Sync CISA KEV catalog against Vulnerability records |
manage.py sync_kev --dry-run |
Preview KEV matches without changes |
manage.py sync_epss |
Sync EPSS scores for all Vulnerability records |
manage.py sync_epss --dry-run |
Preview EPSS scores without changes |
Development
A Docker Compose development environment is included. It spins up NetBox 4.5.9 with the plugin installed in editable mode alongside PostgreSQL 15 and Redis 7.
make cbuild # build containers
make debug # start in foreground
make start # start in background
make stop # stop
make destroy # destroy including database
make nbshell # open NetBox shell
make adduser # create superuser
make migrations # generate migrations after model changes
make test # run tests
Screenshots
Plugin Menu
Vulnerability View
Affected Assets
Device Vulnerabilities
Threat Event View
Risks View
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file nbrisk-45.6.1.tar.gz.
File metadata
- Download URL: nbrisk-45.6.1.tar.gz
- Upload date:
- Size: 50.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.8.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f7d56c3f45655dd40e67cfae01b08affa428f4e82842beb07db17eb0c0ca1618
|
|
| MD5 |
4cfb064192c415c438a6a4a88271e52e
|
|
| BLAKE2b-256 |
5ea37a2903fe67bb253c863074d21b1138a95382959d3763ed8ae2e14723ab35
|
File details
Details for the file nbrisk-45.6.1-py3-none-any.whl.
File metadata
- Download URL: nbrisk-45.6.1-py3-none-any.whl
- Upload date:
- Size: 75.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.8.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7e431b56b5d582de8fad2d494f3de08645a014ee25feec92b581ef1ddb736c9f
|
|
| MD5 |
900eb33828d91428ee43852494751a55
|
|
| BLAKE2b-256 |
0f6ccd8c2b6c84bfbe20d1924428934433424b246c062da9650ab6bc0fe60c20
|