Security of Language Models for Code: A Systematic Literature Review
Top Cited Papers
Open Access
- 17 June 2026
- journal article
- Published by Association for Computing Machinery (ACM) in ACM Transactions on Software Engineering and Methodology
- Vol. 35 (7) , 1-65
Abstract
Language Models for Code (CodeLMs) have emerged as powerful tools for code-related tasks, outperforming traditional methods and standard machine learning approaches. However, these models are susceptible to security vulnerabilities, drawing increasing research attention from domains such as software engineering, AI, and cybersecurity. Despite the growing body of research focused on the security of CodeLMs, a comprehensive survey in this area remains absent. To address this gap, we systematically review 68 relevant papers, organizing them based on attack and defense strategies. Furthermore, we provide an overview of commonly used language models, datasets, and evaluation metrics, and highlight open source tools and promising directions for future research in securing CodeLMs.Keywords
All Related Versions
Funding Information
- National Key Research and Development Program of China (2024YFF0908001)
- National Natural Science Foundation of China (U24A20337 and 62372228)
- National Research Foundation, Singapore, and DSO National Laboratories under the AI Singapore Programme (AISG2-GC-2023-008)
- National Research Foundation, Singapore, and the Cyber Security Agency of Singapore (NCRP25-P04-TAICeN)
This publication has 97 references indexed in Scilit:
- Structural Adversarial Attack for Code Representation Models2024
- A comparative study of adversarial training methods for neural models of source codeFuture Generation Computer Systems, 2022
- Mitigating backdoor attacks in LSTM-based text classification systems by Backdoor Keyword IdentificationNeurocomputing, 2021
- A survey on adversarial attacks and defencesCAAI Transactions on Intelligence Technology, 2021
- Pre-trained models: Past, present and futureAI Open, 2021
- Software Vulnerability Detection Using Deep Neural Networks: A SurveyProceedings of the IEEE, 2020
- Identifying relevant studies in software engineeringInformation and Software Technology, 2011
- Context-Dependent Pre-Trained Deep Neural Networks for Large-Vocabulary Speech RecognitionIEEE Transactions on Audio, Speech, and Language Processing, 2011
- Qualitative methods in empirical studies of software engineeringIEEE Transactions on Software Engineering, 1999
- Equation of State Calculations by Fast Computing MachinesThe Journal of Chemical Physics, 1953