Extract CVSS scores from vulnerability data sources with proper fallback handling across NVD, GHSA, and RedHat sources.
Collected from public GitHub. Every version is saved exactly as it was and never changes. Install it at an exact version with the mdr tool, and every file is checked before it reaches your agent. The main file is checked against the SHA-256 fingerprint recorded here, and the others against the fingerprints GitHub keeps for its source commit. The automatic checks below grade the latest version, and the same checks always give the same file the same grade.
What the file says
# CVSS Score Extraction
## Overview
CVSS (Common Vulnerability Scoring System) scores may come from multiple sources in Trivy output. Implement priority-based extraction with fallbacks.
## Trivy CVSS Structure
```json
{
"CVSS": {
"nvd": { "V3Score": 9.8, "V3Vector": "..." },
"ghsa": { "V3Score": 8.1, "V3Vector": "..." },
"redhat": { "V3Score": 7.5, "V3Vector": "..." }
}
}
```
## Extraction Priority
1. **NVD** (`nvd.V3Score`) — preferred authoritative source
2. **GHSA** (`ghsa.V3Score`) — GitHub Security Advisory
3. **RedHat** (`redhat.V3Score`) — Red Hat security data
4. Fall back to empty string or "N/A" if no score available
## Python Implementation
```python
def extract_cvss_score(cvss_data):
"""Extract CVSS v3 score with source priority: NVD > GHSA > RedHat."""
if not cvss_data:
return ""
for source in ["nvd", "ghsa", "redhat"]:
source_data = cvss_data.get(source, {})
score = source_data.get("V3Score")
if score is not None:
return score
return ""
```
The line at the top of this page pins the label git:20260424.d50cf5a, which is what most people want. This one pins the sha256 fingerprint of the contents instead, so it survives a label being moved. Either way the exact version is written to mdr.lock, and mdr install downloads and checks those contents again, so it installs them exactly or stops with an error.
GET https://markdownregistry.com/api/v1/artifacts/art_fc6qfhuagssis7il
GET https://markdownregistry.com/api/v1/resolve?ref=cxcscmu/skilllearnbench/cvss-score-extraction
GET https://markdownregistry.com/api/v1/blob/c51040c4b6c4c3d5fe53b64ca5ea344ff084d3d3f61f30723b44b943ea762a2f
Your AI assistant does the legwork. You hear about the deals worth your word. Hand yours the standing instructions at modelranch.com and it joins the network that reads files like this one.
cxcscmu/skilllearnbench · baselines/b4-skill-creator/inject/skill-creator/SKILL.md · Create modular skill documents (SKILL.md files) for Claude Code. Use this skill whenever a task requires generating…
cxcscmu/skilllearnbench · skills/b1-one-shot-claude-haiku-4-5/anthropic-poster-design/anthropic-brand-colors/SKILL.md · Anthropic's official brand color palette, design tokens, and typography standards for consistent brand application.
cxcscmu/skilllearnbench · skills/b1-one-shot-claude-haiku-4-5/anthropic-poster-design/python-pillow-graphics/SKILL.md · Create technical graphics, diagrams, and posters using Python Pillow library with precise color control and typography.
cxcscmu/skilllearnbench · skills/b1-one-shot-claude-haiku-4-5/chinese-poem-generator/classical-poetry-peace-theme/SKILL.md · Compose classical Chinese poetry on peace themes using authentic imagery, perspective shifts, and the voice of ordinary…
cxcscmu/skilllearnbench · skills/b1-one-shot-claude-haiku-4-5/chinese-poem-generator/mandarin-rhyming-guide/SKILL.md · Master modern Mandarin pinyin finals and tone systems to create accurate rhymes for classical poetry following…
cxcscmu/skilllearnbench · skills/b1-one-shot-claude-haiku-4-5/court-form-filling/california-sc100-form/SKILL.md · Understand the structure and fields of the California Small Claims Court Form SC-100
cxcscmu/skilllearnbench · skills/b1-one-shot-claude-haiku-4-5/court-form-filling/pdf-form-filling/SKILL.md · Fill PDF form fields programmatically using Python libraries like pypdf or pdfrw
cxcscmu/skilllearnbench · skills/b1-one-shot-claude-haiku-4-5/dependency-vulnerability-check/cvss-score-extraction/SKILL.md · Extract and handle CVSS scores from multiple vulnerability data sources (NVD, GHSA, RedHat) with proper fallback…
cxcscmu/skilllearnbench · skills/b1-one-shot-gemini-3-flash-preview/dependency-vulnerability-check/cvss-score-extraction/SKILL.md · Extract and prioritize CVSS scores from multiple sources in vulnerability reports to ensure the most accurate data is…