skip to main content
10.1145/3611643.3616346acmconferencesArticle/Chapter ViewAbstractPublication PagesfseConference Proceedingsconference-collections
research-article
Open Access

Commit-Level, Neural Vulnerability Detection and Assessment

Published:30 November 2023Publication History

ABSTRACT

Software Vulnerabilities (SVs) are security flaws that are exploitable in cyber-attacks. Delay in the detection and assessment of SVs might cause serious consequences due to the unknown impacts on the attacked systems. The state-of-the-art approaches have been proposed to work directly on the committed code changes for early detection. However, none of them could provide both commit-level vulnerability detection and assessment at once. Moreover, the assessment approaches still suffer low accuracy due to limited representations for code changes and surrounding contexts.

We propose a Context-aware, Graph-based, Commit-level Vulnerability Detection and Assessment Model, VDA, that evaluates a code change, detects any vulnerability and provides the CVSS assessment grades. To build VDA, we have key novel components. First, we design a novel context-aware, graph-based, representation learning model to learn the contextualized embeddings for the code changes that integrate program dependencies and the surrounding contexts of code changes, facilitating the automated vulnerability detection and assessment. Second, VDA considers the mutual impact of learning to detect vulnerability and learning to assess each vulnerability assessment type. To do so, it leverages multi-task learning among the vulnerability detection and vulnerability assessment tasks, improving all the tasks at the same time. Our empirical evaluation shows that on a C vulnerability dataset, VDA achieves 25.5% and 26.9% relatively higher than the baselines in vulnerability assessment regarding F-score and MCC, respectively. In a Java dataset, it achieves 31% and 33.3% relatively higher than the baselines in F-score and MCC, respectively. VDA also relatively improves the vulnerability detection over the baselines from 13.4–322% in F-score.

Skip Supplemental Material Section

Supplemental Material

fse23main-p1185-p-video.mp4

"Software Vulnerabilities (SVs) are security flaws that are exploitable in cyber-attacks. Delay in the detection and assessment of SVs might cause serious consequences due to the unknown impacts on the attacked systems. The state-of-the-art approaches have been proposed to work directly on the committed code changes for early detection. However, none of them could provide both commit-level vulnerability detection and assessment at once. Moreover, the assessment approaches still suffer low accuracy due to limited representations for code changes and surrounding contexts. We propose a Context-aware, Graph-based, Commit-level Vulnerability Detection and Assessment Model, CAT, that evaluates a code change, detects any vulnerability and provides the CVSS assessment grades. To build CAT, we have key novel components. First, we design a novel context-aware, graph-based, representation learning model to learn the contextualized embeddings for the code changes that integrate program dependencies and the surrounding contexts of code changes, facilitating the automated vulnerability detection and assessment. Second, CAT considers the mutual impact of learning to detect vulnerability and learning to assess each of the vulnerability assessment types. To do so, it leverages multi-task learning among the vulnerability detection and vulnerability assessment tasks, improving all the tasks at the same time. Our empirical evaluation shows that on a C vulnerability dataset, CAT achieves F-score of 25.5% and MCC of 26.9% relatively higher than the baselines in vulnerability assessment. In a Java dataset, CAT achieves F-score of 31% and MCC of 33.3% relatively higher than the baselines as well. CAT also improves the vulnerability detection over the baselines from 13.4–322% in F-score."

mp4

61.1 MB

