大型语言模型(LLMs)用于代码生成正在成为现代软件开发的重要组成部分,但其在现实世界中的普及程度和安全影响仍然了解甚少。我们提出了首次大规模的实证研究,探讨现实世界中的 AI 生成代码(AIGCode)。我们构建了一个高精度的检测管道和一个具有代表性的基准,以区分 AI 生成代码和人工编写代码,并将其应用于(i)来自顶级 1000 个 GitHub 仓库的开发提交(2022-2025 年)和(ii)7000 多个与最近 CVE 相关的代码更改。这使我们能够对提交、文件和函数进行标记,并在人类/AI 轴上追踪 AI 生成代码在项目和漏洞生命周期中的移动。我们的测量显示了三种生态模式。首先,AI 生成代码已经是新代码的重要组成部分,但其采用是结构化的:AI 集中于粘合代码、测试、重构、文档和其他样板代码,而核心逻辑和安全关键配置主要由人工编写。其次,采用有安全影响:某些 CWE 家族在 AI 标记的代码中过度表示,且近似的不安全模板在无关项目中反复出现,表明“AI 引发的漏洞”通过共享模型传播,而非共享维护者。第三,在人类-AI 编辑链中,AI 引入了高吞吐量的更改,而人类则充当安全守门人;当审查较浅时,AI 引入的缺陷会持续更久,暴露在可网络访问的表面,并传播到更多文件和仓库。我们将开源完整的数据集,并发布分析工具和我们方法和发现的详细文档。
英文摘要:
Large language models (LLMs) for code generation are becoming integral to modern software development, but their real-world prevalence and security impact remain poorly understood.
We present the first large-scale empirical study of AI-generated code (AIGCode) in the wild. We build a high-precision detection pipeline and a representative benchmark to distinguish AIGCode from human-written code, and apply them to (i) development commits from the top 1,000 GitHub repositories (2022-2025) and (ii) 7,000+ recent CVE-linked code changes. This lets us label commits, files, and functions along a human/AI axis and trace how AIGCode moves through projects and vulnerability life cycles.
Our measurements show three ecological patterns. First, AIGCode is already a substantial fraction of new code, but adoption is structured: AI concentrates in glue code, tests, refactoring, documentation, and other boilerplate, while core logic and security-critical configurations remain mostly human-written. Second, adoption has security consequences: some CWE families are overrepresented in AI-tagged code, and near-identical insecure templates recur across unrelated projects, suggesting "AI-induced vulnerabilities" propagated by shared models rather than shared maintainers. Third, in human-AI edit chains, AI introduces high-throughput changes while humans act as security gatekeepers; when review is shallow, AI-introduced defects persist longer, remain exposed on network-accessible surfaces, and spread to more files and repositories.
We will open-source the complete dataset and release analysis artifacts and fine-grained documentation of our methodology and findings.
Measuring the Unspoken: A Disentanglement Model and Benchmark for Psychological Analysis in the Wild
College of Computer Science, National University of Defense Technology(计算机科学学院,国防科技大学);Shien-Ming Wu School of Intelligent Engineering, South China University of Technology(智能工程学院,华南理工大学)
Measuring the Behavioral Fidelity of Long-Horizon Human Activity Simulations
Human-Computer Interaction Institute, School of Computer Science, Carnegie Mellon University(卡内基梅隆大学计算机科学学院人机交互研究所);Fujitsu Ltd.(富士通有限公司);Fujitsu Research of America(富士通美国研究院)
LLM-empowered Agents Simulation Framework for Scenario Generation in Service Ecosystem Governance
School of Software, Shandong University(软件学院,山东大学);Joint SDU-NTU Centre for Artificial Intelligence Research (C-FAIR), Shandong University(SDU-NTU人工智能研究中心(C-FAIR),山东大学);College of Intelligence and Computing, Tianjin University(智能与计算学院,天津大学);Tianjin Key Laboratory of Healthy Habitat and Smart Technology(天津健康人居环境与智能技术重点实验室);Laboratory of Computation and Analytics of Complex Management Systems, Tianjin University(复杂管理系统计算与分析实验室,天津大学);ShanDa Dareway Software Co. Ltd(山东达瑞软件有限公司)
"Do Not Mention This to the User": Detecting and Understanding Malicious Agent Skills in the Wild
Griffith University(格里菲斯大学);Nanyang Technological University(南洋理工大学);University of New South Wales(新南威尔士大学);Zhejiang Key Laboratory of Digital Fashion and Data Governance, Zhejiang Sci-Tech University(浙江数字时尚与数据治理重点实验室,浙江科技大学)
When Safe Skills Collide: Measuring Compositional Risk in Agent Skill Ecosystems
Carnegie Mellon University(卡内基梅隆大学);Georgia Institute of Technology(佐治亚理工学院);University of Glasgow(格拉斯哥大学);Independent Researcher(独立研究员);Corespeed Inc.(Corespeed公司)
Agent Skills in the Wild: An Empirical Study of Security Vulnerabilities at Scale
Tianjin University(天津大学);Southern Cross University(南方十字大学);School of Cybersecurity, Tianjin University(安全学院,天津大学);Nanyang Technological University(南洋理工大学);University of New South Wales(新南威尔士大学);Griffith University(格里菲斯大学)