arXiv:2608.30686cs.CRAug 2026Cited by 1 paper on PaperVantage

Manuscript Offprint

arXiv:2608.30686

Beyond the Payload: How User Invocation Shapes Coding Agent Vulnerability to Repository Poisoning

Fukang Zhu, Binbin Zhao, Ruixiao Lin, Ping He, Tianyu Du, Shouling Ji

Abstract

Coding agents are increasingly used for software engineering tasks, including bootstrapping projects from third-party repositories whose integrity cannot be assumed. Prior work on repository poisoning largely focuses on attacker-controlled injection and disguise, but developers also shape risk through everyday invocation choices: what task to delegate, how to phrase the request, and which skills or rules to supply. We term these user-side choices Prompt-Level Configurations (PLCs) and introduce CIPR (Coding In Poisoned Repos), the first benchmark that systematically varies PLCs in poisoned real-world repositories. CIPR comprises 1,920 instances across 20 repositories, four task types, three social-media-grounded prompt styles, and three skill/rule conditions, and measures attack success rate (ASR) and agent alert rate (AR) using automated runtime and trace-based oracles. Our evaluation reveals two key insights: (1) Vulnerability is highly context-dependent, with task type creating up to a 4.5-fold difference in ASR, with test-execution task forming a silent attack surface (high ASR, low AR). (2) Prompt expression shifts risk indirectly: underspecified prompts reduce ASR by truncating execution depth; noisy prompts exhibit a directional trend toward suppressing alerts by making malicious content less conspicuous. These findings highlight that coding agent vulnerability is not a static property, but a dynamic outcome shaped by everyday user configurations. 1^{1}

1 Introduction

The rise of vibe coding has made coding agents increasingly common in software engineering tasks, enabling developers to delegate software engineering (SE) tasks with minimal intervention (Stack Overflow, 2025; SonarSource, 2025). However, this reliance becomes risky when bootstrapping projects from third-party repositories whose integrity cannot be assumed. Prior incidents show two relevant paths: malicious repositories can gain popularity through fake-star campaigns (He et al., 2024), while trusted repositories can be poisoned through maintainer-account compromise (Kurmi, 2026). The security implications of such injections for coding agent users have begun to attract attention (Lynch and Harang, 2025; Maloyan and Namiot, 2026).

Recent studies have started to characterize repository poisoning in the coding-agent setting. They examined injection surfaces in coding agents, including agent skills (Qu et al., 2026), agent rules (Liu et al., 2025), and README files (Kao et al., 2026). These studies largely emphasize attacker-controlled factors: how to do the injections, and how to disguise them. What remains underexplored is the user's prompt-level interaction with the agent. This represents a fundamental paradigm shift in threat modeling: moving beyond how attackers actively craft payloads, to how the success of a static payload is governed by the benign user's invocation.

In real-world practice, users make concrete choices about how to interact with agents: what specific SE task to assign, how to phrase the request, and which skills/rules to supply. If certain everyday invocation patterns inadvertently lower an agent's defenses, practitioners need to know which configurations to avoid, yet current understanding offers little guidance. We conceptualize these user-controlled choices as Prompt-Level Configurations (PLCs). In this paper, PLCs include task type, user prompt expression, and skills/rules text provided to the agent. Studying PLCs is vital because an agent's mental model is intrinsically shaped by its execution context. Unlike surface-level prompt sensitivity observed in single-turn generation, PLCs

∗^{*}Corresponding author.

1^{1}The dataset and the code used to execute the experiments are available on GitHub: https://github.com/StarConnor/CIPR induce system-level shifts in how an agent explores and executes within its environment. If an agent demonstrates resilience under a canonical prompt but becomes vulnerable under user variations, existing evaluations may provide an incomplete sense of security.

Conducting such an investigation involves three concrete challenges. Challenge I: Constructing realistic repository scenarios. Meaningful results require repositories that are representative of real developer workflows: functional, testable, and spanning diverse languages and task types. Existing benchmarks typically rely on curated instances instead of repositories that combine all of these properties. Challenge II: Grounding prompt styles in real-world usage. Prompt expression must reflect how developers actually invoke coding agents, not arbitrary researcher-defined styles. This requires collecting and systematically categorizing prompts from real usage, then use the results to map the task to prompts. Challenge III: Designing oracles for the evaluation. We use two metrics to measure the security of the coding agents, ASR (Attack Success Rate) and AR (Alert Rate). They capture complementary security signals: ASR indicates whether the attack actually succeeded, while AR indicates whether the agent recognized the risk.

To address these challenges, we propose CIPR (Coding In Poisoned Repos), a benchmark focusing on user-side PLCs. To address Challenge I, we propose a multi-stage review method to collect the repos: we select 4 most used programming languages (Python, JavaScript, C, Java), then screen candidate repositories for functional completeness, namely valid closed issues, executable test suites, and build configurations, while balancing across application domains and complexity levels to assure comprehensiveness. To address Challenge II, we propose a data-driven method to derive prompt styles from real-world usage: we collect 1,200+ prompts of using coding agents from social media, filter and score each prompt on 12 stylistic dimensions using an LLM, and cluster the results to identify the prompt styles used in our benchmark. To address Challenge III, we design separate automated oracles for ASR and AR: attack success is determined by intercepting outbound requests via a mock HTTP server, and agent alertness is assessed by analyzing conversational traces.

Our contributions are as follows:

(1) We introduce CIPR, the first benchmark containing 1,920 instances for evaluating how

Figure

Figure 1: Threat model. The attacker (right) injects malicious payloads into repository files via methods such as malicious PRs or account compromise. The user (left) invokes a coding agent with a task, prompt expression, and skills/rules; if the agent processes the injected content, the attack succeeds.

user-side prompt-level configurations affect coding agent vulnerability to repository poisoning.

(2) We construct a controlled benchmark pipeline combining real repositories, task-specific injections, social-media-grounded prompt styles, controlled skill/rule configurations, and automated oracles for attack success and agent alertness.

(3) We provide an empirical analysis of PLC effects, yielding two findings: task type creates up to a 4.5-fold difference in ASR, with test-execution forming a silent attack surface (high ASR, low AR) because agents treat injected files as infrastructure rather than configurations to audit; prompt expression shifts risk indirectly: underspecified prompts reduce ASR by truncating execution depth, while noisy prompts exhibit a directional trend toward suppressing alerts by making malicious content less conspicuous.