SECVULEVAL
收藏资源简介:
SECVULEVAL是一个综合性的基准数据集,旨在支持LLMs和其他检测方法在具有丰富上下文信息的情况下进行细粒度的评估。该数据集专注于现实世界中的C/C++漏洞,并在语句级别进行评估,从而能够更精确地评估模型定位和理解漏洞的能力。SECVULEVAL包含了从1999年到2024年的C/C++项目中25,440个函数样本,涵盖了5,867个唯一的CVE。数据集通过引入丰富的上下文信息,为在现实软件开发场景中进行漏洞检测的基准测试设定了新的标准。
SECVULEVAL is a comprehensive benchmark dataset designed to support fine-grained evaluation of large language models (LLMs) and other detection methods in scenarios with rich contextual information. This dataset focuses on real-world C/C++ vulnerabilities and conducts evaluations at the statement level, enabling more precise assessment of models' ability to locate and understand vulnerabilities. SECVULEVAL contains 25,440 function samples sourced from C/C++ projects spanning from 1999 to 2024, covering 5,867 unique CVEs. By introducing rich contextual information, this dataset sets a new benchmark for vulnerability detection evaluations in real-world software development scenarios.
SecVulEval 数据集概述
数据集基本信息
- 许可证: MIT
- 数据来源: 美国国家漏洞数据库(NVD)及各项目Git仓库
- 语言: C/C++
- 数据量:
- 训练集样本数: 25,440个函数
- 训练集大小: 118,488,441字节
- 下载大小: 30,847,988字节
数据集构成
- 特征字段 (共15个):
- 基础信息: idx(索引), project(项目名), filepath(文件路径), commit_id(提交ID), commit_message(提交信息)
- 漏洞特征: is_vulnerable(是否易受攻击), hash(哈希值), func_name(函数名), func_body(函数体)
- 变更信息: changed_lines(变更行), changed_statements(变更语句)
- 安全标识: cve_list(CVE列表), cwe_list(CWE列表)
- 修复关联: fixed_func_idx(修复函数索引)
- 上下文信息: context(包含6个子字段的结构体)
数据特点
-
漏洞分布:
- 易受攻击函数占比: 43.23%
- 非易受攻击函数占比: 56.77%
-
变更记录特征:
- 易受攻击函数记录被删除的代码
- 非易受攻击函数记录新增的代码
-
安全标识:
- 支持多CVE/CWE标注(列表形式存储)
-
修复关联:
- 通过fixed_func_idx字段可关联漏洞函数与其修复版本
主要用途
- 漏洞检测模型训练
- 细粒度上下文感知检测
- C/C++漏洞检测模型评估
数据结构说明
- **上下文信息(context)**包含6类子信息:
- Execution Environment
- Explanation
- External Function
- Function Argument
- Globals
- Type Execution Declaration

- 1SecVulEval: Benchmarking LLMs for Real-World C/C++ Vulnerability Detection约克大学 · 2025年



