[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7BZNJCBAG0WVDVEQRKSD9FA":3,"skill-same:01M7BZNJCBAG0WVDVEQRKSD9FA":45},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":24,"commitSha":25,"skillDirectory":26,"forksCount":27,"repositoryHtmlUrl":28,"repositoryHomepageUrl":6,"ownerHtmlUrl":29,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":30,"install":31,"resources":44},"01M7BZNJCBAG0WVDVEQRKSD9FA","vulnerability-csv-reporting",null,"Generate CSV security audit reports from scanner JSON with correct inclusion filtering, CVSS extraction as a separate attribute, and post-write verification against the source.","linyouxue\u002Fskill-repair-benchmark","linyouxue","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F216151464?v=4","01M7BJEVCXKD74KH6FG9CBVSQB","林宥学","01M7BJEVE02NP217V93BKZFC0J",0,"Apache-2.0","https:\u002F\u002Fgithub.com\u002Flinyouxue\u002Fskill-repair-benchmark\u002Fblob\u002Fmain\u002Fevaluation\u002Fresults\u002FSkillGrad\u002Fmain31_clean_20261004_finalized\u002Ftasks\u002Fsoftware-dependency-audit\u002Frepaired_skill\u002Fvulnerability-csv-reporting\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: vulnerability-csv-reporting\ndescription: Generate CSV security audit reports from scanner JSON with correct inclusion filtering, CVSS extraction as a separate attribute, and post-write verification against the source.\n---\n\n# Vulnerability CSV Report Generation\n\nThis skill provides guidance on generating structured CSV reports from vulnerability scan data—a common format for security audits and compliance reporting.\n\n## Plan and verify the report shape\n\n1. Decide what defines the **inclusion set** (e.g., “all HIGH\u002FCRITICAL findings”); prefer a scanner-provided field for inclusion unless the task explicitly requires CVSS-threshold filtering.\n2. Decide whether your report’s **Severity** column is scanner-provided or derived from CVSS; do not mix sources without an explicit reconciliation rule.\n3. Choose a single **CVSS source priority** (e.g., NVD → GHSA → vendor) and keep the chosen `source\u002Fversion\u002Fscore` together as a unit.\n4. Define the schema first (headers and types), then implement mapping.\n5. After writing, verify that the CSV rows match the intended inclusion set from the source JSON (counts + identifier diff).\n\n## CSV generation with DictWriter\n\nUse `csv.DictWriter` with an explicit header order.\n\n```python\nimport csv\n\ndef write_csv(path, rows, headers):\n    with open(path, \"w\", newline=\"\", encoding=\"utf-8\") as f:\n        w = csv.DictWriter(f, fieldnames=headers)\n        w.writeheader()\n        w.writerows(rows)\n```\n\n## Inclusion filtering: use scanner severity, not CVSS-derived severity\n\nWhen asked for “all HIGH and CRITICAL vulnerabilities” from a scanner report, filter by the scanner’s severity label (e.g., `vuln[\"Severity\"]`) and treat CVSS as an independent attribute for reporting.\n\n```python\ndef include_finding(vuln, allowed=(\"HIGH\", \"CRITICAL\")):\n    sev = (vuln.get(\"Severity\") or \"\").upper()\n    return sev in set(allowed)\n```\n\nDecision rule: Only filter by CVSS threshold (or CVSS-derived severity) when the task explicitly defines inclusion by CVSS score; otherwise, do not let CVSS availability\u002Fparsing change which rows are included.\n\nRead references\u002Ftrivy-severity-vs-cvss.md when you are producing a HIGH\u002FCRITICAL (or similar) subset from Trivy JSON and also extracting CVSS.\nSkip when you are not filtering (you are reporting all findings).\n\n## Coupling Severity with the selected CVSS score\n\nWhen you emit both `Severity` and `CVSS_Score`, treat them as a coupled pair.\n\n- Option A: compute `Severity` from the chosen numeric CVSS (standard v3 ranges).\n- Option B: emit scanner-provided `Severity` and treat CVSS as informational; in this mode, do **not** recompute severity from CVSS.\n\n```python\ndef cvss_v3_severity(score):\n    if score is None:\n        return \"UNKNOWN\"\n    if score >= 9.0:\n        return \"CRITICAL\"\n    if score >= 7.0:\n        return \"HIGH\"\n    if score >= 4.0:\n        return \"MEDIUM\"\n    if score > 0.0:\n        return \"LOW\"\n    return \"NONE\"\n```\n\nRead references\u002Fseverity-cvss-consistency.md when the output includes both a severity label and a numeric CVSS score.\nSkip when the report contains only one of them (severity-only or score-only).\n\n## Field mapping from JSON to CSV\n\nMap nested scanner output into a flat record per vulnerability.\n\n```python\nimport json\n\ndef iter_findings(report_path):\n    data = json.load(open(report_path, \"r\", encoding=\"utf-8\"))\n    for result in data.get(\"Results\", []):\n        for vuln in result.get(\"Vulnerabilities\", []) or []:\n            yield vuln\n\n\ndef to_row(vuln, score_info=None):\n    return {\n        \"Package\": vuln.get(\"PkgName\") or \"Unknown\",\n        \"Version\": vuln.get(\"InstalledVersion\") or \"N\u002FA\",\n        \"VulnerabilityID\": vuln.get(\"VulnerabilityID\") or \"N\u002FA\",\n        \"Severity\": vuln.get(\"Severity\") or \"UNKNOWN\",\n        \"CVSS_Score\": (score_info or {}).get(\"score\") or \"N\u002FA\",\n    }\n```\n\n## Common Pitfalls\n\n- Filtering by a CVSS-derived severity (or CVSS availability) when the task asks for scanner-severity subsets (you can silently omit findings).\n- Mixing a scanner’s `Severity` label with a CVSS score extracted from a different advisory source without recording provenance.\n- Writing CSV without verifying counts\u002FIDs against the source JSON (well-formed output can still be incomplete).\n","# Vulnerability CSV Report Generation\n\nThis skill provides guidance on generating structured CSV reports from vulnerability scan data—a common format for security audits and compliance reporting.\n\n## Plan and verify the report shape\n\n1. Decide what defines the **inclusion set** (e.g., “all HIGH\u002FCRITICAL findings”); prefer a scanner-provided field for inclusion unless the task explicitly requires CVSS-threshold filtering.\n2. Decide whether your report’s **Severity** column is scanner-provided or derived from CVSS; do not mix sources without an explicit reconciliation rule.\n3. Choose a single **CVSS source priority** (e.g., NVD → GHSA → vendor) and keep the chosen `source\u002Fversion\u002Fscore` together as a unit.\n4. Define the schema first (headers and types), then implement mapping.\n5. After writing, verify that the CSV rows match the intended inclusion set from the source JSON (counts + identifier diff).\n\n## CSV generation with DictWriter\n\nUse `csv.DictWriter` with an explicit header order.\n\n```python\nimport csv\n\ndef write_csv(path, rows, headers):\n    with open(path, \"w\", newline=\"\", encoding=\"utf-8\") as f:\n        w = csv.DictWriter(f, fieldnames=headers)\n        w.writeheader()\n        w.writerows(rows)\n```\n\n## Inclusion filtering: use scanner severity, not CVSS-derived severity\n\nWhen asked for “all HIGH and CRITICAL vulnerabilities” from a scanner report, filter by the scanner’s severity label (e.g., `vuln[\"Severity\"]`) and treat CVSS as an independent attribute for reporting.\n\n```python\ndef include_finding(vuln, allowed=(\"HIGH\", \"CRITICAL\")):\n    sev = (vuln.get(\"Severity\") or \"\").upper()\n    return sev in set(allowed)\n```\n\nDecision rule: Only filter by CVSS threshold (or CVSS-derived severity) when the task explicitly defines inclusion by CVSS score; otherwise, do not let CVSS availability\u002Fparsing change which rows are included.\n\nRead references\u002Ftrivy-severity-vs-cvss.md when you are producing a HIGH\u002FCRITICAL (or similar) subset from Trivy JSON and also extracting CVSS.\nSkip when you are not filtering (you are reporting all findings).\n\n## Coupling Severity with the selected CVSS score\n\nWhen you emit both `Severity` and `CVSS_Score`, treat them as a coupled pair.\n\n- Option A: compute `Severity` from the chosen numeric CVSS (standard v3 ranges).\n- Option B: emit scanner-provided `Severity` and treat CVSS as informational; in this mode, do **not** recompute severity from CVSS.\n\n```python\ndef cvss_v3_severity(score):\n    if score is None:\n        return \"UNKNOWN\"\n    if score >= 9.0:\n        return \"CRITICAL\"\n    if score >= 7.0:\n        return \"HIGH\"\n    if score >= 4.0:\n        return \"MEDIUM\"\n    if score > 0.0:\n        return \"LOW\"\n    return \"NONE\"\n```\n\nRead references\u002Fseverity-cvss-consistency.md when the output includes both a severity label and a numeric CVSS score.\nSkip when the report contains only one of them (severity-only or score-only).\n\n## Field mapping from JSON to CSV\n\nMap nested scanner output into a flat record per vulnerability.\n\n```python\nimport json\n\ndef iter_findings(report_path):\n    data = json.load(open(report_path, \"r\", encoding=\"utf-8\"))\n    for result in data.get(\"Results\", []):\n        for vuln in result.get(\"Vulnerabilities\", []) or []:\n            yield vuln\n\n\ndef to_row(vuln, score_info=None):\n    return {\n        \"Package\": vuln.get(\"PkgName\") or \"Unknown\",\n        \"Version\": vuln.get(\"InstalledVersion\") or \"N\u002FA\",\n        \"VulnerabilityID\": vuln.get(\"VulnerabilityID\") or \"N\u002FA\",\n        \"Severity\": vuln.get(\"Severity\") or \"UNKNOWN\",\n        \"CVSS_Score\": (score_info or {}).get(\"score\") or \"N\u002FA\",\n    }\n```\n\n## Common Pitfalls\n\n- Filtering by a CVSS-derived severity (or CVSS availability) when the task asks for scanner-severity subsets (you can silently omit findings).\n- Mixing a scanner’s `Severity` label with a CVSS score extracted from a different advisory source without recording provenance.\n- Writing CSV without verifying counts\u002FIDs against the source JSON (well-formed output can still be incomplete).\n",{"name":5,"description":7},"main","cdcb6d230f3b15c3c33f8a2bdd16439f43602cbe","evaluation\u002Fresults\u002FSkillGrad\u002Fmain31_clean_20261004_finalized\u002Ftasks\u002Fsoftware-dependency-audit\u002Frepaired_skill\u002Fvulnerability-csv-reporting",1,"https:\u002F\u002Fgithub.com\u002Flinyouxue\u002Fskill-repair-benchmark","https:\u002F\u002Fgithub.com\u002Flinyouxue","2026-11-14 20:28:35",{"source":8,"skillName":5,"commands":32,"prompt":42,"zipAvailable":43},[33,36,39],{"tool":34,"command":35},"npx","npx skills add linyouxue\u002Fskill-repair-benchmark --skill vulnerability-csv-reporting",{"tool":37,"command":38},"bunx","bunx skills add linyouxue\u002Fskill-repair-benchmark --skill vulnerability-csv-reporting",{"tool":40,"command":41},"pnpm","pnpm dlx skills add linyouxue\u002Fskill-repair-benchmark --skill vulnerability-csv-reporting","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Flinyouxue\u002Fskill-repair-benchmark\u002Fblob\u002Fmain\u002Fevaluation\u002Fresults\u002FSkillGrad\u002Fmain31_clean_20261004_finalized\u002Ftasks\u002Fsoftware-dependency-audit\u002Frepaired_skill\u002Fvulnerability-csv-reporting\u002FSKILL.md",true,[],[46,53,60,67,72,77],{"skillNo":47,"name":48,"nameZh":6,"description":49,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":50,"categories":51,"keywords":52,"publishedAt":19},"01M7E1HGVRY73NBJ022CJG13X6","video-frame-extraction","Extract frames from video files and save them as images using OpenCV","https:\u002F\u002Fgithub.com\u002Flinyouxue\u002Fskill-repair-benchmark\u002Fblob\u002Fmain\u002Fjpg-ocr-stat\u002Fresult\u002Fskilltta-claude4.7\u002Fgroup_03\u002Frun_03\u002Finputs\u002Fskills\u002Fvideo-frame-extraction\u002FSKILL.md",[],[],{"skillNo":54,"name":55,"nameZh":6,"description":56,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":57,"categories":58,"keywords":59,"publishedAt":19},"01M7E1HAG5R7CJ9C8NYJS771MB","openai-vision","Analyze images and multi-frame sequences using OpenAI GPT vision models","https:\u002F\u002Fgithub.com\u002Flinyouxue\u002Fskill-repair-benchmark\u002Fblob\u002Fmain\u002Fjpg-ocr-stat\u002Fresult\u002Fskilltta-claude4.7\u002Fgroup_03\u002Frun_03\u002Finputs\u002Fskills\u002Fopenai-vision\u002FSKILL.md",[],[],{"skillNo":61,"name":62,"nameZh":6,"description":63,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":64,"categories":65,"keywords":66,"publishedAt":19},"01M7E1H7DADKB6QBWKC2KQ63SZ","image-ocr","Extract text content from images using Tesseract OCR via Python, including structured field extraction from receipts and forms","https:\u002F\u002Fgithub.com\u002Flinyouxue\u002Fskill-repair-benchmark\u002Fblob\u002Fmain\u002Fjpg-ocr-stat\u002Fresult\u002Fskilltta-claude4.7\u002Fgroup_03\u002Frun_03\u002Finputs\u002Fskills\u002Fimage-ocr\u002FSKILL.md",[],[],{"skillNo":68,"name":48,"nameZh":6,"description":49,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":69,"categories":70,"keywords":71,"publishedAt":19},"01M7E1H0WBNT43TENGQY7AVZHD","https:\u002F\u002Fgithub.com\u002Flinyouxue\u002Fskill-repair-benchmark\u002Fblob\u002Fmain\u002Fjpg-ocr-stat\u002Fresult\u002Fskilltta-claude4.7\u002Fgroup_03\u002Frun_02\u002Finputs\u002Fskills\u002Fvideo-frame-extraction\u002FSKILL.md",[],[],{"skillNo":73,"name":55,"nameZh":6,"description":56,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":74,"categories":75,"keywords":76,"publishedAt":19},"01M7E1GTC7D4N4Q2EF03875J9E","https:\u002F\u002Fgithub.com\u002Flinyouxue\u002Fskill-repair-benchmark\u002Fblob\u002Fmain\u002Fjpg-ocr-stat\u002Fresult\u002Fskilltta-claude4.7\u002Fgroup_03\u002Frun_02\u002Finputs\u002Fskills\u002Fopenai-vision\u002FSKILL.md",[],[],{"skillNo":78,"name":62,"nameZh":6,"description":63,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":79,"categories":80,"keywords":81,"publishedAt":19},"01M7E1GQ92CWFMGH53KSSE4WER","https:\u002F\u002Fgithub.com\u002Flinyouxue\u002Fskill-repair-benchmark\u002Fblob\u002Fmain\u002Fjpg-ocr-stat\u002Fresult\u002Fskilltta-claude4.7\u002Fgroup_03\u002Frun_02\u002Finputs\u002Fskills\u002Fimage-ocr\u002FSKILL.md",[],[]]