发现代码库自动化流程中可被利用的提示注入漏洞,危及整个软件供应链安全。
GitInject: Real-World Prompt Injection Attacks in AI-Powered CI/CD Pipelines

- 在真实GitHub工作流中触发实际运行,验证提示注入攻击可行性。
- 发现11类攻击,包括配置文件注入和凭据泄露,所有厂商默认配置均受影响。
- 漏洞源于CI/CD架构设计缺陷,非模型本身问题,适合安全研究人员参考。
AI驱动的智能体正被广泛嵌入持续集成与交付(CI/CD)流程,用于自动审查代码合并请求、分类问题并维护代码库。这些智能体在高权限下处理未受信任内容,极易成为提示注入攻击目标,进而引发供应链风险。我们提出GitInject——一个开源框架,用于评估真实、活跃的GitHub工作流中的提示注入漏洞。与以往依赖模拟工具调用的基准测试不同,GitInject通过创建临时仓库并触发真实工作流运行,使沙箱约束、凭据处理和权限边界完全复现生产环境。基于此,我们研究了四个AI服务提供商的工作流配置,共发现十一类命名攻击,涵盖配置文件注入、凭据外泄、判断操纵与可用性破坏。结果表明,所有测试厂商在默认配置下均至少存在一类攻击。最严重漏洞源于CI/CD基础设施对凭据与配置文件的处理机制,而非特定模型行为。针对每类攻击,我们识别出最低成本的防御措施,并分析其覆盖范围与局限性。GitInject已公开发布,以推动该领域进一步研究。
原文摘要 · Abstract (English)
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. We present GitInject, an open-source framework for evaluating prompt injection vulnerabilities in real, live GitHub workflows, a widely deployed instance of CI/CD pipelines. Unlike prior agent security benchmarks that simulate tool calls, GitInject provisions ephemeral repositories and triggers actual workflow runs, so that sandbox constraints, credential handling, and permission boundaries behave exactly as in production. Using GitInject, we study workflow configurations across four AI providers and document eleven named attacks spanning config-file injection, credential exfiltration, judgment manipulation, and availability. We find that all tested providers are susceptible to at least one attack class in their default configuration, and that the most critical vulnerabilities are structural: they arise from how CI/CD infrastructure handles credentials and configuration files, not from any specific model's behavior. For each confirmed attack class, we identify the minimum-cost workflow-level countermeasure and analyze its coverage and limitations. GitInject is released publicly to facilitate further research in this direction.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。