agentsclimarketplace

Vulnerability csv reporting

Skill cxcscmu/SkillLearnBench/skills/b4-skill-creator-claude-opus-4-6/dependency-vulnerability-check/vulnerability-csv-reporting

Generate structured CSV security audit reports from vulnerability data with proper filtering and formatting. This skill covers CSV schema design for security reports, using Python csv.DictWriter, severity-based filtering, and field mapping from JSON to tabular format.From its SKILL.md

Install
npx -y skills add cxcscmu/SkillLearnBench --skill vulnerability-csv-reporting

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

SKILL.md

2.7 KB, 582 tokens by cl100k_base, as published. Nobody here has run it

Vulnerability CSV Report Generation

Generate CSV security audit reports from Trivy JSON output with severity filtering.

CSV Schema

ColumnTypeDescriptionExample
PackageStringVulnerable package nameexpress
VersionStringInstalled version4.17.1
CVE_IDStringVulnerability identifierCVE-2022-24999
SeverityEnumRisk level (CRITICAL/HIGH)CRITICAL
CVSS_ScoreFloat/StringNumeric score or N/A9.8
Fixed_VersionStringPatched version or N/A4.18.0
TitleStringVulnerability descriptionXSS in Express.js
UrlStringReference linkhttps://avd.aquasec.com/...

Python Implementation

import json
import csv

def generate_vulnerability_csv(json_input, csv_output, severity_filter=['HIGH', 'CRITICAL']):
    with open(json_input, 'r', encoding='utf-8') as f:
        data = json.load(f)

    vulnerabilities = []
    if 'Results' in data:
        for result in data['Results']:
            for vuln in result.get('Vulnerabilities', []):
                severity = vuln.get('Severity', 'UNKNOWN')
                if severity in severity_filter:
                    vulnerabilities.append({
                        "Package": vuln.get('PkgName', 'N/A'),
                        "Version": vuln.get('InstalledVersion', 'N/A'),
                        "CVE_ID": vuln.get('VulnerabilityID', 'N/A'),
                        "Severity": severity,
                        "CVSS_Score": get_cvss_score(vuln),
                        "Fixed_Version": vuln.get('FixedVersion') or 'N/A',
                        "Title": vuln.get('Title') or 'No description',
                        "Url": vuln.get('PrimaryURL', '')
                    })

    headers = ["Package", "Version", "CVE_ID", "Severity",
               "CVSS_Score", "Fixed_Version", "Title", "Url"]
    with open(csv_output, 'w', newline='', encoding='utf-8') as f:
        writer = csv.DictWriter(f, fieldnames=headers)
        writer.writeheader()
        writer.writerows(vulnerabilities)

    return len(vulnerabilities)

Best Practices

  1. Always use newline='' and encoding='utf-8' when opening CSV files
  2. Use N/A for missing data — never leave fields empty
  3. Use csv.DictWriter for readable, maintainable code
  4. Validate that FixedVersion is not None before writing

What ships with it

Read from the repository

Just SKILL.md. No reference files, no scripts.

Keep looking

Skills are one crate of 325,949. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.