References

  1. [n. d.]. Silhouette (clustering). https://en.wikipedia.org/wiki/Silhouette_(clustering). Last Accessed March 15, 2022 Google ScholarGoogle Scholar
  2. [n. d.]. T-SNE. https://scikit-learn.org/stable/modules/generated/ sklearn.manifold.TSNE.html. Last Accessed March 9, 2022 Google ScholarGoogle Scholar
  3. 2021. Common Vulnerability Scoring System. https://www.first.org/cvss/ Google ScholarGoogle Scholar
  4. 2021. The NNI autoML tool. https://github.com/microsoft/nni Google ScholarGoogle Scholar
  5. 2023. CAT. https://github.com/vulnerability-assessment-cat/vulnerability-assessment-cat Google ScholarGoogle Scholar
  6. Luca Allodi and Fabio Massacci. 2014. Comparing vulnerability severity and exploits using case-control studies. ACM Transactions on Information and System Security (TISSEC), 17, 1 (2014), 1–20. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. Claudio Bellei, Hussain Alattas, and Nesrine Kaaniche. 2021. Label-GCN: An Effective Method for Adding Label Propagation to Graph Convolutional Networks. CoRR, abs/2104.02153 (2021), arXiv:2104.02153. arxiv:2104.02153 Google ScholarGoogle Scholar
  8. Mehran Bozorgi, Lawrence K Saul, Stefan Savage, and Geoffrey M Voelker. 2010. Beyond heuristics: learning to classify vulnerabilities and predict exploits. In Proceedings of the 16th ACM SIGKDD international conference on Knowledge discovery and data mining. 105–114. Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. Saikat Chakraborty, Rahul Krishna, Yangruibo Ding, and Baishakhi Ray. 2021. Deep learning based vulnerability detection: Are we there yet. IEEE Transactions on Software Engineering. Google ScholarGoogle ScholarCross RefCross Ref
  10. Xiang Chen, Yingquan Zhao, Zhanqi Cui, Guozhu Meng, Yang Liu, and Zan Wang. 2019. Large-scale empirical studies on effort-aware security vulnerability prediction methods. IEEE Transactions on Reliability, 69, 1 (2019), 70–87. Google ScholarGoogle ScholarCross RefCross Ref
  11. Davide Falessi, Jacky Huang, Likhita Narayana, Jennifer Fong Thai, and Burak Turhan. 2020. On the need of preserving order of data when validating within-project defect classifiers. Empirical Software Engineering, 25, 6 (2020), 4805–4830. Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. Jiahao Fan, Yi Li, Shaohua Wang, and Tien N. Nguyen. 2020. A C/C++ Code Vulnerability Dataset with Code Changes and CVE Summaries. In Proceedings of the 17th International Conference on Mining Software Repositories. Association for Computing Machinery, New York, NY, USA. 508–512. isbn:9781450375177 https://doi.org/10.1145/3379597.3387501 Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. Jeanne Ferrante, Karl J. Ottenstein, and Joe D. Warren. 1987. The Program Dependence Graph and Its Use in Optimization. ACM Trans. Program. Lang. Syst., 9, 3 (1987), jul, 319–349. issn:0164-0925 https://doi.org/10.1145/24039.24041 Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. Michael Fu and Chakkrit Tantithamthavorn. 2022. LineVul: A Transformer-based Line-Level Vulnerability Prediction. In 2022 IEEE/ACM 19th International Conference on Mining Software Repositories (MSR). 608–620. https://doi.org/10.1145/3524842.3528452 Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. J. Gorodkin. 2004. Comparing Two K-Category Assignments by a K-Category Correlation Coefficient. Comput. Biol. Chem., 28, 5–6 (2004), dec, 367–374. issn:1476-9271 https://doi.org/10.1016/j.compbiolchem.2004.09.006 Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. Zhuobing Han, Xiaohong Li, Zhenchang Xing, Hongtao Liu, and Zhiyong Feng. 2017. Learning to predict severity of software vulnerability using only vulnerability description. In 2017 IEEE International conference on software maintenance and evolution (ICSME). 125–136. Google ScholarGoogle ScholarCross RefCross Ref
  17. David Hin, Andrey Kan, Huaming Chen, and M Ali Babar. 2022. LineVD: Statement-level Vulnerability Detection using Graph Neural Networks. In International Conference on Mining Software Repositories (MSR’22). Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. Thong Hoang, Hong Jin Kang, David Lo, and Julia Lawall. 2020. CC2Vec: Distributed Representations of Code Changes. In Proceedings of the ACM/IEEE 42nd International Conference on Software Engineering (ICSE ’20). Association for Computing Machinery, New York, NY, USA. 518–529. isbn:9781450371216 https://doi.org/10.1145/3377811.3380361 Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. Alex Kendall, Yarin Gal, and Roberto Cipolla. 2018. Multi-task learning using uncertainty to weigh losses for scene geometry and semantics. In Proceedings of the IEEE conference on computer vision and pattern recognition. 7482–7491. Google ScholarGoogle Scholar
  20. Saad Khan and Simon Parkinson. 2018. Review into state-of-the-art of vulnerability assessment using artificial intelligence. In Guide to Vulnerability Analysis for Computer Networks and Systems. Springer, 3–32. Google ScholarGoogle Scholar
  21. Thomas N. Kipf and Max Welling. 2017. Semi-Supervised Classification with Graph Convolutional Networks. In 5th International Conference on Learning Representations, ICLR 2017, Toulon, France, April 24-26, 2017, Conference Track Proceedings. OpenReview.net. https://openreview.net/forum?id=SJU4ayYgl Google ScholarGoogle Scholar
  22. Ahmed Lamkanfi, Serge Demeyer, Emanuel Giger, and Bart Goethals. 2010. Predicting the severity of a reported bug. In 2010 7th IEEE Working Conference on Mining Software Repositories (MSR 2010). 1–10. Google ScholarGoogle ScholarCross RefCross Ref
  23. Triet Huynh Minh Le, Bushra Sabir, and Muhammad Ali Babar. 2019. Automated software vulnerability assessment with concept drift. In 2019 IEEE/ACM 16th International Conference on Mining Software Repositories (MSR). 371–382. Google ScholarGoogle Scholar
  24. Xin Li, Lu Wang, Yang Xin, Yixian Yang, and Yuling Chen. 2020. Automated vulnerability detection in source code using minimum intermediate representation learning. Applied Sciences, 10, 5 (2020), 1692. Google ScholarGoogle ScholarCross RefCross Ref
  25. Yi Li, Shaohua Wang, and Tien N. Nguyen. 2021. Vulnerability Detection with Fine-Grained Interpretations. In Proceedings of the 29th ACM Joint Meeting on European Software Engineering Conference and Symposium on the Foundations of Software Engineering. Association for Computing Machinery, New York, NY, USA. 292–303. isbn:9781450385626 https://doi.org/10.1145/3468264.3468597 Google ScholarGoogle ScholarDigital LibraryDigital Library
  26. Zhen Li, Deqing Zou, Shouhuai Xu, Zhaoxuan Chen, Yawei Zhu, and Hai Jin. 2021. Vuldeelocator: a deep learning-based fine-grained vulnerability detector. IEEE Transactions on Dependable and Secure Computing. Google ScholarGoogle Scholar
  27. Zhen Li, Deqing Zou, Shouhuai Xu, Hai Jin, Yawei Zhu, and Zhaoxuan Chen. 2021. Sysevr: A framework for using deep learning to detect software vulnerabilities. IEEE Transactions on Dependable and Secure Computing. Google ScholarGoogle Scholar
  28. Zhen Li, Deqing Zou, Shouhuai Xu, Xinyu Ou, Hai Jin, Sujuan Wang, Zhijun Deng, and Yuyi Zhong. 2018. Vuldeepecker: A deep learning-based system for vulnerability detection. arXiv preprint arXiv:1801.01681. Google ScholarGoogle Scholar
  29. Rocio Lozoya, Arnaud Baumann, Antonino Sabetta, and Michele Bezzi. 2019. commit2vec: Distributed Representation of Code Changes. Google ScholarGoogle Scholar
  30. Triet Huynh Minh Le, David Hin, Roland Croft, and M. Ali Babar. 2021. DeepCVA: Automated Commit-level Vulnerability Assessment with Deep Multi-task Learning. In 2021 36th IEEE/ACM International Conference on Automated Software Engineering (ASE). 717–729. https://doi.org/10.1109/ASE51524.2021.9678622 Google ScholarGoogle ScholarDigital LibraryDigital Library
  31. Kartik Nayak, Daniel Marino, Petros Efstathopoulos, and Tudor Dumitraş. 2014. Some vulnerabilities are different than others. In International Workshop on Recent Advances in Intrusion Detection. 426–446. Google ScholarGoogle ScholarCross RefCross Ref
  32. Profir-Petru Pârundefinedachi, Santanu Kumar Dash, Miltiadis Allamanis, and Earl T. Barr. 2020. Flexeme: Untangling Commits Using Lexical Flows. In Proceedings of the 28th ACM Joint Meeting on European Software Engineering Conference and Symposium on the Foundations of Software Engineering (ESEC/FSE 2020). Association for Computing Machinery, New York, NY, USA. 63–74. isbn:9781450370431 https://doi.org/10.1145/3368089.3409693 Google ScholarGoogle ScholarDigital LibraryDigital Library
  33. Henning Perl, Sergej Dechand, Matthew Smith, Daniel Arp, Fabian Yamaguchi, Konrad Rieck, Sascha Fahl, and Yasemin Acar. 2015. Vccfinder: Finding potential vulnerabilities in open-source projects to assist code audits. In Proceedings of the 22nd ACM SIGSAC Conference on Computer and Communications Security. 426–437. Google ScholarGoogle ScholarDigital LibraryDigital Library
  34. Serena Elisa Ponta, Henrik Plate, and Antonino Sabetta. 2018. Beyond metadata: Code-centric and usage-based analysis of known vulnerabilities in open-source software. In 2018 IEEE International Conference on Software Maintenance and Evolution (ICSME). 449–460. Google ScholarGoogle ScholarCross RefCross Ref
  35. Serena Elisa Ponta, Henrik Plate, and Antonino Sabetta. 2020. Detection, assessment and mitigation of vulnerabilities in open source dependencies. Empirical Software Engineering, 25, 5 (2020), 3175–3215. Google ScholarGoogle ScholarDigital LibraryDigital Library
  36. Rebecca Russell, Louis Kim, Lei Hamilton, Tomo Lazovich, Jacob Harer, Onur Ozdemir, Paul Ellingwood, and Marc McConley. 2018. Automated vulnerability detection in source code using deep representation learning. In 2018 17th IEEE International Conference on Machine Learning and Applications (ICMLA). 757–762. Google ScholarGoogle ScholarCross RefCross Ref
  37. Georgios Spanos and Lefteris Angelis. 2018. A multi-target approach to estimate software vulnerability characteristics and severity scores. Journal of Systems and Software, 146 (2018), 152–166. Google ScholarGoogle ScholarCross RefCross Ref
  38. Zhitao Ying, Dylan Bourgeois, Jiaxuan You, Marinka Zitnik, and Jure Leskovec. 2019. GNNExplainer: Generating Explanations for Graph Neural Networks. In Advances in Neural Information Processing Systems 32, H. Wallach, H. Larochelle, A. Beygelzimer, F. d' Alché-Buc, E. Fox, and R. Garnett (Eds.). Curran Associates, Inc., 9244–9255. Google ScholarGoogle Scholar
  39. Yaqin Zhou, Shangqing Liu, Jingkai Siow, Xiaoning Du, and Yang Liu. 2019. Devign: Effective vulnerability identification by learning comprehensive program semantics via graph neural networks. Advances in neural information processing systems, 32 (2019). Google ScholarGoogle Scholar
  40. Yaqin Zhou and Asankhaya Sharma. 2017. Automated identification of security issues from commit messages and bug reports. In Proceedings of the 2017 11th joint meeting on foundations of software engineering. 914–919. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Commit-Level, Neural Vulnerability Detection and Assessment

      Recommendations

      Comments

      Login options

      Check if you have access through your login credentials or your institution to get full access on this article.

      Sign in
      • Published in

        cover image ACM Conferences
        ESEC/FSE 2023: Proceedings of the 31st ACM Joint European Software Engineering Conference and Symposium on the Foundations of Software Engineering
        November 2023
        2215 pages
        ISBN:9798400703270
        DOI:10.1145/3611643

        Copyright © 2023 ACM

        Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than the author(s) must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected].

        Publisher

        Association for Computing Machinery

        New York, NY, United States

        Publication History

        • Published: 30 November 2023

        Permissions

        Request permissions about this article.

        Request Permissions

        Check for updates

        Qualifiers

        • research-article

        Acceptance Rates

        Overall Acceptance Rate112of543submissions,21%

        Upcoming Conference

        FSE '24
      • Article Metrics

        • Downloads (Last 12 months)441
        • Downloads (Last 6 weeks)71

        Other Metrics

      PDF Format

      View or Download as a PDF file.

      PDF

      eReader

      View online with eReader.

      eReader