A Study of Vulnerability Repair in JavaScript Programs with Large Language Models

Tan Khang Le, Saba Alimadadi, Steven Y. Ko
3/19/2024
cs.CRcs.AI

No confident code implementation found for this paper. 2 possible matches can be shown below.

Abstract

In recent years, JavaScript has become the most widely used programming language, especially in web development. However, writing secure JavaScript code is not trivial, and programmers often make mistakes that lead to security vulnerabilities in web applications. Large Language Models (LLMs) have demonstrated substantial advancements across multiple domains, and their evolving capabilities indicate their potential for automatic code generation based on a required specification, including automatic bug fixing. In this study, we explore the accuracy of LLMs, namely ChatGPT and Bard, in finding and fixing security vulnerabilities in JavaScript programs. We also investigate the impact of context in a prompt on directing LLMs to produce a correct patch of vulnerable JavaScript code. Our experiments on real-world software vulnerabilities show that while LLMs are promising in automatic program repair of JavaScript code, achieving a correct bug fix often requires an appropriate amount of context in the prompt.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. 2 weaker matches are hidden by default — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{le2024study,
  title  = {A Study of Vulnerability Repair in JavaScript Programs with Large Language Models},
  author = {Tan Khang Le and Saba Alimadadi and Steven Y. Ko},
  year   = {2024},
  eprint = {2403.13193},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2403.13193v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2403.13193.svg)](https://codeofpaper.com/paper/2403.13193)

Discussion