Examining Zero-Shot Vulnerability Repair with Large Language Models
The DOI matches its OpenAlex record; 33 of the 33 references it cites were found in a registry or an index.
Abstract
Human developers can produce code with cybersecurity bugs. Can emerging ‘smart’ code completion tools help repair those bugs? In this work, we examine the use of large language models (LLMs) for code (such as OpenAI’s Codex and AI21’s Jurassic J-1) for zero-shot vulnerability repair. We investigate challenges in the design of prompts that coax LLMs into generating repaired versions of insecure code. This is difficult due to the numerous ways to phrase key information— both semantically and syntactically—with natural languages. We perform a large scale study of five commercially available, black-box, "off-the-shelf" LLMs, as well as an open-source model and our own locally-trained model, on a mix of synthetic, hand-crafted, and real-world security bug scenarios. Our experiments demonstrate that while the approach has promise (the LLMs could collectively repair 100% of our synthetically generated and hand-crafted scenarios), a qualitative evaluation of the model’s performance over a corpus of historical real-world examples highlights challenges in generating functionally correct code.
Overview
The claims and statistics of this paper haven’t been checked yet.
Free: it reads the open-access text and checks the first 5 claims that cite a source we can check. Create a free account to check every claim.
Integrity signals
Registry
Cites
Statistics
Verification
Claims the paper makes
The claims and statistics of this paper haven’t been checked yet.
Free: it reads the open-access text and checks the first 5 claims that cite a source we can check. Create a free account to check every claim.
Self-check
Percentages, sums and reported differences re-computed from the paper’s own numbers.
The self-check needs the paper’s full text.
Citations
Cites
Kaugeranna, R., Kaugeranna, E., & Aion, (. S. 4. 6. (2023) · DROPS (Schloss Dagstuhl – Leibniz Center for Informatics) · doi:10.4230/lipics.giscience.2023.43 · Cited by 13,690
2017 USENIX Annual Technical Conference (USENIX ATC'17)
Quoc, D. L., Beck, M. S., Bhatotia, P., Chen, R., Fetzer, C. W., & Strufe, T. (2017) · Cited by 3,091
Evaluating Large Language Models Trained on Code
Chen, M., Tworek, J., Jun, H., Yuan, Q., Pinto, H. P. D. O., Kaplan, J., Edwards, H., Burda, Y., Joseph, N., Brockman, G., et al. (2021) · arXiv · doi:10.48550/arxiv.2107.03374 · Cited by 1,436
GenProg: A Generic Method for Automatic Software Repair
Le Goues, C., Nguyen, T., Forrest, S., & Weimer, W. (2012) · IEEE Transactions on Software Engineering · doi:10.1109/tse.2011.104 · Cited by 1,085
Simplifying and isolating failure-inducing input
Zeller, A., & Hildebrandt, R. (2002) · IEEE Transactions on Software Engineering · doi:10.1109/32.988498 · Cited by 1,079
A new algorithm for data compression
Gage, P. (1994) · C/C++ users journal · doi:10.5555/177910.177914 · Cited by 700
A systematic evaluation of large language models of code
Xu, F. F., Alon, U., Neubig, G., & Hellendoorn, V. J. (2022) · Proceedings of the 6th ACM SIGPLAN International Symposium on Machine Programming · doi:10.1145/3520312.3534862 · Cited by 540
An analysis of patch plausibility and correctness for generate-and-validate patch generation systems
Qi, Z., Long, F., Achour, S., & Rinard, M. (2015) · Proceedings of the 2015 International Symposium on Software Testing and Analysis · doi:10.1145/2771783.2771791 · Cited by 420
SEQUENCER: Sequence-to-Sequence Learning for End-to-End Program Repair
Chen, Z., Kommrusch, S. J., Tufano, M., Pouchet, L.-N., Poshyvanyk, D., & Monperrus, M. (2021) · IEEE Transactions on Software Engineering · doi:10.1109/tse.2019.2940179 · Cited by 396
Program Synthesis with Large Language Models
Austin, J., Odena, A., Nye, M., Bosma, M., Michalewski, H., Dohan, D., Jiang, E., Cai, C., Terry, M., Le, Q., et al. (2021) · arXiv · doi:10.48550/arxiv.2108.07732 · Cited by 388
An Empirical Study on Learning Bug-Fixing Patches in the Wild via Neural Machine Translation
Tufano, M., Watson, C., Bavota, G., Penta, M. D., White, M., & Poshyvanyk, D. (2019) · ACM Transactions on Software Engineering and Methodology · doi:10.1145/3340544 · Cited by 370
CoCoNuT: combining context-aware neural translation models using ensemble for program repair
Lutellier, T., Pham, H. V., Pang, L., Li, Y., Wei, M., & Tan, L. (2020) · Proceedings of the 29th ACM SIGSOFT International Symposium on Software Testing and Analysis · doi:10.1145/3395363.3397369 · Cited by 344
Automatic Software Repair: A Bibliography
Monperrus, M. (2019) · ACM Computing Surveys · doi:10.1145/3105906 · Cited by 321
CURE: Code-Aware Neural Machine Translation for Automatic Program Repair
Jiang, N., Lutellier, T., & Tan, L. (2021) · 2021 IEEE/ACM 43rd International Conference on Software Engineering (ICSE) · doi:10.1109/icse43902.2021.00107 · Cited by 290
Wang, Q., Wen, C., Liu, D., Han, X., Yu, B., Chen, P., Qin, S., & Tian, C. (2023) · DROPS (Schloss Dagstuhl – Leibniz Center for Informatics) · doi:10.4230/lipics.esem.2026.25 · Cited by 282
Li, J., Zhao, B., & Zhang, C. (2018) · Cybersecurity · doi:10.1186/s42400-018-0002-y · Cited by 278
A Large-Scale Empirical Study of Security Patches
Li, F., & Paxson, V. (2017) · Proceedings of the 2017 ACM SIGSAC Conference on Computer and Communications Security · doi:10.1145/3133956.3134072 · Cited by 241
Quality analysis of source code comments
Steidl, D., Hummel, B., & Juergens, E. (2013) · 2013 21st International Conference on Program Comprehension (ICPC) · doi:10.1109/icpc.2013.6613836 · Cited by 199
Tufano, M., Watson, C., Bavota, G., Di Penta, M., White, M., & Poshyvanyk, D. (2018) · Proceedings of the 33rd ACM/IEEE International Conference on Automated Software Engineering · doi:10.1145/3238147.3240732 · Cited by 133
NLP (Natural Language Processing) for NLP (Natural Language Programming)
Mihalcea, R. F., Liu, H., & Lieberman, H. A. (2006) · Lecture notes in computer science · doi:10.1007/11671299_34 · Cited by 105
Failure sketching: a technique for automated root cause diagnosis of in-production failures
Kasikci, B., Schubert, B., Pereira, C. L., Pokam, G., & Candea, G. (2015) · ACM SIGOPS Symposium on Operating Systems Principles (SOSP) · doi:10.1145/2815400.2815412 · Cited by 104
Using likely invariants for automated software fault localization
Sahoo, S. K., Criswell, J., Geigle, C., & Adve, V. (2013) · International Conference on Architectural Support for Programming Languages and Operating Systems (ASPLOS) · doi:10.1145/2451116.2451131 · Cited by 99
Isolating failure-inducing thread schedules
Choi, J.-D., & Zeller, A. (2002) · ACM SIGSOFT International Symposium on Software Testing and Analysis (ISSTA) · doi:10.1145/566172.566211 · Cited by 84
Beyond Tests: Program Vulnerability Repair via Crash Constraint Extraction
Gao, X., Wang, B., Duck, G. J., Ji, R., Xiong, Y., & Roychoudhury, A. (2021) · ACM Transactions on Software Engineering and Methodology · doi:10.1145/3418461 · Cited by 70
/*icomment: bugs or bad comments?*/
Tan, L., Yuan, D., Krishna, G., & Zhou, Y. (2007) · ACM SIGOPS Operating Systems Review · doi:10.1145/1323293.1294276 · Cited by 52
Generating bug-fixes using pretrained transformers
Drain, D., Wu, C., Svyatkovskiy, A., & Sundaresan, N. (2021) · Proceedings of the 5th ACM SIGPLAN International Symposium on Machine Programming · doi:10.1145/3460945.3464951 · Cited by 45
Automated Bug Hunting With Data-Driven Symbolic Root Cause Analysis
Yagemann, C., Chung, S. P. H., Saltaformaggio, B., & Lee, W. (2021) · ACM SIGSAC Conference on Computer and Communications Security (CCS) · doi:10.1145/3460120.3485363 · Cited by 37
Is there a correlation between code comments and issues? an exploratory study
Misra, V., Reddy, J. S. K., & Chimalakonda, S. (2020) · ACM Symposium on Applied Computing · doi:10.1145/3341105.3374009 · Cited by 26
Fix that Fix Commit: A real-world remediation analysis of JavaScript projects
Bandara, V., Rathnayake, T., Weerasekara, N., Elvitigala, C., Thilakarathna, K., Wijesekera, P., & Keppitiyagama, C. (2020) · 2020 IEEE 20th International Working Conference on Source Code Analysis and Manipulation (SCAM) · doi:10.1109/scam51674.2020.00027 · Cited by 23
An Empirical Cybersecurity Evaluation of GitHub Copilot's Code ContributionsPreprint
Pearce, H. A., Ahmad, B., Tan, B., Dolan-Gavitt, B., & Karri, R. (2021) · arXiv (Cornell University) · Cited by 17
Self-citationThe Secret Life of Commented-Out Source Code
Pham, T. M. T., & Yang, J. (2020) · International Conference on Program Comprehension · doi:10.1145/3387904.3389259 · Cited by 10
Generating formal system models from natural language descriptions
Drechsler, R., Harris, I. G., & Wille, R. (2012) · Proceedings · doi:10.1109/hldvt.2012.6418259 · Cited by 7
Cited by
Large Language Models for Software Engineering: A Systematic Literature Review
Hou, X., Zhao, Y., Liu, Y., Yang, Z., Wang, K., Li, L., Luo, X., Lo, D., Grundy, J., & Wang, H. (2024) · ACM Transactions on Software Engineering and Methodology · doi:10.1145/3695988 · Cited by 1,029
Large language models for software engineering: survey and open problems
Fan, A., Gokkaya, B., Harman, M., Lyubarskiy, M., Sengupta, S., Yoo, S., & Zhang, J. M. (2023) · 2023 IEEE/ACM International Conference on Software Engineering: Future of Software Engineering (ICSE-FoSE) · doi:10.1109/icse-fose59343.2023.00008 · Cited by 650
Software Testing With Large Language Models: Survey, Landscape, and Vision
Wang, J., Huang, Y., Chen, C., Liu, Z., Wang, S., & Wang, Q. (2024) · IEEE Transactions on Software Engineering · doi:10.1109/tse.2024.3368208 · Cited by 573
Large Language Models for Software Engineering: Survey and Open Problems
Fan, A., Gokkaya, B., Harman, M., Lyubarskiy, M., Sengupta, S., Yoo, S., & Zhang, J. M. (2023) · arXiv · doi:10.48550/arxiv.2310.03533 · Cited by 523
ChatGPT and Software Testing Education: Promises & Perils
Jalil, S., Rafi, S., LaToza, T. D., Moran, K., & Lam, W. (2023) · 2023 IEEE International Conference on Software Testing, Verification and Validation Workshops (ICSTW) · doi:10.1109/icstw58534.2023.00078 · Cited by 270
Metadata
- Authors
- Pearce, H. A., Tan, B., Ahmad, B., Karri, R., & Dolan-Gavitt, B.
- Venue
- Proceedings - IEEE Symposium on Security and Privacy/Proceedings of the ... IEEE Symposium on Security and Privacy
- Publisher
- IEEE Computer Society
- Published
- 2023-05-01
- Pages
- 2339-2356
- ISSN
- 1081-6011 (ISSN-L)
- OpenAlex
- W4385187421
- Cited by
- 189
- References
- 33
- FWCI
- 50.37
- Type
- conference paper
- Language
- en
- Open access
- closed
About these checks
Registry, retraction, Cites and statistics results are computed, not judged, with one exception: a printed reference that no index lists is read once by a model before it counts as a citation error. Claims are extracted by a model and kept only when their quote appears verbatim in the text; each cited source is then checked, with a model’s help, for whether it says what the claim relies on. Those verdicts can be wrong — read the claim’s quote and the cited source before relying on one.
Statistics and arithmetic are recomputed, not judged.
Confidence bands are shown only for fields calibrated on our annotated test set. None is calibrated yet, so no band is shown.
What counts as a claim ›How we measure confidence ›How we check this ›
Are you an author, or do you see a problem with this page? Request a review
Data sources
Bibliographic data: Semantic Scholar, OpenAlex, Crossref.
Contains information from the Semantic Scholar Academic Graph Datasets, made available under the ODC Attribution License (ODC-BY 1.0).
Semantic Scholar’s data is described in: Kinney, R., et al. (2023). The Semantic Scholar Open Data Platform. arXiv:2301.10140.