Extract CVSS scores from Trivy vulnerability data with proper source priority fallback (NVD > GHSA > RedHat).
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
## Source Priority
```
NVD (most authoritative) → GHSA → RedHat → N/A
```
Always prefer CVSS v3 scores. Fall back to v2 only if v3 unavailable.
## Implementation
```python
def get_cvss_score(vuln_data):
"""Extract best available CVSS v3 score. Returns float or 'N/A'."""
cvss = vuln_data.get('CVSS', {})
for source in ['nvd', 'ghsa', 'redhat']:
if source in cvss:
score = cvss[source].get('V3Score')
if score is not None:
return score
return 'N/A'
```
## Trivy CVSS Data Format
```json
"CVSS": {
"nvd": {
"V2Score": 7.5,
"V3Score": 9.8,
"V3Vector": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H"
},
"ghsa": {
"V3Score": 9.8
}
}
```
## Score Severity Mapping
| Score | Severity |
|-------|----------|
| 9.0-10.0 | CRITICAL |
| 7.0-8.9 | HIGH |
| 4.0-6.9 | MEDIUM |
| 0.1-3.9 | LOW |
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_45hyyrnmg7xzamm6
GET https://markdownregistry.com/api/v1/resolve?ref=cxcscmu/skilllearnbench/cvss-score-extraction
GET https://markdownregistry.com/api/v1/blob/3735b49cda9cdc53f98ffc08bc1e38ff84f1a1eb3a84f4d1461b5bb1869e87bf
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-opus-4-6/dependency-vulnerability-check/cvss-score-extraction/SKILL.md · Extract CVSS scores from vulnerability data sources with proper fallback handling across NVD, GHSA, and RedHat sources.
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…