GitInject: Real-World Prompt Injection Attacks in AI-Powered CI/CD Pipelines

arXiv:2606.09935 · cs.CR, cs.AI · Submitted 2026-06-07 · Read on arXiv

Listen

Radio episode about this paper

Transcript

Introduction to the show: ident: Security Radio. Generated commentary on the latest security and cryptography papers.

Nadia: We're looking at the paper: "GitInject: Real-World Prompt Injection Attacks in AI-Powered CI/CD Pipelines".

Elias: Here's the gist of the paper. AI-powered agents are increasingly embedded in continuous integration and continuous delivery/deployment (CI/CD) pipelines to autonomously review pull requests (PRs), triage issues, and maintain codebases, making them a natural target for prompt injection attacks with supply chain consequences <ref:2606.09935#pg2> The central finding is structural: config-file injection delivers attacker payloads at operator trust level by exploiting the same channel that makes provider configuration files useful <ref:2606.09935#pg9> The Threat Model Context AI-powered CI/CD agents occupy a fundamentally privileged position because they "hold a GITHUB TOKEN with repository write access, can execute shell commands in the CI runner, and post comments visible to all contributors" <ref:2606.09935#pg4> The critical trust boundary is the agent’s context window, which collapses "trusted operator instructions (system prompt, workflow YAML configuration, provider action prompts) and untrusted external content (PR titles, bodies, issue text)" <ref:2606.09935#pg5> The adversary model assumes a remote, low-privileged adversary who can submit content through public interfaces like opening a pull request or posting issue comments <ref:2606.09935#pg6> Attack Surface Characterization The paper identifies two injection pathways with different threat profiles: PR/issue body injection and config-file injection <ref:2606.09935#pg8> PR/issue body injection involves embedding a malicious payload in a PR body or issue field that is interpolated verbatim into the agent’s prompt at the user-turn trust level <ref:2606.09935#pg9> Config-file injection is characterized as an adversary adding or modifying a provider configuration file (like GEMINI.md) in a PR branch, which "loads them as authoritative operator-level instructions before any PR content is processed" <ref:2606.09935#pg9> Evaluation Methodology and Findings GitInject is an open-source framework that provisions ephemeral repositories and triggers actual workflow runs to evaluate prompt injection vulnerabilities in real, live GitHub workflows <ref:2606.09935#pg2> The evaluation compares the framework against AgentDojo, showing that simulation is "structurally insufficient for this deployment setting" because it misses 71.2% of confirmed real attacks <ref:2606.09935#pg5> Eleven named attacks are documented across four attack classes spanning four AI providers <ref:2606.09935#pg9> Countermeasures and Structural Vulnerabilities The most critical vulnerabilities exploit "credential-storage decisions made by actions/checkout, which no existing simulator models" <ref:2606.09935#pg2> The minimum-cost workflow-level countermeasure identified is "persist-credentials: false," which eliminates pr body github token exfiltration at zero utility cost <ref:2606.09935#pg9> Tool restriction is the broadest single defense, blocking the shell phase of config-file exfiltration and denial-of-wallet attacks <ref:2606.09935#pg5> Judgment manipulation remains the hardest variant to address with workflow controls alone, requiring "author filtering or a human reviewer in the loop" <ref:2606.09935#pg9> Generalization Beyond GitHub Actions The structural preconditions for these attacks are present on every major CI/CD platform with agentic features, including GitLab Duo and Bitbucket Agentic Pipelines <ref:2606.09935#pg9> The paper confirms that the provider configuration file injection vector has a "direct structural analogue on both platforms" <ref:2606.09935#pg9> The root cause is platform-agnostic, as both platforms treat provider configuration files as trusted agent instructions <ref:2606.09935#pg9> GitInject is released publicly to facilitate further research in this direction <ref:2606.09935#pg2> The central finding is structural, demonstrating that "no amount of model-side alignment can reliably distinguish a legitimate project preference from a malicious override" <ref:2606.09935#pg9> GitInject is not an exhaustive benchmark but an execution framework for reproducing and evaluating individual CI/CD prompt-injection cases under real infrastructure semantics <ref:2606.09935#pg2> The minimum recommended baseline for any AI-powered PR review workflow is the combination of "persist-credentials: false and tool restriction" <ref:2606.09935#pg9> The framework is designed to be extended along three orthogonal axes without modifying framework internals <ref:2606.09935#pg2> The paper concludes that "GitInject is released publicly to facilitate further research in this direction" <ref:2606.09935#pg2>.

