csv-reporting
Output vulnerability reports as a formatted CSV file.
- License 许可
- MIT
- 最近更新
- 2026-10-02
- Stars
- ★ 93
- Forks
- 8
01 前言 Front Matter
- name
- csv-reporting
- description
- Output vulnerability reports as a formatted CSV file.
03 SKILL.md 正文
Vulnerability CSV Reporting
After parsing a vulnerability JSON report from a tool like Trivy, it is common to output the extracted findings to a CSV file for security audits or compliance checks.
Usage
This Python code snippet demonstrates how to export vulnerabilities to a CSV file according to a defined schema, such as: Package,Version,CVE_ID,Severity,CVSS_Score,Fixed_Version,Title,Url.
import csv
import json
def generate_csv(json_path, csv_path):
with open(json_path, 'r', encoding='utf-8') as f:
trivy_report = json.load(f)
# Required CSV fields
fieldnames = ['Package', 'Version', 'CVE_ID', 'Severity', 'CVSS_Score', 'Fixed_Version', 'Title', 'Url']
with open(csv_path, 'w', newline='', encoding='utf-8') as f:
writer = csv.DictWriter(f, fieldnames=fieldnames)
writer.writeheader()
for result in trivy_report.get('Results', []):
for vuln in result.get('Vulnerabilities', []):
# Only include HIGH and CRITICAL severities
severity = vuln.get('Severity', '')
if severity not in ['HIGH', 'CRITICAL']:
continue
# Prepare the row
row = {
'Package': vuln.get('PkgName', ''),
'Version': vuln.get('InstalledVersion', ''),
'CVE_ID': vuln.get('VulnerabilityID', ''),
'Severity': severity,
'CVSS_Score': extract_cvss(vuln),
'Fixed_Version': vuln.get('FixedVersion', 'N/A'),
'Title': vuln.get('Title', vuln.get('Description', '')).replace('\n', ' ').strip()[:100],
'Url': vuln.get('PrimaryURL', '')
}
writer.writerow(row)
# The extract_cvss function would be defined elsewhere or imported
This ensures properly-formatted tabular reports. Note how it limits the output strictly to HIGH and CRITICAL vulnerabilities.
04 同仓库更多 Skills
object_counter
Count occurrences of an object in the image using computer vision algorithm.
travel-planning-workflow
Invoke this skill when performing travel planning. It defines a structured workflow for generating itineraries. Following this workflow is essential to ensure the final plan satisfies user requirements.
bundled-dataset-search-tool
invoke this skill when you need to perform database search for travel planning. This skill provides some useful pre-packaged tools to look up accommodations, attractions, cities, driving distance, flights, and restaurants from the bundled dataset.
glm-output
Output-processing guidance for GLM tasks. Especially useful after glm-basics and glm-calibration when you need verifier-matching metrics from output.nc and a final /root/metrics.json.
glm-calibration
Calibration guidance for GLM tasks. Often most effective after glm-basics has clarified the setup; glm-output is the companion skill for exact final metric computation.
glm-basics
A good starting point for GLM calibration tasks. Use to inspect glm3.nml, confirm how GLM runs, and identify the relevant files before moving on to calibration and output evaluation.