Skip to main navigation Skip to search Skip to main content

Vulnerability detection via typestate-guided code representation learning

Research output: Chapter in Book/Report/Conference proceeding › Conference proceeding contribution › peer-review

Abstract

Machine learning, including deep learning, has found success in various domains. Recently, the focus has shifted to using deep learning, like graph neural networks, for static vulnerability detection. Existing methods represent code as an embedding vector and train models on safe and vulnerable code patterns to predict vulnerabilities. However, these models lack precise bug detection, as they prioritize coarse-grained classification over understanding vulnerability semantics, such as typestate properties. This paper introduces an innovative typestate-guided code embedding technique for accurate static vulnerability detection. We select and retain feasible typestate sequences extracted from typestate analysis using self-supervised contrastive learning in a pretrained path embedding model. This reduces the need for labeled data in training downstream models for vulnerability detection. Evaluation on real-world projects showcases our approach’s superiority over recent learning-based approaches. It outperforms them by substantial margins across various metrics like precision, recall and F1 Score.

Original languageEnglish
Title of host publicationFormal methods and software engineering
Subtitle of host publication24th International Conference on Formal Engineering Methods, ICFEM 2023, Brisbane, QLD, Australia, November 21-24, 2023, proceedings
EditorsYi Li, Sofiène Tahar
Place of PublicationSingapore
PublisherSpringer, Springer Nature
Pages291-297
Number of pages7
ISBN (Electronic)9789819975846
ISBN (Print)9789819975839
DOIs
Publication statusPublished - 2023
Externally publishedYes
Event24th International Conference on Formal Engineering Methods, ICFEM 2023 - Brisbane, Australia
Duration: 21 Nov 2023 → 24 Nov 2023

Publication series

NameLecture Notes in Computer Science
PublisherSpringer
Volume14308
ISSN (Print)0302-9743
ISSN (Electronic)1611-3349

Conference

Conference24th International Conference on Formal Engineering Methods, ICFEM 2023
Country/TerritoryAustralia
CityBrisbane
Period21/11/23 → 24/11/23

Keywords

  • code embedding
  • Typestate
  • vulnerabilities

Fingerprint

Dive into the research topics of 'Vulnerability detection via typestate-guided code representation learning'. Together they form a unique fingerprint.

Cite this