Title and authors: Elias: So, we're starting with the title and the people behind this work, "GitInject: Real-World Prompt Injection Attacks in AI-Powered CI/CD Pipelines". We need to understand what that actually means for the security landscape.

Nadia: It’s about moving away from simulations and into real infrastructure. The authors are Jafar Isbarov, Umid Suleymanov, and Ilia Shumailov from AI Sequrity Company, with Murat Kantarcioglu at Virginia Tech.

Elias: It's interesting because the paper isn't just theorizing about how prompt injection works; it’s building a framework that actually provisions ephemeral repositories and triggers actual workflow runs on live GitHub workflows.

Priya: That real execution aspect is important because it means they can test credential handling and permission boundaries exactly as they would exist in a production environment, which is something simulators often miss.

Nadia: Right. They are looking at how these agents ingest untrusted content like PR bodies or issue text and how that input gets mixed with the agent's instructions to cause problems.

Elias: And the implication of this framework is that it allows researchers to document eleven named attacks spanning four different AI providers, showing that this vulnerability isn't some rare edge case but something every tested provider is susceptible to in its default configuration.

The paper's summary: Nadia: The paper summarizes the core finding around how these attacks happen through two main pathways: PR body injection and config-file injection. One pathway involves embedding malicious input directly into a pull request body or issue field, which is then interpolated verbatim into the agent's prompt at the user trust level.

Elias: And the second pathway is config-file injection, which involves an attacker adding or modifying a provider configuration file, like a GEMINI dot md file in a pull request. The critical point here is that these configuration files are loaded as authoritative operator-level instructions before any of that PR content is even processed.

Priya: That structural difference seems key. It suggests that the way agents process trusted project guidance from a config file versus untrusted user input changes the entire security model of the attack.

Nadia: Precisely. The paper shows that this configuration file injection turns low-trust PR input into high-trust project guidance, which can lead to things like secret exfiltration or missed bugs because the agent trusts that configuration over the user's content.

Elias: And they show this happens across various layers: from the initial payload being embedded in a pull request body, through the LLM agent making inferences, and finally through sandbox execution and credential handling.

Priya: It’s interesting because they track these attacks end-to-end by inspecting the ground truth of the repository state via the GitHub API, which gives them a concrete view of what actually happened when things go wrong.

The paper's improvements: Nadia: The paper discusses several countermeasures, and one improvement they highlight as very low cost is something called "persist-credentials: false" at the action checkout level. This setting eliminates the exfiltration of the GITHUB TOKEN from the repository configuration file, which is a confirmed vector for credential theft.

Elias: That makes sense from a cryptographic standpoint, limiting where and when that token can be stored on disk. They also point to tool restriction as a broad defense that blocks shell phases, which stops config-file exfiltration and denial-of-wallet attacks at the agent level.

Priya: But I wonder about judgment manipulation attacks targeting those configuration files. The authors admit that workflow controls alone aren't enough for those because they involve instructions, not just direct code execution.

Nadia: That's true, and the paper suggests that for judgment manipulation, you need something stronger than just workflow settings; they point towards author filtering or having a human reviewer in the loop as the minimum recommended baseline defense.

Elias: They also developed a way to address Denial-of-Wallet attacks by suggesting custom workflow logic to implement input size checks before invoking the model, which would reduce the cost of those specific attacks, though that requires writing custom code outside of standard action interfaces.

Priya: And they also touch on human approval as a cross-cutting defense for workflows accepting external contributions because they feel that provides a hard guarantee against those configuration file payloads that might look like legitimate project preferences.

Conclusion: Nadia: So, to wrap up the GitInject paper, the main message is structural: no amount of aligning the model side can reliably distinguish a legitimate project preference from a malicious override in these agent systems. The framework is useful because it shows that configuration files are treated as high-priority instructions regardless of where they come from.

