Prompt Injection Attacks on AI Coding Assistants - A Literature Survey and Layered Defense Framework
Department of Artificial Intelligence and Data Science, Ajeenkya DY Patil School of Engineering, Pune, India · India
Abstract
AI coding assistants are no longer limited to suggesting the next line of code. Many can inspect a repository, use external tools and execute commands for a developer. These features make them useful but also open up to a security concern: prompt injection. In this type of attack, untrusted text can steer a model away from the task it was given and may lead to actions such as exposing data or executing unsafe commands. This paper reviews eight studies published between 2022 and 2026, following the development of the topic from early chatbot attacks to attacks against agents that use tools. The studies are compared in a year-wise literature matrix and assessed across five capabilities. The review highlights four recurring gaps: limited evaluation focused specifically on coding assistants, insufficient testing against adaptive attackers, a separation between attack benchmarks and proposed defenses, and the absence of a combined defense architecture at the protocol level. Based on methods already discussed in the reviewed work, we outline a five-layer defense pipeline and suggest a way to evaluate it. This is a literature review not an implementation study; no model is trained and no new attack or defense is built nor tested.
Keywords
How to Cite This Article
Rights
BODHIVRUKSHA JOURNAL OF DIVERSE DISCIPLINE