# Run2 Vulnerability Extraction

> Robust extraction of vulnerability metadata with CVSS v3 priority and v2 fallback.

- Skill: `cxcscmu/run2-vulnerability-extraction` (Agent Skill)
- Install (CLI): `npx get-skill add cxcscmu/run2-vulnerability-extraction`
- Raw SKILL.md: https://api.skillmd.com/api/skills/cxcscmu/run2-vulnerability-extraction/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: cxcscmu (https://skillmd.com/u/cxcscmu)
- Updated: 2026-11-24
- Page: https://skillmd.com/skills/cxcscmu/run2-vulnerability-extraction

---


# Robust Vulnerability Extraction

This skill provides a more resilient method for extracting security data from scanner outputs.

## Robust CVSS Extraction

Prioritize CVSS v3 across multiple sources, falling back to v2 if necessary.

```python
def get_cvss_score(vuln):
    cvss = vuln.get('CVSS', {})
    if not cvss:
        return 'N/A'
    
    # Try V3 Scores first across sources
    for source in ['nvd', 'ghsa', 'redhat']:
        score = cvss.get(source, {}).get('V3Score')
        if score is not None:
            return score
            
    # Fallback to V2 Scores
    for source in ['nvd', 'ghsa', 'redhat']:
        score = cvss.get(source, {}).get('V2Score')
        if score is not None:
            return score
            
    return 'N/A'
```

## Handling Missing Fields

Always provide defaults for optional fields to prevent `None` values in reports.

```python
record = {
    'Package': vuln.get('PkgName', 'N/A'),
    'Version': vuln.get('InstalledVersion', 'N/A'),
    'CVE_ID': vuln.get('VulnerabilityID', 'N/A'),
    'Severity': vuln.get('Severity', 'N/A'),
    'CVSS_Score': get_cvss_score(vuln),
    'Fixed_Version': vuln.get('FixedVersion', 'N/A'),
    'Title': vuln.get('Title', 'N/A'),
    'Url': vuln.get('PrimaryURL', 'N/A')
}
```