Elias: And they stress that credential exfiltration prevention, specifically setting persist-credentials false, and tool restriction are the minimum recommended baseline defenses for any AI-powered pull request review workflow you're considering.

Priya: From a measurement standpoint, it confirms that the structural vulnerability in how instructions are prioritized is real across different AI providers and different CI/CD platforms because those underlying mechanisms treat configuration files as trusted agent instructions.

Nadia: It’s a lot of context on how these agents operate with such high privileges, and it shows that we need to focus our defenses on the structure of instruction loading rather than just trying to patch individual input prompts.

Elias: Yeah, so even if you get model alignment perfect, the mechanism for loading instructions from a configuration file can still be exploited in this way.

Priya: It really puts the onus on making sure that when an agent loads something from a config file, it doesn't automatically elevate that instruction to the same level as its own system prompt.

Nadia: Exactly. We’re moving from thinking about model alignment to thinking about how the execution environment itself is set up to handle these instructions securely in real CI/CD environments.

Elias: That’s what this GitInject work lays out, showing us exactly where the gaps are in the current setup for agent security in development pipelines.

Jafar Isbarov, Umid Suleymanov, Ilia Shumailov, Murat Kantarcioglu

Virginia Tech · AI Sequrity Company

cs.CR, cs.AI

Submitted: 2026-06-07

Updated: 2026-11-02

Code: https://github.com/ceferisbarov/GitInject

License: http://creativecommons.org/licenses/by/4.0/

Importance score: 92/100

The gist: AI-powered agents are increasingly embedded in continuous integration and continuous delivery/deployment (CI/CD) pipelines to autonomously review pull requests (PRs), triage issues…

Key concepts

Config-file Injection
This attack involves an adversary modifying a provider configuration file, such as GEMINI.md, within a pull request. The agent loads this file as trusted operator instructions before processing any actual code content. This exploits the channel used for providing useful configurations to inject malicious commands or instructions directly into the agent's core behavior.
Trust Boundary Collapse
The critical trust boundary for AI agents is their context window, which mixes trusted operator instructions (like system prompts) with untrusted external content (like PR bodies). Attacks exploit this collapse by embedding malicious payloads in user-controllable fields, tricking the agent into executing unintended actions based on the combined input.
Structural Vulnerability
The central finding is that config-file injection is a structural problem, not just a model alignment issue. It exploits the fundamental design where configuration files are treated as authoritative instructions. This means that no amount of fine-tuning or model guardrails can reliably distinguish between legitimate project preferences and malicious overrides.

Terminology

Summary

AI-powered agents are increasingly embedded in continuous integration and continuous delivery/deployment (CI/CD) pipelines to autonomously review pull requests (PRs), triage issues, and maintain codebases, making them a natural target for prompt injection attacks with supply chain consequences <ref:2606. p. 0

Where the paper says it

edu Umid Suleymanov Virginia Tech Blacksburg, VA, USA Ilia Shumailov AI Sequrity Company London, UK Murat Kantarcioglu Virginia Tech Blacksburg, VA, USA Abstract AI-powered agents are increasingly embedded in continuous integration and continuous delivery/deployment (CI/CD) pipelines to autonomously review pull requests (PRs), triage issues, and maintain codebases. These agents ingest untrusted content while operating with elevated repository permissions, making them a natural target for prompt injection attacks with supply chain consequences.

09935#pg2> The central finding is structural: config-file injection delivers attacker payloads at operator trust level by exploiting the same channel that makes provider configuration files useful <ref:2606. p. 8
Where the paper says it

Across four providers, we document eleven named attacks in four classes. The central finding is structural: config-file injection delivers attacker payloads at operator trust level by exploiting the same channel that makes provider configuration files useful.

09935#pg9>

The Threat Model Context

