Overview
AegisShield integrates with the National Vulnerability Database (NVD) operated by NIST to provide real-time vulnerability intelligence for your threat models. The NVD integration automatically discovers Common Vulnerabilities and Exposures (CVEs) associated with the technologies used in your application.What NVD Provides
The NVD is the U.S. government repository of standards-based vulnerability management data. It provides:- CVE Records: Comprehensive vulnerability information with unique identifiers
- CVSS Scores: Common Vulnerability Scoring System ratings (0-10 scale)
- CPE Matching: Common Platform Enumeration for precise technology identification
- Temporal Data: Published and modified dates for tracking vulnerability timelines
- Detailed Descriptions: Technical details about each vulnerability
NIST SP 800-53 Compliance
The NVD integration implements several NIST SP 800-53 Rev. 5 security controls:- SI-7: Software, Firmware, and Information Integrity - Vulnerability assessment and monitoring
- RA-5: Vulnerability Scanning - Automated vulnerability identification via NVD
- SC-7: Boundary Protection - External API communication security
- AU-3: Content of Audit Records - API interaction logging
- SI-4: Information System Monitoring - Continuous vulnerability monitoring
Implementation Architecture
Core Components
The NVD integration consists of three main components:- CPE Name Resolution (
fetch_cpe_name) - Maps technology names to standardized CPE identifiers - CVE Search (
search_nvd) - Queries NVD for vulnerabilities matching the CPE - Retry Logic (
retry_with_backoff) - Handles API failures with exponential backoff
Configuration
The integration uses a dataclass-based configuration system:nvd_search.py
Default configuration retrieves the top 10 CVEs sorted by CVSS score and published date.
API Usage
Fetching CPE Names
The first step in NVD integration is resolving a technology to its CPE name:CPE Deprecation Handling
The integration automatically handles deprecated CPEs:nvd_search.py
Searching for Vulnerabilities
Once you have a CPE name, search for associated CVEs:Data Processing
CVE Sorting and Ranking
The integration sorts CVEs by two criteria to prioritize the most critical vulnerabilities:nvd_search.py
Response Format
The integration returns formatted vulnerability data:nvd_search.py
Example Response Format
Example Response Format
Error Handling
Retry with Exponential Backoff
The integration implements resilient API communication:nvd_search.py
Specific Error Cases
Setup and Configuration
Prerequisites
- NVD API Key: Obtain a free API key from NVD API Registration
- Python Dependencies:
Environment Configuration
Obtain API Key
Register for a free NVD API key at nvd.nist.gov/developers
API Key Security
The integration never logs full API keys:nvd_search.py
Rate Limiting
The NVD API has rate limits:- Without API Key: 5 requests per 30 seconds
- With API Key: 50 requests per 30 seconds
- Wait with increasing delays (1s, 2s, 4s)
- Retry up to 3 times (configurable)
- Log detailed error information
Testing
The integration includes comprehensive tests:test_nvd_search.py
Best Practices
Use Specific Versions
Specify exact version numbers when possible for more accurate results
Cache Results
Cache CPE lookups to minimize API calls and improve performance
Monitor Rate Limits
Track API usage to stay within rate limits, especially for bulk operations
Update Regularly
Query NVD periodically to discover newly published vulnerabilities