"Vibe coding," in which developers delegate code generation to AI assistants and accept the output with little manual review, has gained rapid adoption in production settings. On March 31, 2026, Anthropic's Claude Code CLI shipped a 59.8 MB source map file in its npm package, exposing roughly 512,000 lines of proprietary TypeScript. The tool had itself been largely vibe-coded, and the leak traced to a misconfigured packaging rule rather than a logic bug. Existing static-analysis and secret-scanning tools did not cover this failure mode, pointing to a gap between the vulnerabilities AI tends to introduce and the vulnerabilities current tooling is built to find. We present VibeGuard, a pre-publish security gate that targets five such blind spots: artifact hygiene, packaging-configuration drift, source-map exposure, hardcoded secrets, and supply-chain risk. In controlled experiments on eight synthetic projects (seven vulnerable, one clean control), VibeGuard achieved 100% recall, 89.47% precision (F1 = 94.44%), and correct pass/fail gate decisions on all eight projects across three policy levels. We discuss how these results inform a defense-in-depth workflow for teams that rely on AI code generation.


翻译:“氛围编码”(指开发者将代码生成任务委托给AI助手,并几乎不经人工审查就采纳输出结果)已在生产环境中迅速普及。2026年3月31日,Anthropic公司的Claude Code CLI在其npm包中发布了一个59.8 MB的源映射文件,暴露了约51.2万行专有TypeScript代码。该工具本身在很大程度上是通过氛围编码开发的,而此次泄露源于一个配置有误的打包规则,而非逻辑缺陷。现有的静态分析和秘密扫描工具未能覆盖此类失效模式,这暴露出AI倾向于引入的漏洞与当前工具旨在发现的漏洞之间存在鸿沟。我们提出了VibeGuard——一个预发布安全门,专门针对五个此类盲点:工件卫生、打包配置漂移、源映射暴露、硬编码秘密以及供应链风险。在针对八个合成项目(七个存在漏洞,一个为清洁对照组)的受控实验中,VibeGuard实现了100%的召回率、89.47%的精度(F1=94.44%),并在三个策略层级上对所有八个项目做出了正确的通过/拦截门控决策。我们讨论了这些结果如何为依赖AI代码生成的团队构建纵深防御工作流提供参考。

0
下载
关闭预览

相关内容

代码(Code)是专知网的一个重要知识资料文档板块,旨在整理收录论文源代码、复现代码,经典工程代码等,便于用户查阅下载使用。
AI生成代码缺陷综述
专知会员服务
17+阅读 · 2025年12月8日
《人工智能安全治理框架》2.0版发布,90页pdf
专知会员服务
24+阅读 · 2025年10月8日
DeepSeek系列报告:AI编程或为B端最先崛起的AI应用
专知会员服务
73+阅读 · 2025年2月15日
《人工智能安全治理框架》1.0版发布
专知会员服务
32+阅读 · 2024年9月9日
专知会员服务
65+阅读 · 2021年7月5日
《人工智能安全测评白皮书》,99页pdf
专知
36+阅读 · 2022年2月26日
【干货】深入理解自编码器(附代码实现)
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
18+阅读 · 2014年12月31日
VIP会员
最新内容
非对称防御中的自组织临界性:俄乌战争
专知会员服务
1+阅读 · 今天14:36
《战争中的大语言模型监管》
专知会员服务
2+阅读 · 今天14:26
边缘计算的军事应用
专知会员服务
8+阅读 · 8月9日
一种考虑资源机动性的武器目标分配混合算法
专知会员服务
9+阅读 · 8月8日
相关VIP内容
相关基金
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
18+阅读 · 2014年12月31日
Top
微信扫码咨询专知VIP会员