Fine-grained Commit-level Vulnerability Type Prediction by CWE Tree Structure

被引:10
|
作者
Pan, Shengyi [1 ]
Bao, Lingfeng [1 ]
Xia, Xin [2 ]
Lo, David [3 ]
Li, Shanping [1 ]
机构
[1] Zhejiang Univ, Coll Comp Sci & Technol, Hangzhou, Peoples R China
[2] Huawei, Shenzhen, Peoples R China
[3] Singapore Management Univ, Sch Informat Syst, Singapore, Singapore
基金
美国国家科学基金会; 新加坡国家研究基金会;
关键词
Software Security; Vulnerability Type; CWE; CLASSIFICATION;
D O I
10.1109/ICSE48619.2023.00088
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
Identifying security patches via code commits to allow early warnings and timely fixes for Open Source Software (OSS) has received increasing attention. However, the existing detection methods can only identify the presence of a patch (i.e., a binary classification) but fail to pinpoint the vulnerability type. In this work, we take the first step to categorize the security patches into fine-grained vulnerability types. Specifically, we use the Common Weakness Enumeration (CWE) as the label and perform fine-grained classification using categories at the third level of the CWE tree. We first formulate the task as a Hierarchical Multi-label Classification (HMC) problem, i.e., inferring a path (a sequence of CWE nodes) from the root of the CWE tree to the node at the target depth. We then propose an approach named TREEVUL with a hierarchical and chained architecture, which manages to utilize the structure information of the CWE tree as prior knowledge of the classification task. We further propose a tree structure aware and beam search based inference algorithm for retrieving the optimal path with the highest merged probability. We collect a large security patch dataset from NVD, consisting of 6,541 commits from 1,560 GitHub OSS repositories. Experimental results show that TREEVUL significantly outperforms the best performing baselines, with improvements of 5.9%, 25.0%, and 7.7% in terms of weighted F1-score, macro F1-score, and MCC, respectively. We further conduct a user study and a case study to verify the practical value of TREEVUL in enriching the binary patch detection results and improving the data quality of NVD, respectively.
引用
收藏
页码:957 / 969
页数:13
相关论文
共 50 条
  • [31] Structure and mechanical properties of fine-grained steels
    1600, Budapest University of Technology and Economics (41):
  • [32] Microporous fine-grained copper: structure and properties
    Kumar, KS
    Duesbery, MS
    Louat, NP
    Provenzano, V
    DiPietro, MS
    PHILOSOPHICAL MAGAZINE A-PHYSICS OF CONDENSED MATTER STRUCTURE DEFECTS AND MECHANICAL PROPERTIES, 2001, 81 (05): : 1023 - 1040
  • [33] FINE-GRAINED STEREOTYPING AND THE STRUCTURE OF SOCIAL COGNITION
    LITMAN, GK
    POWELL, GE
    STEWART, RA
    JOURNAL OF SOCIAL PSYCHOLOGY, 1983, 120 (01): : 45 - 56
  • [34] Fine-grained Generalization Analysis of Structured Output Prediction
    Mustafa, Waleed
    Lei, Yunwen
    Ledent, Antoine
    Kloft, Marius
    PROCEEDINGS OF THE THIRTIETH INTERNATIONAL JOINT CONFERENCE ON ARTIFICIAL INTELLIGENCE, IJCAI 2021, 2021, : 2841 - 2847
  • [35] Fine-grained just-in-time defect prediction
    Pascarella, Luca
    Palomba, Fabio
    Bacchelli, Alberto
    JOURNAL OF SYSTEMS AND SOFTWARE, 2019, 150 : 22 - 36
  • [36] Fine-Grained Adaptive Testing Based on Quality Prediction
    Liu, Mengyun
    Pan, Renjian
    Ye, Fangming
    Li, Xin
    Chakrabarty, Krishnendu
    Gu, Xinli
    2018 IEEE INTERNATIONAL TEST CONFERENCE (ITC), 2018,
  • [37] Fine-Grained Emotion Prediction by Modeling Emotion Definitions
    Singh, Gargi
    Brahma, Dhanajit
    Rai, Piyush
    Modi, Ashutosh
    2021 9TH INTERNATIONAL CONFERENCE ON AFFECTIVE COMPUTING AND INTELLIGENT INTERACTION (ACII), 2021,
  • [38] A Fine-grained Approach for Power Consumption Analysis and Prediction
    Leite, Alessandro
    Tadonki, Claude
    Eisenbeis, Christine
    de Melo, Alba
    2014 INTERNATIONAL CONFERENCE ON COMPUTATIONAL SCIENCE, 2014, 29 : 2260 - 2271
  • [39] Text-Based Fine-Grained Emotion Prediction
    Singh, Gargi
    Brahma, Dhanajit
    Rai, Piyush
    Modi, Ashutosh
    IEEE TRANSACTIONS ON AFFECTIVE COMPUTING, 2024, 15 (02) : 405 - 416
  • [40] Word-Level Fine-Grained Story Visualization
    Li, Bowen
    COMPUTER VISION, ECCV 2022, PT XXXVI, 2022, 13696 : 347 - 362