Just-in-Time Security Patch Detection -- LLM At the Rescue for Data Augmentation

Tang, Xunzhu and Chen, Zhenghan and Kim, Kisub and Tian, Haoye and Ezzini, Saad and Klein, Jacques (2023) Just-in-Time Security Patch Detection -- LLM At the Rescue for Data Augmentation. Other. UNSPECIFIED.

[thumbnail of pdf]
Other (pdf)
2312.01241 - Accepted Version
Available under License Creative Commons Attribution-NonCommercial.

Download (3MB)

Abstract

In the face of growing vulnerabilities found in open-source software, the need to identify {discreet} security patches has become paramount. The lack of consistency in how software providers handle maintenance often leads to the release of security patches without comprehensive advisories, leaving users vulnerable to unaddressed security risks. To address this pressing issue, we introduce a novel security patch detection system, LLMDA, which capitalizes on Large Language Models (LLMs) and code-text alignment methodologies for patch review, data enhancement, and feature combination. Within LLMDA, we initially utilize LLMs for examining patches and expanding data of PatchDB and SPI-DB, two security patch datasets from recent literature. We then use labeled instructions to direct our LLMDA, differentiating patches based on security relevance. Following this, we apply a PTFormer to merge patches with code, formulating hybrid attributes that encompass both the innate details and the interconnections between the patches and the code. This distinctive combination method allows our system to capture more insights from the combined context of patches and code, hence improving detection precision. Finally, we devise a probabilistic batch contrastive learning mechanism within batches to augment the capability of the our LLMDA in discerning security patches. The results reveal that LLMDA significantly surpasses the start of the art techniques in detecting security patches, underscoring its promise in fortifying software maintenance.

Item Type:
Monograph (Other)
Subjects:
?? computer science - cryptography and securitycomputer science - artificial intelligence ??
ID Code:
212321
Deposited By:
Deposited On:
12 Jan 2024 11:05
Refereed?:
No
Published?:
Published
Last Modified:
20 Nov 2024 01:59