AGENT SKILL

vulnerability-csv-reporting

Convert vulnerability scan JSON into a filtered CSV report (HIGH/CRITICAL only) with the required schema and basic output validation.

License 许可
Apache-2.0
最近更新
2026-11-14
Stars
★ 0
Forks
1

01 前言 Front Matter

name
vulnerability-csv-reporting
description
Convert vulnerability scan JSON into a filtered CSV report (HIGH/CRITICAL only) with the required schema and basic output validation.

03 SKILL.md 正文

Steps

  1. Load the scanner JSON report (e.g., Trivy’s /root/trivy_report.json) and iterate Results[].Vulnerabilities[].
  2. Filter vulnerabilities to severity levels HIGH and CRITICAL only.
  3. Map each vulnerability into the required CSV fields:
    • Package ← PkgName
    • Version ← InstalledVersion
    • CVE_ID ← VulnerabilityID
    • Severity ← Severity
    • CVSS_Score ← extracted via the CVSS extraction skill (prefer v3; else N/A)
    • Fixed_Version ← FixedVersion (or N/A if empty/missing)
    • Title ← Title (or a short fallback such as Description/N/A)
    • Url ← PrimaryURL (or N/A)
  4. Write /root/security_audit.csv using csv.DictWriter with the exact header order: Package,Version,CVE_ID,Severity,CVSS_Score,Fixed_Version,Title,Url
  5. Validate the output CSV:
    • Header matches exactly (names and order).
    • Every row Severity is only HIGH or CRITICAL.
    • No required columns are missing; use N/A for missing values.

Expected Result

/root/security_audit.csv exists, has the required columns in order, and contains only HIGH/CRITICAL vulnerability rows.

04 同仓库更多 Skills