[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7C12SHCK4WAJC9MYAY8X9VE":3,"skill-same:01M7C12SHCK4WAJC9MYAY8X9VE":45},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":24,"commitSha":25,"skillDirectory":26,"forksCount":27,"repositoryHtmlUrl":28,"repositoryHomepageUrl":6,"ownerHtmlUrl":29,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":30,"install":31,"resources":44},"01M7C12SHCK4WAJC9MYAY8X9VE","cvss-score-extraction",null,"Extract CVSS (Common Vulnerability Scoring System) scores from vulnerability data sources with proper fallback handling. This skill covers understanding CVSS v3, handling multiple score sources (NVD, GHSA, RedHat), implementing source priority logic, and dealing with missing scores in security reporting.","linyouxue\u002Fskill-repair-benchmark","linyouxue","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F216151464?v=4","01M7BJEVCXKD74KH6FG9CBVSQB","林宥学","01M7BJEVE02NP217V93BKZFC0J",0,"Apache-2.0","https:\u002F\u002Fgithub.com\u002Flinyouxue\u002Fskill-repair-benchmark\u002Fblob\u002Fmain\u002Fevaluation\u002Fresults\u002FSkillOpt-adapted-gpt52-n3L4R2-v25\u002Ftasks\u002Fsoftware-dependency-audit\u002Frepaired_skill\u002Fcvss-score-extraction\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: cvss-score-extraction\ndescription: Extract CVSS (Common Vulnerability Scoring System) scores from vulnerability data sources with proper fallback handling. This skill covers understanding CVSS v3, handling multiple score sources (NVD, GHSA, RedHat), implementing source priority logic, and dealing with missing scores in security reporting.\n---\n\n# CVSS Score Extraction from Vulnerability Data\n\nThis skill provides guidance on extracting CVSS scores from vulnerability data—a critical component of security report generation.\n\n## Overview\n\nCVSS (Common Vulnerability Scoring System) provides a standardized way to assess the severity of security vulnerabilities. When generating security reports, extracting the correct CVSS score from multiple data sources is essential for accurate risk assessment.\n\n## What is CVSS?\n\n### CVSS Scoring System\n\nCVSS assigns a numerical score (0.0-10.0) representing vulnerability severity:\n\n| Score Range | Severity Level | Description |\n|-------------|----------------|-------------|\n| 0.0 | None | No impact |\n| 0.1-3.9 | **Low** | Minimal impact |\n| 4.0-6.9 | **Medium** | Moderate impact |\n| 7.0-8.9 | **High** | Significant impact |\n| 9.0-10.0 | **Critical** | Severe impact |\n\n### CVSS Versions\n\n- **CVSS v2**: Legacy scoring system (0-10 scale)\n- **CVSS v3**: Current standard with refined metrics\n- **CVSS v3.1**: Minor refinement of v3\n\n**Best Practice**: Prefer CVSS v3\u002Fv3.1 scores when available.\n\n## Multiple Vulnerability Data Sources\n\nVulnerability scanners often aggregate data from multiple sources, each providing their own CVSS assessment:\n\n### Common Sources\n\n1. **NVD (National Vulnerability Database)**\n   - Maintained by NIST (U.S. government)\n   - Most authoritative source\n   - **Priority: Highest**\n\n2. **GHSA (GitHub Security Advisory)**\n   - Community-driven vulnerability database\n   - Strong for open-source packages\n   - **Priority: Medium**\n\n3. **RedHat Security Data**\n   - RedHat's security team assessments\n   - Focused on enterprise Linux ecosystem\n   - **Priority: Lower**\n\n### Why Multiple Sources?\n\n- Not all sources have scores for every CVE\n- Scores may differ based on interpretation\n- Need fallback logic when primary source unavailable\n\n## Source Priority Strategy\n\nWhen multiple sources provide scores, use a **priority cascade**:\n\n```\nNVD → GHSA → RedHat → N\u002FA\n```\n\n**Rationale**: NVD is the most comprehensive and authoritative, followed by community sources, then vendor-specific databases.\n\n## Data Structure\n\nTrivy (and similar tools) return CVSS data in nested format:\n\n```json\n{\n  \"VulnerabilityID\": \"CVE-2021-44906\",\n  \"PkgName\": \"minimist\",\n  \"Severity\": \"CRITICAL\",\n  \"CVSS\": {\n    \"nvd\": {\n      \"V2Vector\": \"AV:N\u002FAC:L\u002FAu:N\u002FC:P\u002FI:P\u002FA:P\",\n      \"V3Vector\": \"CVSS:3.1\u002FAV:N\u002FAC:L\u002FPR:N\u002FUI:N\u002FS:U\u002FC:H\u002FI:H\u002FA:H\",\n      \"V2Score\": 7.5,\n      \"V3Score\": 9.8\n    },\n    \"ghsa\": {\n      \"V3Vector\": \"CVSS:3.1\u002FAV:N\u002FAC:L\u002FPR:N\u002FUI:N\u002FS:U\u002FC:H\u002FI:H\u002FA:H\",\n      \"V3Score\": 9.8\n    }\n  }\n}\n```\n\n## Python Implementation\n\n### Basic Score Extraction\n\n```python\ndef _validated_v3_score(value):\n    \"\"\"Return a normalized finite CVSS v3\u002Fv3.1 score, or None.\"\"\"\n    import math\n\n    if isinstance(value, bool):\n        return None\n    if isinstance(value, (int, float)):\n        candidate = float(value)\n    elif isinstance(value, str):\n        text = value.strip()\n        if not text:\n            return None\n        try:\n            candidate = float(text)\n        except (TypeError, ValueError):\n            return None\n    else:\n        return None\n\n    if not math.isfinite(candidate) or not 0.0 \u003C= candidate \u003C= 10.0:\n        return None\n    return candidate\n\n\ndef get_cvss_score(vuln_data):\n    \"\"\"Extract the first valid CVSS v3\u002Fv3.1 score in NVD, GHSA, RedHat order.\"\"\"\n    if not isinstance(vuln_data, dict):\n        return 'N\u002FA'\n    cvss = vuln_data.get('CVSS')\n    if not isinstance(cvss, dict):\n        return 'N\u002FA'\n\n    for source in ['nvd', 'ghsa', 'redhat']:\n        provider = cvss.get(source)\n        if not isinstance(provider, dict):\n            continue\n        score = _validated_v3_score(provider.get('V3Score'))\n        if score is not None:\n            return score\n    return 'N\u002FA'\n```\n\n### Enhanced Version with V2 Fallback\n\n```python\ndef get_cvss_score_with_fallback(vuln_data):\n    \"\"\"\n    Extract CVSS score with v2 fallback.\n    Priority: NVD v3 > GHSA v3 > RedHat v3 > NVD v2 > N\u002FA\n    \"\"\"\n    cvss = vuln_data.get('CVSS', {})\n    \n    # Try v3 scores first\n    for source in ['nvd', 'ghsa', 'redhat']:\n        if source in cvss:\n            v3_score = cvss[source].get('V3Score')\n            if v3_score is not None:\n                return {'score': v3_score, 'version': 'v3', 'source': source}\n    \n    # Fallback to v2 if v3 not available\n    if 'nvd' in cvss:\n        v2_score = cvss['nvd'].get('V2Score')\n        if v2_score is not None:\n            return {'score': v2_score, 'version': 'v2', 'source': 'nvd'}\n    \n    return {'score': 'N\u002FA', 'version': None, 'source': None}\n```\n\n## Usage in Report Generation\n\n### Integrating CVSS Extraction\n\n```python\nimport json\n\ndef parse_vulnerabilities(json_file):\n    \"\"\"Parse Trivy JSON and extract vulnerabilities with CVSS scores.\"\"\"\n    with open(json_file, 'r') as f:\n        data = json.load(f)\n    \n    vulnerabilities = []\n    \n    if 'Results' in data:\n        for result in data['Results']:\n            for vuln in result.get('Vulnerabilities', []):\n                # Extract basic fields\n                record = {\n                    'Package': vuln.get('PkgName'),\n                    'Version': vuln.get('InstalledVersion'),\n                    'CVE_ID': vuln.get('VulnerabilityID'),\n                    'Severity': vuln.get('Severity'),\n                    'CVSS_Score': get_cvss_score(vuln),  # Use extraction function\n                    'Fixed_Version': vuln.get('FixedVersion', 'N\u002FA'),\n                    'Title': vuln.get('Title', 'No description')\n                }\n                vulnerabilities.append(record)\n    \n    return vulnerabilities\n```\n\n## Common Patterns\n\n### Pattern 1: Numeric Score or 'N\u002FA'\n\n```python\ncvss_score = get_cvss_score(vuln)\n# Returns: 9.8 or 'N\u002FA'\n```\n\n**Use case**: Simple reports where missing scores are acceptable\n\n### Pattern 2: Score with Metadata\n\n```python\ncvss_info = get_cvss_score_with_fallback(vuln)\n# Returns: {'score': 9.8, 'version': 'v3', 'source': 'nvd'}\n```\n\n**Use case**: Detailed reports showing data provenance\n\n### Pattern 3: Filtering by Score Threshold\n\n```python\ndef is_high_severity(vuln_data, threshold=7.0):\n    \"\"\"Check if vulnerability meets severity threshold.\"\"\"\n    score = get_cvss_score(vuln_data)\n    if score == 'N\u002FA':\n        # If no score, use severity label\n        return vuln_data.get('Severity') in ['HIGH', 'CRITICAL']\n    return score >= threshold\n```\n\n## Error Handling\n\n### Handling Missing Data\n\n```python\ndef safe_get_cvss_score(vuln_data):\n    \"\"\"Safely extract CVSS score with comprehensive error handling.\"\"\"\n    try:\n        cvss = vuln_data.get('CVSS', {})\n        \n        # Validate cvss is a dictionary\n        if not isinstance(cvss, dict):\n            return 'N\u002FA'\n        \n        for source in ['nvd', 'ghsa', 'redhat']:\n            if source in cvss and isinstance(cvss[source], dict):\n                score = cvss[source].get('V3Score')\n                # Validate score is numeric\n                if score is not None and isinstance(score, (int, float)):\n                    return score\n        \n        return 'N\u002FA'\n    except (AttributeError, TypeError):\n        return 'N\u002FA'\n```\n\n## Best Practices\n\n1. **Always provide fallback**: Use 'N\u002FA' when scores unavailable\n2. **Prefer newer versions**: V3 > V2\n3. **Respect source hierarchy**: NVD is most authoritative\n4. **Validate data types**: Ensure scores are numeric before using\n5. **Document source**: In detailed reports, note which source provided the score\n\n## Complete Example\n\n```python\nimport json\n\ndef get_cvss_score(vuln_data):\n    \"\"\"Extract CVSS v3 score with source priority.\"\"\"\n    cvss = vuln_data.get('CVSS', {})\n    \n    for source in ['nvd', 'ghsa', 'redhat']:\n        if source in cvss:\n            score = cvss[source].get('V3Score')\n            if score is not None:\n                return score\n    \n    return 'N\u002FA'\n\ndef generate_report_with_cvss(json_file):\n    \"\"\"Generate vulnerability report with CVSS scores.\"\"\"\n    with open(json_file, 'r') as f:\n        data = json.load(f)\n    \n    print(f\"{'Package':\u003C20} {'CVE ID':\u003C20} {'CVSS':\u003C8} {'Severity':\u003C10}\")\n    print(\"-\" * 60)\n    \n    if 'Results' in data:\n        for result in data['Results']:\n            for vuln in result.get('Vulnerabilities', []):\n                pkg = vuln.get('PkgName', 'Unknown')\n                cve = vuln.get('VulnerabilityID', 'N\u002FA')\n                cvss = get_cvss_score(vuln)\n                severity = vuln.get('Severity', 'UNKNOWN')\n                \n                print(f\"{pkg:\u003C20} {cve:\u003C20} {cvss:\u003C8} {severity:\u003C10}\")\n\n# Usage\ngenerate_report_with_cvss('trivy_report.json')\n```\n\n## Dependencies\n\n### Python Modules\n- `json` (standard library)\n\n### Data Format\n- Expects Trivy JSON format or similar structured vulnerability data\n\n## References\n\n- [CVSS v3.1 Specification](https:\u002F\u002Fwww.first.org\u002Fcvss\u002Fv3.1\u002Fspecification-document)\n- [NVD CVSS Calculator](https:\u002F\u002Fnvd.nist.gov\u002Fvuln-metrics\u002Fcvss\u002Fv3-calculator)\n- [GitHub Security Advisories](https:\u002F\u002Fgithub.com\u002Fadvisories)\n\n\n\n## Strict CVSS Validation and External Enrichment\n\nApply validation independently to every retained vulnerability finding after matching the exact vulnerability ID. A usable score must come from an explicitly identified CVSS v3 or v3.1 score field, be numeric or a numeric string, be finite, and be within the inclusive range `0.0` through `10.0`. Normalize equivalent representations such as `\"9.80\"`, `9.8`, and `9.80` to the numeric value `9.8`; the report's `CVSS_Score` field must contain only that number, without source, version, vector, or severity metadata.\n\nReject booleans, empty strings, `NaN`, positive or negative infinity, negative or greater-than-10 values, CVSS vectors such as `CVSS:3.1\u002F...`, and severity labels such as `HIGH` or `CRITICAL`. A vector or severity label must never be parsed or converted into a score. Do not treat CVSS v2 as a v3\u002Fv3.1 score, and do not copy a value across vulnerability IDs, aliases, packages, or titles without an authoritative exact-ID relationship.\n\nIf the provider object, score field, version, exact-ID match, or validated value is unavailable, preserve the otherwise qualifying finding and write `N\u002FA` for its CVSS score. Do not infer, recompute, average, or substitute a cross-ID value. External NVD, GHSA, or RedHat enrichment is optional and must use bounded requests with a finite timeout and a small fixed retry\u002Fattempt limit; a timeout, error, rate limit, malformed response, or exhausted attempt limit resolves to `N\u002FA` and must not block report generation or fabricate a score. Fetch only the exact requested identifier and validate the returned provider object with the same rules before using it.\n","# CVSS Score Extraction from Vulnerability Data\n\nThis skill provides guidance on extracting CVSS scores from vulnerability data—a critical component of security report generation.\n\n## Overview\n\nCVSS (Common Vulnerability Scoring System) provides a standardized way to assess the severity of security vulnerabilities. When generating security reports, extracting the correct CVSS score from multiple data sources is essential for accurate risk assessment.\n\n## What is CVSS?\n\n### CVSS Scoring System\n\nCVSS assigns a numerical score (0.0-10.0) representing vulnerability severity:\n\n| Score Range | Severity Level | Description |\n|-------------|----------------|-------------|\n| 0.0 | None | No impact |\n| 0.1-3.9 | **Low** | Minimal impact |\n| 4.0-6.9 | **Medium** | Moderate impact |\n| 7.0-8.9 | **High** | Significant impact |\n| 9.0-10.0 | **Critical** | Severe impact |\n\n### CVSS Versions\n\n- **CVSS v2**: Legacy scoring system (0-10 scale)\n- **CVSS v3**: Current standard with refined metrics\n- **CVSS v3.1**: Minor refinement of v3\n\n**Best Practice**: Prefer CVSS v3\u002Fv3.1 scores when available.\n\n## Multiple Vulnerability Data Sources\n\nVulnerability scanners often aggregate data from multiple sources, each providing their own CVSS assessment:\n\n### Common Sources\n\n1. **NVD (National Vulnerability Database)**\n   - Maintained by NIST (U.S. government)\n   - Most authoritative source\n   - **Priority: Highest**\n\n2. **GHSA (GitHub Security Advisory)**\n   - Community-driven vulnerability database\n   - Strong for open-source packages\n   - **Priority: Medium**\n\n3. **RedHat Security Data**\n   - RedHat's security team assessments\n   - Focused on enterprise Linux ecosystem\n   - **Priority: Lower**\n\n### Why Multiple Sources?\n\n- Not all sources have scores for every CVE\n- Scores may differ based on interpretation\n- Need fallback logic when primary source unavailable\n\n## Source Priority Strategy\n\nWhen multiple sources provide scores, use a **priority cascade**:\n\n```\nNVD → GHSA → RedHat → N\u002FA\n```\n\n**Rationale**: NVD is the most comprehensive and authoritative, followed by community sources, then vendor-specific databases.\n\n## Data Structure\n\nTrivy (and similar tools) return CVSS data in nested format:\n\n```json\n{\n  \"VulnerabilityID\": \"CVE-2021-44906\",\n  \"PkgName\": \"minimist\",\n  \"Severity\": \"CRITICAL\",\n  \"CVSS\": {\n    \"nvd\": {\n      \"V2Vector\": \"AV:N\u002FAC:L\u002FAu:N\u002FC:P\u002FI:P\u002FA:P\",\n      \"V3Vector\": \"CVSS:3.1\u002FAV:N\u002FAC:L\u002FPR:N\u002FUI:N\u002FS:U\u002FC:H\u002FI:H\u002FA:H\",\n      \"V2Score\": 7.5,\n      \"V3Score\": 9.8\n    },\n    \"ghsa\": {\n      \"V3Vector\": \"CVSS:3.1\u002FAV:N\u002FAC:L\u002FPR:N\u002FUI:N\u002FS:U\u002FC:H\u002FI:H\u002FA:H\",\n      \"V3Score\": 9.8\n    }\n  }\n}\n```\n\n## Python Implementation\n\n### Basic Score Extraction\n\n```python\ndef _validated_v3_score(value):\n    \"\"\"Return a normalized finite CVSS v3\u002Fv3.1 score, or None.\"\"\"\n    import math\n\n    if isinstance(value, bool):\n        return None\n    if isinstance(value, (int, float)):\n        candidate = float(value)\n    elif isinstance(value, str):\n        text = value.strip()\n        if not text:\n            return None\n        try:\n            candidate = float(text)\n        except (TypeError, ValueError):\n            return None\n    else:\n        return None\n\n    if not math.isfinite(candidate) or not 0.0 \u003C= candidate \u003C= 10.0:\n        return None\n    return candidate\n\n\ndef get_cvss_score(vuln_data):\n    \"\"\"Extract the first valid CVSS v3\u002Fv3.1 score in NVD, GHSA, RedHat order.\"\"\"\n    if not isinstance(vuln_data, dict):\n        return 'N\u002FA'\n    cvss = vuln_data.get('CVSS')\n    if not isinstance(cvss, dict):\n        return 'N\u002FA'\n\n    for source in ['nvd', 'ghsa', 'redhat']:\n        provider = cvss.get(source)\n        if not isinstance(provider, dict):\n            continue\n        score = _validated_v3_score(provider.get('V3Score'))\n        if score is not None:\n            return score\n    return 'N\u002FA'\n```\n\n### Enhanced Version with V2 Fallback\n\n```python\ndef get_cvss_score_with_fallback(vuln_data):\n    \"\"\"\n    Extract CVSS score with v2 fallback.\n    Priority: NVD v3 > GHSA v3 > RedHat v3 > NVD v2 > N\u002FA\n    \"\"\"\n    cvss = vuln_data.get('CVSS', {})\n    \n    # Try v3 scores first\n    for source in ['nvd', 'ghsa', 'redhat']:\n        if source in cvss:\n            v3_score = cvss[source].get('V3Score')\n            if v3_score is not None:\n                return {'score': v3_score, 'version': 'v3', 'source': source}\n    \n    # Fallback to v2 if v3 not available\n    if 'nvd' in cvss:\n        v2_score = cvss['nvd'].get('V2Score')\n        if v2_score is not None:\n            return {'score': v2_score, 'version': 'v2', 'source': 'nvd'}\n    \n    return {'score': 'N\u002FA', 'version': None, 'source': None}\n```\n\n## Usage in Report Generation\n\n### Integrating CVSS Extraction\n\n```python\nimport json\n\ndef parse_vulnerabilities(json_file):\n    \"\"\"Parse Trivy JSON and extract vulnerabilities with CVSS scores.\"\"\"\n    with open(json_file, 'r') as f:\n        data = json.load(f)\n    \n    vulnerabilities = []\n    \n    if 'Results' in data:\n        for result in data['Results']:\n            for vuln in result.get('Vulnerabilities', []):\n                # Extract basic fields\n                record = {\n                    'Package': vuln.get('PkgName'),\n                    'Version': vuln.get('InstalledVersion'),\n                    'CVE_ID': vuln.get('VulnerabilityID'),\n                    'Severity': vuln.get('Severity'),\n                    'CVSS_Score': get_cvss_score(vuln),  # Use extraction function\n                    'Fixed_Version': vuln.get('FixedVersion', 'N\u002FA'),\n                    'Title': vuln.get('Title', 'No description')\n                }\n                vulnerabilities.append(record)\n    \n    return vulnerabilities\n```\n\n## Common Patterns\n\n### Pattern 1: Numeric Score or 'N\u002FA'\n\n```python\ncvss_score = get_cvss_score(vuln)\n# Returns: 9.8 or 'N\u002FA'\n```\n\n**Use case**: Simple reports where missing scores are acceptable\n\n### Pattern 2: Score with Metadata\n\n```python\ncvss_info = get_cvss_score_with_fallback(vuln)\n# Returns: {'score': 9.8, 'version': 'v3', 'source': 'nvd'}\n```\n\n**Use case**: Detailed reports showing data provenance\n\n### Pattern 3: Filtering by Score Threshold\n\n```python\ndef is_high_severity(vuln_data, threshold=7.0):\n    \"\"\"Check if vulnerability meets severity threshold.\"\"\"\n    score = get_cvss_score(vuln_data)\n    if score == 'N\u002FA':\n        # If no score, use severity label\n        return vuln_data.get('Severity') in ['HIGH', 'CRITICAL']\n    return score >= threshold\n```\n\n## Error Handling\n\n### Handling Missing Data\n\n```python\ndef safe_get_cvss_score(vuln_data):\n    \"\"\"Safely extract CVSS score with comprehensive error handling.\"\"\"\n    try:\n        cvss = vuln_data.get('CVSS', {})\n        \n        # Validate cvss is a dictionary\n        if not isinstance(cvss, dict):\n            return 'N\u002FA'\n        \n        for source in ['nvd', 'ghsa', 'redhat']:\n            if source in cvss and isinstance(cvss[source], dict):\n                score = cvss[source].get('V3Score')\n                # Validate score is numeric\n                if score is not None and isinstance(score, (int, float)):\n                    return score\n        \n        return 'N\u002FA'\n    except (AttributeError, TypeError):\n        return 'N\u002FA'\n```\n\n## Best Practices\n\n1. **Always provide fallback**: Use 'N\u002FA' when scores unavailable\n2. **Prefer newer versions**: V3 > V2\n3. **Respect source hierarchy**: NVD is most authoritative\n4. **Validate data types**: Ensure scores are numeric before using\n5. **Document source**: In detailed reports, note which source provided the score\n\n## Complete Example\n\n```python\nimport json\n\ndef get_cvss_score(vuln_data):\n    \"\"\"Extract CVSS v3 score with source priority.\"\"\"\n    cvss = vuln_data.get('CVSS', {})\n    \n    for source in ['nvd', 'ghsa', 'redhat']:\n        if source in cvss:\n            score = cvss[source].get('V3Score')\n            if score is not None:\n                return score\n    \n    return 'N\u002FA'\n\ndef generate_report_with_cvss(json_file):\n    \"\"\"Generate vulnerability report with CVSS scores.\"\"\"\n    with open(json_file, 'r') as f:\n        data = json.load(f)\n    \n    print(f\"{'Package':\u003C20} {'CVE ID':\u003C20} {'CVSS':\u003C8} {'Severity':\u003C10}\")\n    print(\"-\" * 60)\n    \n    if 'Results' in data:\n        for result in data['Results']:\n            for vuln in result.get('Vulnerabilities', []):\n                pkg = vuln.get('PkgName', 'Unknown')\n                cve = vuln.get('VulnerabilityID', 'N\u002FA')\n                cvss = get_cvss_score(vuln)\n                severity = vuln.get('Severity', 'UNKNOWN')\n                \n                print(f\"{pkg:\u003C20} {cve:\u003C20} {cvss:\u003C8} {severity:\u003C10}\")\n\n# Usage\ngenerate_report_with_cvss('trivy_report.json')\n```\n\n## Dependencies\n\n### Python Modules\n- `json` (standard library)\n\n### Data Format\n- Expects Trivy JSON format or similar structured vulnerability data\n\n## References\n\n- [CVSS v3.1 Specification](https:\u002F\u002Fwww.first.org\u002Fcvss\u002Fv3.1\u002Fspecification-document)\n- [NVD CVSS Calculator](https:\u002F\u002Fnvd.nist.gov\u002Fvuln-metrics\u002Fcvss\u002Fv3-calculator)\n- [GitHub Security Advisories](https:\u002F\u002Fgithub.com\u002Fadvisories)\n\n\n\n## Strict CVSS Validation and External Enrichment\n\nApply validation independently to every retained vulnerability finding after matching the exact vulnerability ID. A usable score must come from an explicitly identified CVSS v3 or v3.1 score field, be numeric or a numeric string, be finite, and be within the inclusive range `0.0` through `10.0`. Normalize equivalent representations such as `\"9.80\"`, `9.8`, and `9.80` to the numeric value `9.8`; the report's `CVSS_Score` field must contain only that number, without source, version, vector, or severity metadata.\n\nReject booleans, empty strings, `NaN`, positive or negative infinity, negative or greater-than-10 values, CVSS vectors such as `CVSS:3.1\u002F...`, and severity labels such as `HIGH` or `CRITICAL`. A vector or severity label must never be parsed or converted into a score. Do not treat CVSS v2 as a v3\u002Fv3.1 score, and do not copy a value across vulnerability IDs, aliases, packages, or titles without an authoritative exact-ID relationship.\n\nIf the provider object, score field, version, exact-ID match, or validated value is unavailable, preserve the otherwise qualifying finding and write `N\u002FA` for its CVSS score. Do not infer, recompute, average, or substitute a cross-ID value. External NVD, GHSA, or RedHat enrichment is optional and must use bounded requests with a finite timeout and a small fixed retry\u002Fattempt limit; a timeout, error, rate limit, malformed response, or exhausted attempt limit resolves to `N\u002FA` and must not block report generation or fabricate a score. Fetch only the exact requested identifier and validate the returned provider object with the same rules before using it.\n",{"name":5,"description":7},"main","cdcb6d230f3b15c3c33f8a2bdd16439f43602cbe","evaluation\u002Fresults\u002FSkillOpt-adapted-gpt52-n3L4R2-v25\u002Ftasks\u002Fsoftware-dependency-audit\u002Frepaired_skill\u002Fcvss-score-extraction",1,"https:\u002F\u002Fgithub.com\u002Flinyouxue\u002Fskill-repair-benchmark","https:\u002F\u002Fgithub.com\u002Flinyouxue","2026-11-14 20:28:35",{"source":8,"skillName":5,"commands":32,"prompt":42,"zipAvailable":43},[33,36,39],{"tool":34,"command":35},"npx","npx skills add linyouxue\u002Fskill-repair-benchmark --skill cvss-score-extraction",{"tool":37,"command":38},"bunx","bunx skills add linyouxue\u002Fskill-repair-benchmark --skill cvss-score-extraction",{"tool":40,"command":41},"pnpm","pnpm dlx skills add linyouxue\u002Fskill-repair-benchmark --skill cvss-score-extraction","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Flinyouxue\u002Fskill-repair-benchmark\u002Fblob\u002Fmain\u002Fevaluation\u002Fresults\u002FSkillOpt-adapted-gpt52-n3L4R2-v25\u002Ftasks\u002Fsoftware-dependency-audit\u002Frepaired_skill\u002Fcvss-score-extraction\u002FSKILL.md",true,[],[46,53,60,67,72,77],{"skillNo":47,"name":48,"nameZh":6,"description":49,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":50,"categories":51,"keywords":52,"publishedAt":19},"01M7E1HGVRY73NBJ022CJG13X6","video-frame-extraction","Extract frames from video files and save them as images using OpenCV","https:\u002F\u002Fgithub.com\u002Flinyouxue\u002Fskill-repair-benchmark\u002Fblob\u002Fmain\u002Fjpg-ocr-stat\u002Fresult\u002Fskilltta-claude4.7\u002Fgroup_03\u002Frun_03\u002Finputs\u002Fskills\u002Fvideo-frame-extraction\u002FSKILL.md",[],[],{"skillNo":54,"name":55,"nameZh":6,"description":56,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":57,"categories":58,"keywords":59,"publishedAt":19},"01M7E1HAG5R7CJ9C8NYJS771MB","openai-vision","Analyze images and multi-frame sequences using OpenAI GPT vision models","https:\u002F\u002Fgithub.com\u002Flinyouxue\u002Fskill-repair-benchmark\u002Fblob\u002Fmain\u002Fjpg-ocr-stat\u002Fresult\u002Fskilltta-claude4.7\u002Fgroup_03\u002Frun_03\u002Finputs\u002Fskills\u002Fopenai-vision\u002FSKILL.md",[],[],{"skillNo":61,"name":62,"nameZh":6,"description":63,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":64,"categories":65,"keywords":66,"publishedAt":19},"01M7E1H7DADKB6QBWKC2KQ63SZ","image-ocr","Extract text content from images using Tesseract OCR via Python, including structured field extraction from receipts and forms","https:\u002F\u002Fgithub.com\u002Flinyouxue\u002Fskill-repair-benchmark\u002Fblob\u002Fmain\u002Fjpg-ocr-stat\u002Fresult\u002Fskilltta-claude4.7\u002Fgroup_03\u002Frun_03\u002Finputs\u002Fskills\u002Fimage-ocr\u002FSKILL.md",[],[],{"skillNo":68,"name":48,"nameZh":6,"description":49,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":69,"categories":70,"keywords":71,"publishedAt":19},"01M7E1H0WBNT43TENGQY7AVZHD","https:\u002F\u002Fgithub.com\u002Flinyouxue\u002Fskill-repair-benchmark\u002Fblob\u002Fmain\u002Fjpg-ocr-stat\u002Fresult\u002Fskilltta-claude4.7\u002Fgroup_03\u002Frun_02\u002Finputs\u002Fskills\u002Fvideo-frame-extraction\u002FSKILL.md",[],[],{"skillNo":73,"name":55,"nameZh":6,"description":56,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":74,"categories":75,"keywords":76,"publishedAt":19},"01M7E1GTC7D4N4Q2EF03875J9E","https:\u002F\u002Fgithub.com\u002Flinyouxue\u002Fskill-repair-benchmark\u002Fblob\u002Fmain\u002Fjpg-ocr-stat\u002Fresult\u002Fskilltta-claude4.7\u002Fgroup_03\u002Frun_02\u002Finputs\u002Fskills\u002Fopenai-vision\u002FSKILL.md",[],[],{"skillNo":78,"name":62,"nameZh":6,"description":63,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":79,"categories":80,"keywords":81,"publishedAt":19},"01M7E1GQ92CWFMGH53KSSE4WER","https:\u002F\u002Fgithub.com\u002Flinyouxue\u002Fskill-repair-benchmark\u002Fblob\u002Fmain\u002Fjpg-ocr-stat\u002Fresult\u002Fskilltta-claude4.7\u002Fgroup_03\u002Frun_02\u002Finputs\u002Fskills\u002Fimage-ocr\u002FSKILL.md",[],[]]