Git Product home page Git Product logo

msr_20_code_vulnerability_csv_dataset's Introduction

A C/C++ Code Vulnerability Dataset with Code Changes and CVE Summaries

1 . Data Description

  • CVE entries in our dataset cover the period from 2002 to 2019, each consisting of 21 features. Each feature's name and corresponding column name in the CSV file are explained in the following table. The dataset is released as comma-separated values(CSV) format (all_c_cpp_release2.0.csv).
Features Column Name in the CSV Description
Access Complexity access_complexity Reflects the complexity of the attack required to exploit the software feature misuse vulnerability
Authentication Required authentication_required If authentication is required to exploit the vulnerability
Availability Impact availability_impact Measures the potential impact to availability of a successfully exploited misuse vulnerability
Commit ID commit_id Commit ID in code repository, indicating a mini-version
Commit Message commit_message Commit message from developer
Confidentiality Impact confidentiality_impact Measures the potential impact on confidentiality of a successfully exploited misuse vulnerability
CWE ID cwe_id Common Weakness Enumeration ID
CVE ID cve_id Common Vulnerabilities and Exposures ID
CVE Page cve_page CVE Details web page link for that CVE
CVE Summary summary CVE summary information
CVSS Score score The relative severity of software flaw vulnerabilities
Files Changed files_changed All the changed files and corresponding patches
Integrity Impact integrity_impact Measures the potential impact to integrity of a successfully exploited misuse vulnerability\
Mini-version After Fix version_after_fix Mini-version ID after the fix
Mini-version Before Fix version_before_fix Mini-version ID before the fix
Programming Language lang Project programming language
Project project Project name
Publish Date publish_date Publish date of the CVE
Reference Link ref_ink Reference link in the CVE page
Update Date update_date Update date of the CVE
Vulnerability Classification vulnerability_classification Vulnerability type
  • We used the code changes information(minned from commited version patches) to localize which lines of code in the files were modified. Taking modified lines between the two mini-versions as flaw lines, we split the functions in the modified files into vulnerable functions (if there were flaw lines modified in the function) and non-vulnerable functions.

  • The cleaned version of split functions is coming soon.

  • The cleaned version of split functions(CSV format) can be found at: https://drive.google.com/file/d/1-0VhnHBp9IGh90s2wCNjeCMuy70HPl8X/view?usp=sharing

    Some of the intermediary files in the data collecting and cleaning process can be found at:https://drive.google.com/file/d/1E95oVDSO0CfAAs-Q0yav2HBGLZQce_v2/view?usp=sharing

    Pandas is recommended (Python Package, like pandas.read_csv("filepath/file.csv") ) to work on the dataset.

    Also JSON format dataset can be found at: https://drive.google.com/file/d/1deNsPfeh77h1SHjJURYOeyCR96JgxB_A/view?usp=sharing

    • Split functions are released as comma-separated values(CSV) format:
    Column Name in the CSV Description
    func_before The function before the vulnerability being fixed(if "vul" labeled as "1", then this is the vulnerable function)
    func_after The function after the vulnerability being fixed
    lines_before The modified lines in the founction before the vulnerability being fixed
    lines_after The modified lines in the founction after the vulnerability being fixed
    vul "1" means vulnerable function and "0" means non-vulnerable function
    vul_func_with_fix The code comments showing how the vulnerability was fixed

2. HOW To Use The Scripts

  • Pre-Requirements

    Citation

    ACM Reference Format:

    Jiahao Fan, Yi Li, Shaohua Wang and Tien N. Nguyen. 2020. A C/C++ Code Vulnerability Dataset with Code Changes and CVE Summaries. In MSR โ€™20: The 17th International Conference on Mining Software Repositories,May 25โ€“26, 2020, MSR, Seoul, South Korea. ACM, New York, NY, USA, 5 pages. https://doi.org/10.1145/3379597.3387501

msr_20_code_vulnerability_csv_dataset's People

Contributors

zeovan avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

msr_20_code_vulnerability_csv_dataset's Issues

Some issues in 'func_before'

Hello, I found some errors in "MSR_data_cleaned.csv".
You may have used diff func_before and func_after to get lines_before and lines_after, but due to incorrect indentation of func_before you get wrong lines_before and lines_after.

For example: <Num: 10897, CVE-ID: CVE-2017-0402>
lines_before: p->status = -EINVAL; is redundant.

Deduplication?

Is there any chance you performed deduplication on the code in MSR_data_cleaned.csv?

Thanks!

Mapping diff files to functions

In your README you say "Taking modified lines between the two mini-versions as flaw lines, we split the functions in the modified files into vulnerable functions (if there were flaw lines modified in the function) and non-vulnerable functions.". I've looked at your scripts and I can only find a diff_to _file function but no file_to_functions function. How are you parsing the files? Could you please share that function?

License?

Hello! What is the license of this repository?

How were "other non-vulnerable" functions collected?

On page 2, your paper says:

Thus we collected the following information for a project: vulnerable methods with their fixes and non-vulnerable other methods.

As far as I can tell, the paper does not explain in further detail how these "non-vulnerable other" methods were collected. I assume these functions are distinct from the after-fix version of the bug-fixing commits, since there are many more non-vulnerable functions than vulnerable. How did you collect the "other" methods to label as non-vulnerable?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.