arXiv:2606.24429cs.SEcs.AI2026-06被引 1

首次大规模检测代码生成器在开源中的使用,发现现有方法严重低估实际普及率。

Detecting AI Coding Agents in Open Source: A Validated Multi-Method Census of 180 Million Repositories

论文配图:Detecting AI Coding Agents in Open Source: A Validated Multi-Method Census of 180 Million Repositories
图 1 · 摘自论文原文
  • 融合配置文件、提交信息等多方法检测,识别四类生成式代码行为
  • 单月超32万次提交由代理生成,但仅3.3%被传统账号检测捕获
  • 提交与拉取请求两种渠道覆盖人群几乎不重叠,需结合使用

生成式AI代码代理正渗入开源供应链,但其多样且隐蔽的痕迹导致其真实普及率难以掌握。本文构建多层检测框架,整合配置文件扫描、提交信息分析、作者身份匹配及机器人签名查询,覆盖1800万+个Git仓库,将代理痕迹分类为四类行为。单一方法仅能捕捉部分活动:多方法检测发现850,157条Claude Code提交,而仅依赖机器人账号查找的主流信号仅捕获28,154条(3.3%),存在30倍召回率差距,说明单信号估计至少偏低30倍。所有检测模式经495个样本的手工验证,计算每单元精确率与威尔逊置信区间。从2024年12月至2026年4月多个快照显示,代理每月生成超32万次提交;Claude Code领先(共17,295个项目中886,122次提交),主导静默的仅配置文件式采纳(21,078个项目)。对比独立的拉取请求普查(AIDev),两者覆盖群体近乎无交集——拉取请求普查遗漏79%提交检测到的Claude Code使用者,且几乎未发现Codex使用者;二者工作类型也不同:拉取请求部署的云代理(Codex、Cursor)体现为功能开发,而提交部署的编辑器内代理(Claude Code、OpenHands、Aider)体现为维护任务。观察到的工作特征更受部署与检测方式影响,而非工具本身,故任一单一通道均不具备代表性。

原文摘要 · Abstract (English)

Generative AI coding agents are entering the open-source supply chain, yet their diverse and often invisible traces leave their prevalence poorly understood. We introduce a multi-layered detection framework that integrates configuration-file scanning, commit-message analysis, author-identity matching, and bot-signature lookup across World of Code (180M+ Git repositories), classifying agent traces into four behavioral types. No single method captures more than a fraction of activity: multi-method detection identifies 850,157 Claude Code commits in one snapshot, of which bot-account lookup_the signal most adoption studies rely on_recovers only 28,154 (3.3%), a 30x relative-recall gap, so single-signal prevalence estimates are biased low by at least this factor. Every detection pattern is hand-validated (495 labels) with per-cell precision and Wilson confidence intervals. Across snapshots from December 2024 to April 2026, commit-attributed agents generate over 320,000 commits per month; Claude Code leads (886,122 commits across 17,295 projects) and dominates silent, configuration-file-only adoption (21,078 projects). Compared against an independent pull-request census (AIDev), the two channels capture nearly disjoint agent populations_a PR census misses 79% of commit-detected Claude Code adopters and essentially all Codex adopters_and different kinds of work: PR-deployed cloud agents (Codex, Cursor) surface as feature work, while commit-deployed in-editor agents (Claude Code, OpenHands, Aider) surface as maintenance. The observed work profile follows deployment and detection mode rather than the tool itself, so no single channel is representative.

AI编程代码生成开源安全检测方法

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。