AI-powered CI/CD agents occupy a fundamentally privileged position because they hold a GITHUB TOKEN with repository write access, can execute shell commands in the CI runner, and post comments visible to all contributors <ref:2606.09935#pg4> The critical trust boundary is the agent’s context window, which collapses trusted operator instructions (system prompt, workflow YAML configuration, provider action prompts) and untrusted external content (PR titles, bodies, issue text) <ref:2606.09935#pg5> The adversary model assumes a remote, low-privileged adversary who can submit content through public interfaces like opening a pull request or posting issue comments <ref:2606. p. 3

Where the paper says it

We assume a remote, low-privileged adversary who cannot push to the repository’s main branch, cannot access secret variables, and holds no administrator credentials. The adversary’s sole capability is submitting content through public interfaces: opening a pull request from an external fork, posting issue comments, or contributing files to a PR branch.

09935#pg6>

Attack Surface Characterization

The paper identifies two injection pathways with different threat profiles: PR/issue body injection and config-file injection <ref:2606.09935#pg8> PR/issue body injection involves embedding a malicious payload in a PR body or issue field that is interpolated verbatim into the agent’s prompt at the user-turn trust level <ref:2606. p. 3

Where the paper says it

We identify two injection pathways with meaningfully different threat profiles. In PR/issue body injection, the adversary embeds a malicious payload in a PR body or issue field that is interpolated verbatim into the agent’s prompt; the content arrives at user-turn trust level, and frontier models are increasingly 4

09935#pg9> Config-file injection is characterized as an adversary adding or modifying a provider configuration file (like GEMINI. p. 4
Where the paper says it

resistant to it. In config-file injection, the adversary adds or modifies a provider configuration file (GEMINI.

md) in a PR branch, which loads them as authoritative operator-level instructions before any PR content is processed <ref:2606.09935#pg9>

Evaluation Methodology and Findings

GitInject is an open-source framework that provisions ephemeral repositories and triggers actual workflow runs to evaluate prompt injection vulnerabilities in real, live GitHub workflows <ref:2606.09935#pg2> The evaluation compares the framework against AgentDojo, showing that simulation is structurally insufficient for this deployment setting because it misses 71.2% of confirmed real attacks <ref:2606. p. 4

Where the paper says it

Simulation is structurally insufficient for this setting: it misses 71. 2% of confirmed real attacks and incorrectly predicts 5.

09935#pg5> Eleven named attacks are documented across four attack classes spanning four AI providers <ref:2606. p. 2
Where the paper says it

payloads into the event stream, and evaluates outcomes by inspecting ground-truth repository state via the GitHub API. Using GitInject, we document eleven named attacks spanning four attack classes across four AI providers.

09935#pg9>

Countermeasures and Structural Vulnerabilities

The most critical vulnerabilities exploit credential-storage decisions made by actions/checkout, which no existing simulator models <ref:2606.09935#pg2> The minimum-cost workflow-level countermeasure identified is persist-credentials: false, which eliminates pr body github token exfiltration at zero utility cost <ref:2606.09935#pg9> Tool restriction is the broadest single defense, blocking the shell phase of config-file exfiltration and denial-of-wallet attacks <ref:2606. p. 8

Where the paper says it

persist-credentials: false is the highestpriority recommendation: it eliminates pr_body_github_token_exfiltration at zero utility cost with a one-line change, and every repository using actions/checkout should apply it regardless of whether an AI agent is present. Tool restriction is the broadest single defense, blocking the shell phase of config-file exfiltration, procfs-based key recovery, and Denial-of-Wallet at the agent level, but it carries utility cost for workflows that legitimately need shell access.

09935#pg5> Judgment manipulation remains the hardest variant to address with workflow controls alone, requiring author filtering or a human reviewer in the loop <ref:2606.09935#pg9>

Generalization Beyond GitHub Actions

The structural preconditions for these attacks are present on every major CI/CD platform with agentic features, including GitLab Duo and Bitbucket Agentic Pipelines <ref:2606.09935#pg9> The paper confirms that the provider configuration file injection vector has a direct structural analogue on both platforms <ref:2606.09935#pg9> The root cause is platform-agnostic, as both platforms treat provider configuration files as trusted agent instructions <ref:2606. p. 4

Where the paper says it

