[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6KFQFKB21VGYAMV1V9KT9B1":3,"skill-same:01M6KFQFKB21VGYAMV1V9KT9B1":70},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":22,"publishedAt":43,"linkOnly":44,"markdownContent":45,"markdownBody":46,"frontMatter":47,"refName":48,"commitSha":49,"skillDirectory":50,"forksCount":51,"repositoryHtmlUrl":52,"repositoryHomepageUrl":53,"ownerHtmlUrl":54,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":55,"install":56,"resources":69},"01M6KFQFKB21VGYAMV1V9KT9B1","run2_vulnerability-csv-reporting",null,"Generate structured CSV security audit reports from Trivy JSON output with severity filtering, deduplication, and proper field mapping.","cxcscmu\u002FSkillLearnBench","cxcscmu","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F142838272?v=4","01M6KCQDFQWPDSN0MKZY96MSQP","01M6KCQDM7G70TKJ28NTSQC0RZ",93,"MIT","https:\u002F\u002Fgithub.com\u002Fcxcscmu\u002FSkillLearnBench\u002Fblob\u002Fmain\u002Fskills\u002Fb2-self-feedback-claude-sonnet-4-6\u002Fdependency-vulnerability-check\u002Frun2_vulnerability-csv-reporting\u002FSKILL.md",[17],{"categoryNo":18,"categoryName":19,"taxonomyType":20,"taxonomyTypeDesc":21},"01JBSEEDCAT000000000000004","电子表格","SCENARIO","使用场景",[23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42],"vulnerability","run2 vulnerability csv reporting","csv reporting","vulnerability csv reporting","reporting","csv","JSON Output","severity","deduplication","trivy","security audit","security","json","filtering","reports","mapping","output","with","audit","generate","2026-11-10 10:12:30",false,"---\nname: run2_vulnerability-csv-reporting\ndescription: Generate structured CSV security audit reports from Trivy JSON output with severity filtering, deduplication, and proper field mapping.\n---\n\n# Vulnerability CSV Reporting (Round 2)\n\n## CSV Schema (exact column names required)\n\n```\nPackage,Version,CVE_ID,Severity,CVSS_Score,Fixed_Version,Title,Url\n```\n\n## Complete, Production-Ready Script\n\n```python\nimport json, csv, sys\n\ndef get_cvss_score(vuln):\n    \"\"\"Extract CVSS v3 score: NVD > GHSA > RedHat > N\u002FA\"\"\"\n    cvss = vuln.get('CVSS', {})\n    if not isinstance(cvss, dict):\n        return 'N\u002FA'\n    for source in ['nvd', 'ghsa', 'redhat']:\n        entry = cvss.get(source, {})\n        if isinstance(entry, dict):\n            score = entry.get('V3Score')\n            if score is not None and isinstance(score, (int, float)):\n                return score\n    return 'N\u002FA'\n\ndef generate_csv(json_input, csv_output, severities=('HIGH', 'CRITICAL')):\n    with open(json_input, encoding='utf-8') as f:\n        data = json.load(f)\n\n    records = []\n    seen = set()  # Deduplicate by (package, version, CVE)\n\n    for result in data.get('Results', []):\n        for vuln in (result.get('Vulnerabilities') or []):  # Handle None\n            severity = vuln.get('Severity', '')\n            if severity not in severities:\n                continue\n\n            key = (vuln.get('PkgName'), vuln.get('InstalledVersion'), vuln.get('VulnerabilityID'))\n            if key in seen:\n                continue\n            seen.add(key)\n\n            records.append({\n                'Package': vuln.get('PkgName') or 'N\u002FA',\n                'Version': vuln.get('InstalledVersion') or 'N\u002FA',\n                'CVE_ID': vuln.get('VulnerabilityID') or 'N\u002FA',\n                'Severity': severity,\n                'CVSS_Score': get_cvss_score(vuln),\n                'Fixed_Version': vuln.get('FixedVersion') or 'N\u002FA',  # handles None AND \"\"\n                'Title': vuln.get('Title') or 'N\u002FA',\n                'Url': vuln.get('PrimaryURL') or 'N\u002FA',\n            })\n\n    headers = ['Package', 'Version', 'CVE_ID', 'Severity',\n               'CVSS_Score', 'Fixed_Version', 'Title', 'Url']\n\n    with open(csv_output, 'w', newline='', encoding='utf-8') as f:\n        writer = csv.DictWriter(f, fieldnames=headers)\n        writer.writeheader()\n        writer.writerows(records)\n\n    print(f\"[+] Wrote {len(records)} HIGH\u002FCRITICAL records to {csv_output}\")\n    return records\n\nif __name__ == '__main__':\n    generate_csv('\u002Froot\u002Ftrivy_report.json', '\u002Froot\u002Fsecurity_audit.csv')\n```\n\n## Key Improvements Over Round 1\n\n1. **Deduplication**: Use a `seen` set to avoid duplicate (pkg, version, CVE) entries\n2. **Null safety**: `result.get('Vulnerabilities') or []` handles `None` Vulnerabilities\n3. **Empty string fix**: `vuln.get('FixedVersion') or 'N\u002FA'` catches both `None` and `\"\"`\n4. **Type safety**: Added `isinstance` checks in CVSS extraction\n5. **Encoding**: Always use `encoding='utf-8'` for both read and write\n\n## Field Mapping Reference\n\n| CSV Column | Trivy JSON Field | Notes |\n|------------|-----------------|-------|\n| Package | `PkgName` | Package name |\n| Version | `InstalledVersion` | Installed version string |\n| CVE_ID | `VulnerabilityID` | CVE\u002FGHSA identifier |\n| Severity | `Severity` | HIGH or CRITICAL (filtered) |\n| CVSS_Score | `CVSS.{source}.V3Score` | Via priority extraction |\n| Fixed_Version | `FixedVersion` | Empty\u002FNone → 'N\u002FA' |\n| Title | `Title` | Short description |\n| Url | `PrimaryURL` | AVD\u002FNVD reference link |\n","# Vulnerability CSV Reporting (Round 2)\n\n## CSV Schema (exact column names required)\n\n```\nPackage,Version,CVE_ID,Severity,CVSS_Score,Fixed_Version,Title,Url\n```\n\n## Complete, Production-Ready Script\n\n```python\nimport json, csv, sys\n\ndef get_cvss_score(vuln):\n    \"\"\"Extract CVSS v3 score: NVD > GHSA > RedHat > N\u002FA\"\"\"\n    cvss = vuln.get('CVSS', {})\n    if not isinstance(cvss, dict):\n        return 'N\u002FA'\n    for source in ['nvd', 'ghsa', 'redhat']:\n        entry = cvss.get(source, {})\n        if isinstance(entry, dict):\n            score = entry.get('V3Score')\n            if score is not None and isinstance(score, (int, float)):\n                return score\n    return 'N\u002FA'\n\ndef generate_csv(json_input, csv_output, severities=('HIGH', 'CRITICAL')):\n    with open(json_input, encoding='utf-8') as f:\n        data = json.load(f)\n\n    records = []\n    seen = set()  # Deduplicate by (package, version, CVE)\n\n    for result in data.get('Results', []):\n        for vuln in (result.get('Vulnerabilities') or []):  # Handle None\n            severity = vuln.get('Severity', '')\n            if severity not in severities:\n                continue\n\n            key = (vuln.get('PkgName'), vuln.get('InstalledVersion'), vuln.get('VulnerabilityID'))\n            if key in seen:\n                continue\n            seen.add(key)\n\n            records.append({\n                'Package': vuln.get('PkgName') or 'N\u002FA',\n                'Version': vuln.get('InstalledVersion') or 'N\u002FA',\n                'CVE_ID': vuln.get('VulnerabilityID') or 'N\u002FA',\n                'Severity': severity,\n                'CVSS_Score': get_cvss_score(vuln),\n                'Fixed_Version': vuln.get('FixedVersion') or 'N\u002FA',  # handles None AND \"\"\n                'Title': vuln.get('Title') or 'N\u002FA',\n                'Url': vuln.get('PrimaryURL') or 'N\u002FA',\n            })\n\n    headers = ['Package', 'Version', 'CVE_ID', 'Severity',\n               'CVSS_Score', 'Fixed_Version', 'Title', 'Url']\n\n    with open(csv_output, 'w', newline='', encoding='utf-8') as f:\n        writer = csv.DictWriter(f, fieldnames=headers)\n        writer.writeheader()\n        writer.writerows(records)\n\n    print(f\"[+] Wrote {len(records)} HIGH\u002FCRITICAL records to {csv_output}\")\n    return records\n\nif __name__ == '__main__':\n    generate_csv('\u002Froot\u002Ftrivy_report.json', '\u002Froot\u002Fsecurity_audit.csv')\n```\n\n## Key Improvements Over Round 1\n\n1. **Deduplication**: Use a `seen` set to avoid duplicate (pkg, version, CVE) entries\n2. **Null safety**: `result.get('Vulnerabilities') or []` handles `None` Vulnerabilities\n3. **Empty string fix**: `vuln.get('FixedVersion') or 'N\u002FA'` catches both `None` and `\"\"`\n4. **Type safety**: Added `isinstance` checks in CVSS extraction\n5. **Encoding**: Always use `encoding='utf-8'` for both read and write\n\n## Field Mapping Reference\n\n| CSV Column | Trivy JSON Field | Notes |\n|------------|-----------------|-------|\n| Package | `PkgName` | Package name |\n| Version | `InstalledVersion` | Installed version string |\n| CVE_ID | `VulnerabilityID` | CVE\u002FGHSA identifier |\n| Severity | `Severity` | HIGH or CRITICAL (filtered) |\n| CVSS_Score | `CVSS.{source}.V3Score` | Via priority extraction |\n| Fixed_Version | `FixedVersion` | Empty\u002FNone → 'N\u002FA' |\n| Title | `Title` | Short description |\n| Url | `PrimaryURL` | AVD\u002FNVD reference link |\n",{"name":5,"description":7},"main","726e1f79b96b0cb3d729d0e55a1c847e0b5353ae","skills\u002Fb2-self-feedback-claude-sonnet-4-6\u002Fdependency-vulnerability-check\u002Frun2_vulnerability-csv-reporting",8,"https:\u002F\u002Fgithub.com\u002Fcxcscmu\u002FSkillLearnBench","https:\u002F\u002Fcxcscmu.github.io\u002FSkillLearnBench","https:\u002F\u002Fgithub.com\u002Fcxcscmu","2026-10-02 22:55:36",{"source":8,"skillName":5,"commands":57,"prompt":67,"zipAvailable":68},[58,61,64],{"tool":59,"command":60},"npx","npx skills add cxcscmu\u002FSkillLearnBench --skill run2_vulnerability-csv-reporting",{"tool":62,"command":63},"bunx","bunx skills add cxcscmu\u002FSkillLearnBench --skill run2_vulnerability-csv-reporting",{"tool":65,"command":66},"pnpm","pnpm dlx skills add cxcscmu\u002FSkillLearnBench --skill run2_vulnerability-csv-reporting","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fcxcscmu\u002FSkillLearnBench\u002Fblob\u002Fmain\u002Fskills\u002Fb2-self-feedback-claude-sonnet-4-6\u002Fdependency-vulnerability-check\u002Frun2_vulnerability-csv-reporting\u002FSKILL.md",true,[],[71,87,112,130,148,160],{"skillNo":72,"name":73,"nameZh":6,"description":74,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":75,"categories":76,"keywords":80,"publishedAt":43},"01M6KM5KH175P5ABP5JMX2SBDQ","object_counter","Count occurrences of an object in the image using computer vision algorithm.","https:\u002F\u002Fgithub.com\u002Fcxcscmu\u002FSkillLearnBench\u002Fblob\u002Fmain\u002Fskills\u002Fhuman_authored\u002Fvideo-object-counting\u002Fobject_counter\u002FSKILL.md",[77],{"categoryNo":78,"categoryName":79,"taxonomyType":20,"taxonomyTypeDesc":21},"01JBSEEDCAT000000000000016","图像与多媒体",[81,82,83,84,85,86],"object counter","object","vision","computer","Computer Vision","image",{"skillNo":88,"name":89,"nameZh":6,"description":90,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":91,"categories":92,"keywords":96,"publishedAt":43},"01M6KM51TMVXG79MMPCS6Y8G86","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.","https:\u002F\u002Fgithub.com\u002Fcxcscmu\u002FSkillLearnBench\u002Fblob\u002Fmain\u002Fskills\u002Fhuman_authored\u002Ftravel-planning\u002Ftravel-planning-workflow\u002FSKILL.md",[93],{"categoryNo":94,"categoryName":95,"taxonomyType":20,"taxonomyTypeDesc":21},"01JBSEEDCAT000000000000023","Skill与智能体开发",[97,98,99,100,101,102,103,104,105,106,107,108,109,110,111],"workflow","planning","planning workflow","travel","travel planning","travel planning workflow","structured","performing","plan","for","user","it","requirements","essential","itineraries",{"skillNo":113,"name":114,"nameZh":6,"description":115,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":116,"categories":117,"keywords":118,"publishedAt":43},"01M6KM4DY820XHS9YTSK5QP5HD","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.","https:\u002F\u002Fgithub.com\u002Fcxcscmu\u002FSkillLearnBench\u002Fblob\u002Fmain\u002Fskills\u002Fhuman_authored\u002Ftravel-planning\u002Fbundled-dataset-search-tool\u002FSKILL.md",[],[119,120,121,122,123,124,125,100,126,127,101,128,106,129,98],"search","tool","dataset","bundled dataset search tool","restaurants","Tools","up","look","flights","you","database",{"skillNo":131,"name":132,"nameZh":6,"description":133,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":134,"categories":135,"keywords":136,"publishedAt":43},"01M6KM465BB9PQ0B548HQSVAWZ","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 \u002Froot\u002Fmetrics.json.","https:\u002F\u002Fgithub.com\u002Fcxcscmu\u002FSkillLearnBench\u002Fblob\u002Fmain\u002Fskills\u002Fhuman_authored\u002Ftemperature-simulation\u002Fglm-output\u002FSKILL.md",[],[137,39,138,106,139,140,35,141,142,143,144,145,128,146,147],"glm output","glm","tasks","metrics","basics","guidance","matching","verifier","processing","root","calibration",{"skillNo":149,"name":150,"nameZh":6,"description":151,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":152,"categories":153,"keywords":155,"publishedAt":43},"01M6KM40KY3QWDW5W97S39R2BC","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.","https:\u002F\u002Fgithub.com\u002Fcxcscmu\u002FSkillLearnBench\u002Fblob\u002Fmain\u002Fskills\u002Fhuman_authored\u002Ftemperature-simulation\u002Fglm-calibration\u002FSKILL.md",[154],{"categoryNo":94,"categoryName":95,"taxonomyType":20,"taxonomyTypeDesc":21},[156,147,138,39,142,141,139,157,158,106,159],"glm calibration","setup","companion","metric",{"skillNo":161,"name":162,"nameZh":6,"description":163,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":164,"categories":165,"keywords":166,"publishedAt":43},"01M6KM3VHHVSGMGHJQB3PPT6YG","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.","https:\u002F\u002Fgithub.com\u002Fcxcscmu\u002FSkillLearnBench\u002Fblob\u002Fmain\u002Fskills\u002Fhuman_authored\u002Ftemperature-simulation\u002Fglm-basics\u002FSKILL.md",[],[167,138,141,168,156,147,106,39,169,170,171,172,173,174,139],"glm basics","inspect","relevant","files","good","use","how","Evaluation"]