five

ChamaraVishwajithRajapaksha/Code_Vulnerability_Dataset

收藏
Hugging Face2026-04-16 更新2026-04-26 收录
下载链接:
https://hf-mirror.com/datasets/ChamaraVishwajithRajapaksha/Code_Vulnerability_Dataset
下载链接
链接失效反馈
官方服务:
资源简介:
--- license: mit tags: - security - cwe - vulnerability - code-analysis - software-security - dataset - machine-learning - llm-finetuning --- # 🔐 Code Vulnerability Dataset (CWE-Enriched) ## 📌 Overview This dataset is built from the **bstee615/diversevul** dataset and enhanced with structured vulnerability intelligence from the **MITRE Common Weakness Enumeration (CWE)** database. It provides a rich, machine-readable representation of software vulnerabilities, mapping raw vulnerable code samples to standardized CWE classifications. The dataset is designed for research and development in: - Vulnerability detection models - Secure code generation - LLM fine-tuning for cybersecurity tasks - Static analysis and code understanding systems --- ## 🧠 Dataset Enrichment Process Each sample in the dataset has been augmented using the MITRE CWE API to include structured security intelligence such as: - CWE identifier (e.g., CWE-787) - Vulnerability type (e.g., Out-of-bounds Write) - Human-readable description - Severity / exploit likelihood - Impact categories (e.g., code execution, crash) - Applicable programming languages - Security classification metadata --- ## 📊 Data Structure Each row in the dataset contains: ### 🔹 Original Fields - `func` → Source code snippet - `cwe` → Original CWE labels from DiverseVul dataset ### 🔹 Enriched Field - `cwe_details` → JSON object containing structured CWE metadata: ```json { "cwe_id": "CWE-787", "vulnerability_type": "Out-of-bounds Write", "description": "The product writes data past the end, or before the beginning, of the intended buffer.", "severity": "High", "category": "Memory Corruption", "impact": [ "Modify Memory", "Execute Unauthorized Code", "Crash (DoS)" ], "languages": ["C", "C++"], "example": "Example not extracted" }

--- license: MIT许可证 tags: - 安全 - CWE - 漏洞 - 代码分析 - 软件安全 - 数据集 - 机器学习 - 大语言模型(Large Language Model, LLM)微调 --- # 🔐 代码漏洞数据集(CWE增强版) ## 📌 概述 本数据集基于**bstee615/diversevul**数据集构建,并通过来自**MITRE通用弱点枚举(Common Weakness Enumeration, CWE)**数据库的结构化漏洞情报进行增强。 本数据集提供了丰富的机器可读软件漏洞表征,将原始易受攻击代码样本映射至标准化的CWE分类体系。 本数据集面向以下方向的研究与开发: - 漏洞检测模型 - 安全代码生成 - 面向网络安全任务的大语言模型微调 - 静态分析与代码理解系统 --- ## 🧠 数据集增强流程 本数据集的每个样本均通过MITRE CWE API进行增强,以纳入以下结构化安全情报: - CWE标识符(例如:CWE-787) - 漏洞类型(例如:越界写入) - 人类可读的描述 - 严重程度/利用可能性 - 影响类别(例如:代码执行、崩溃) - 适用编程语言 - 安全分类元数据 --- ## 📊 数据结构 数据集中的每一行包含以下内容: ### 🔹 原始字段 - `func` → 源代码片段 - `cwe` → 源自DiverseVul数据集的原始CWE标签 ### 🔹 增强字段 - `cwe_details` → 包含结构化CWE元数据的JSON对象: json { "cwe_id": "CWE-787", "vulnerability_type": "越界写入", "description": "该产品在目标缓冲区的末端之外或起始之前写入数据。", "severity": "高", "category": "内存破坏", "impact": [ "修改内存", "执行未授权代码", "崩溃(拒绝服务)" ], "languages": ["C", "C++"], "example": "未提取示例" }
二维码
社区交流群
二维码
科研交流群
商业服务