md) in the PR branch; because actions/checkout checks out the merge commit, these files are present in the workspace when the agent runs, and each provider’s command line interface (CLI) loads them as authoritative operator-level instructions before the review begins. This second pathway, where the adversary’s content arrives not as user input to be scrutinized but as a trusted configuration to be followed, is the novel attack surface this paper characterizes.

09935#pg9>

Conclusion and Release

GitInject is released publicly to facilitate further research in this direction <ref:2606.09935#pg2> The central finding is structural, demonstrating that no amount of model-side alignment can reliably distinguish a legitimate project preference from a malicious override <ref:2606.09935#pg9> GitInject is not an exhaustive benchmark but an execution framework for reproducing and evaluating individual CI/CD prompt-injection cases under real infrastructure semantics <ref:2606. p. 2

Where the paper says it

GitInject is not an exhaustive benchmark. It is an execution framework for reproducing and evaluating individual CI/CD prompt-injection cases under real infrastructure semantics.

09935#pg2> The minimum recommended baseline for any AI-powered PR review workflow is the combination of persist-credentials: false and tool restriction <ref:2606.09935#pg9> The framework is designed to be extended along three orthogonal axes without modifying framework internals <ref:2606.09935#pg2> The paper concludes that GitInject is released publicly to facilitate further research in this direction <ref:2606.09935#pg2>.

Green — the paper says it, and the page is printed. Red — no passage carries it, so treat that sentence as unverified. The same check runs on your own text: check a summary against its source, $5.

Improvements for AI systems

  1. Credential exfiltration prevention should mandate adding persist-credentials: false to actions/checkout regardless of AI agent presence, as persist-credentials: false is the highestpriority recommendation to eliminate pr body github token exfiltration with zero utility cost. This change prevents the GITHUB TOKEN from being written to.git/config, which is a confirmed vector for credential theft.

  2. Implement tool restriction as the broadest single defense, specifically blocking shell phases for config-file exfiltration and procfs-based key recovery across all agents. This defense blocks the shell phase of config-file exfiltration, procfs-based key recovery, and Denial-of-Wallet at the agent level.

  3. For judgment manipulation attacks on configuration files, enforce author filtering or advisory-only agent permissions as the minimum recommended baseline. The paper states that Judgment manipulation has no cheap workflow-level fix: no shell commands are involved so tool restriction provides no protection.

  4. Develop custom workflow logic to implement input size checks before invoking the model for Denial-of-Wallet attacks, thereby reducing cost per attack. This addresses the finding that Input size checks before invoking the model would reduce cost per attack but require custom workflow logic outside the standard action interface.

  5. For workflows accepting external contributions, mandate human approval of agent runs as a cross-cutting defense. This is because Human approval as a cross-cutting defense is discussed in Appendix D and provides a hard guarantee against config-file payloads that are otherwise indistinguishable from legitimate project preferences.

Abstract

AI agents are increasingly embedded in continuous integration and continuous delivery (CI/CD) workflows to autonomously review pull requests, triage issues, and maintain codebases. We study fully automated configurations in which external contributions invoke agents without prior human approval. Because these agents ingest untrusted content while operating with repository credentials and tools, prompt injection can have software supply chain consequences. We present GitInject, an open-source framework for evaluating prompt injection in live GitHub Actions workflows. Unlike benchmarks that simulate tool calls, GitInject provisions ephemeral repositories and executes actual workflows, exposing platform semantics such as sandbox constraints, credential handling, and permission boundaries. We use GitInject to evaluate eleven named attack scenarios across five workflows from four AI providers, covering configuration-file injection, credential exfiltration, judgment manipulation, and availability. Every provider is susceptible to at least one high-severity attack in the tested configurations. The most consequential vulnerabilities are structural: attacker-controlled configuration files from an unmerged contribution are loaded as operator-level instructions, allowing the agent--infrastructure interaction to expose credentials or corrupt review judgments. Two configuration-file attacks replicate on GitLab and Hugging Face as well as GitHub. We evaluate workflow-level countermeasures and show their coverage and utility tradeoffs. We release GitInject and all attack scenarios.

Sources

Related papers