Datasets:
cwe_id stringclasses 30
values | cwe_description stringclasses 30
values | language stringclasses 5
values | vul_code stringlengths 54 467k | fixed_code stringlengths 54 467k | file_pair_id stringlengths 3 7 | source stringclasses 1
value | language_dir stringclasses 8
values |
|---|---|---|---|---|---|---|---|
CWE-119 | Improper Restriction of Operations within the Bounds of a Memory Buffer - Certain languages allow direct addressing of memory locations and do not automatically ensure that these locations are valid for the memory buffer that is being referenced. | php | #***************************************************************************
# _ _ ____ _
# Project ___| | | | _ \| |
# / __| | | | |_) | |
# | (__| |_| | _ <| |___
# \___|\___/|... | #***************************************************************************
# _ _ ____ _
# Project ___| | | | _ \| |
# / __| | | | |_) | |
# | (__| |_| | _ <| |___
# \___|\___/|... | 3259_1 | crossvul | inc |
CWE-119 | Improper Restriction of Operations within the Bounds of a Memory Buffer - Certain languages allow direct addressing of memory locations and do not automatically ensure that these locations are valid for the memory buffer that is being referenced. | java | /*
* Copyright (C) 2016 Southern Storm Software, Pty Ltd.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, ... | /*
* Copyright (C) 2016 Southern Storm Software, Pty Ltd.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, ... | 4291_4 | crossvul | java |
CWE-119 | Improper Restriction of Operations within the Bounds of a Memory Buffer - Certain languages allow direct addressing of memory locations and do not automatically ensure that these locations are valid for the memory buffer that is being referenced. | c | /* Copyright (C) 2000-2012 by George Williams */
/*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice, this
* list of conditions and the following... | /* Copyright (C) 2000-2012 by George Williams */
/*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice, this
* list of conditions and the following... | 1050_0 | crossvul | h |
CWE-119 | "Improper Restriction of Operations within the Bounds of a Memory Buffer - Certain languages allow d(...TRUNCATED) | c | "/* -*- mode: c; indent-tabs-mode: nil -*- */\n/*\n * Copyright 2000, 2008 by the Massachusetts Inst(...TRUNCATED) | "/* -*- mode: c; indent-tabs-mode: nil -*- */\n/*\n * Copyright 2000, 2008 by the Massachusetts Inst(...TRUNCATED) | 1537_0 | crossvul | h |
CWE-119 | "Improper Restriction of Operations within the Bounds of a Memory Buffer - Certain languages allow d(...TRUNCATED) | c | "/*-------------------------------------------------------------------------\n *\n * datetime.h\n *\(...TRUNCATED) | "/*-------------------------------------------------------------------------\n *\n * datetime.h\n *\(...TRUNCATED) | 2019_0 | crossvul | h |
CWE-119 | "Improper Restriction of Operations within the Bounds of a Memory Buffer - Certain languages allow d(...TRUNCATED) | c | "/*\n * INET\t\tAn implementation of the TCP/IP protocol suite for the LINUX\n *\t\toperating system(...TRUNCATED) | "/*\n * INET\t\tAn implementation of the TCP/IP protocol suite for the LINUX\n *\t\toperating system(...TRUNCATED) | 2143_0 | crossvul | h |
CWE-119 | "Improper Restriction of Operations within the Bounds of a Memory Buffer - Certain languages allow d(...TRUNCATED) | c | "#ifndef _ASM_IA64_PATCH_H\n#define _ASM_IA64_PATCH_H\n\n/*\n * Copyright (C) 2003 Hewlett-Packard C(...TRUNCATED) | "#ifndef _ASM_IA64_PATCH_H\n#define _ASM_IA64_PATCH_H\n\n/*\n * Copyright (C) 2003 Hewlett-Packard C(...TRUNCATED) | 2483_5 | crossvul | h |
CWE-119 | "Improper Restriction of Operations within the Bounds of a Memory Buffer - Certain languages allow d(...TRUNCATED) | c | "#ifndef _ASM_IA64_SECTIONS_H\n#define _ASM_IA64_SECTIONS_H\n\n/*\n * Copyright (C) 1998-2003 Hewlet(...TRUNCATED) | "#ifndef _ASM_IA64_SECTIONS_H\n#define _ASM_IA64_SECTIONS_H\n\n/*\n * Copyright (C) 1998-2003 Hewlet(...TRUNCATED) | 2483_7 | crossvul | h |
CWE-119 | "Improper Restriction of Operations within the Bounds of a Memory Buffer - Certain languages allow d(...TRUNCATED) | c | "/* \n BlueZ - Bluetooth protocol stack for Linux\n Copyright (C) 2000-2001 Qualcomm Incorporate(...TRUNCATED) | "/* \n BlueZ - Bluetooth protocol stack for Linux\n Copyright (C) 2000-2001 Qualcomm Incorporate(...TRUNCATED) | 2522_0 | crossvul | h |
CWE-119 | "Improper Restriction of Operations within the Bounds of a Memory Buffer - Certain languages allow d(...TRUNCATED) | c | "/* $OpenBSD: monitor.h,v 1.19 2015/01/19 19:52:16 markus Exp $ */\n\n/*\n * Copyright 2002 Niels Pr(...TRUNCATED) | "/* $OpenBSD: monitor.h,v 1.20 2016/09/28 16:33:07 djm Exp $ */\n\n/*\n * Copyright 2002 Niels Provo(...TRUNCATED) | 4767_1 | crossvul | h |
DELTA vulnerability datasets
This repository contains the three benchmark splits used by DELTA: Differential Evidence for LLM Taxonomy-Aware Software Vulnerability Detection.
Configurations
| config | task | training knowledge base | validation/test |
|---|---|---|---|
primevul |
single-language | C/C++ | C/C++ |
megavul |
cross-language | C/C++ | Java |
crossvul |
multi-language transfer | C, Go, Java, PHP, TypeScript | C++, C#, JavaScript, Python, Ruby, Rust, Scala |
Each config has train, val and test splits. The training split is the
knowledge-base construction set. In DELTA, each pair contributes two
classification items during evaluation: the vulnerable version (label 1) and
the fixed version (label 0).
Loading
from datasets import load_dataset
primevul = load_dataset("codemetic/DELTA", "primevul", split="train")
megavul_java = load_dataset("codemetic/DELTA", "megavul", split="test")
crossvul = load_dataset("codemetic/DELTA", "crossvul", split="val")
Or use the DELTA code directly:
python -m delta.cli run --config configs/primevul.yaml --run-id primevul-full
The loader pulls the data from this repository by default (data.source: hf).
Columns
The parquet files preserve the original benchmark columns, including:
vul_code,fixed_codecweorcwe_id, andcwe_descriptionwhere availablelanguagefor CrossVul- project/CVE metadata for PrimeVul and MegaVul
Citation
Please cite the DELTA paper. See the project repository for the full author list and bibliography.
Notes
These datasets are redistributed for research convenience. Please also follow the terms of the original PrimeVul, MegaVul and CrossVul releases.
- Downloads last month
- 152