CommitShield: Tracking Vulnerability Introduction and Fix in Version Control Systems

Fuente: arXiv
Enregistré dans:
Détails bibliographiques
Auteurs principaux: Wu, Zhaonan, Zhao, Yanjie, Wei, Chen, Wan, Zirui, Liu, Yue, Wang, Haoyu
Format: Preprint
Publié: 2025
Sujets:
Accès en ligne:
Tags: Ajouter un tag
Pas de tags, Soyez le premier à ajouter un tag!
_version_ 1866912179211468800
author Wu, Zhaonan
Zhao, Yanjie
Wei, Chen
Wan, Zirui
Liu, Yue
Wang, Haoyu
author_facet Wu, Zhaonan
Zhao, Yanjie
Wei, Chen
Wan, Zirui
Liu, Yue
Wang, Haoyu
contents Version control systems are commonly used to manage open-source software, in which each commit may introduce new vulnerabilities or fix existing ones. Researchers have developed various tools for detecting vulnerabilities in code commits, but their performance is limited by factors such as neglecting descriptive data and challenges in accurately identifying vulnerability introductions. To overcome these limitations, we propose CommitShield, which combines the code analysis capabilities of static analysis tools with the natural language and code understanding capabilities of large language models (LLMs) to enhance the accuracy of vulnerability introduction and fix detection by generating precise descriptions and obtaining rich patch contexts. We evaluate CommitShield using the newly constructed vulnerability repair dataset, CommitVulFix, and a cleaned vulnerability introduction dataset. Experimental results indicate that CommitShield improves recall by 76%-87% over state-of-the-art methods in the vulnerability fix detection task, and its F1-score improves by 15%-27% in the vulnerability introduction detection task.
format Preprint
id arxiv_https___arxiv_org_abs_2501_03626
institution arXiv
publishDate 2025
record_format arxiv
spellingShingle CommitShield: Tracking Vulnerability Introduction and Fix in Version Control Systems
Wu, Zhaonan
Zhao, Yanjie
Wei, Chen
Wan, Zirui
Liu, Yue
Wang, Haoyu
Software Engineering
Version control systems are commonly used to manage open-source software, in which each commit may introduce new vulnerabilities or fix existing ones. Researchers have developed various tools for detecting vulnerabilities in code commits, but their performance is limited by factors such as neglecting descriptive data and challenges in accurately identifying vulnerability introductions. To overcome these limitations, we propose CommitShield, which combines the code analysis capabilities of static analysis tools with the natural language and code understanding capabilities of large language models (LLMs) to enhance the accuracy of vulnerability introduction and fix detection by generating precise descriptions and obtaining rich patch contexts. We evaluate CommitShield using the newly constructed vulnerability repair dataset, CommitVulFix, and a cleaned vulnerability introduction dataset. Experimental results indicate that CommitShield improves recall by 76%-87% over state-of-the-art methods in the vulnerability fix detection task, and its F1-score improves by 15%-27% in the vulnerability introduction detection task.
title CommitShield: Tracking Vulnerability Introduction and Fix in Version Control Systems
topic Software Engineering
url https://arxiv.org/abs/2501.03626