Process
Access CVSS nested structure correctly
- Check for
vuln['CVSS']existence - Use the exact key names:
'NVD','GHSA','RedHat'(case-sensitive) - Access score with
vuln['CVSS'][source]['V3Score'](notv3Scoreorscore)
- Check for
Implement priority-based fallback
For each vulnerability: - Try NVD first - If NVD missing/null → try GHSA - If GHSA missing/null → try RedHat - If all missing → return "N/A"Handle edge cases
- Null or missing CVSS sections
- Missing score keys within a source
- Empty string values (treat as missing)
Validate output
- CVSS score should be numeric or "N/A"
- Never use empty strings as fallback