We argue that when it comes to producing secure code with AI, the prevailing "fighting fire with fire" approach -- using probabilistic AI-based checkers or attackers to secure probabilistically generated code -- fails to address the long tail of security bugs. As a result, systems may remain exposed to zero-day vulnerabilities that can be discovered by better-resourced or more persistent adversaries. While neurosymbolic approaches that combine LLMs with formal methods are attractive in principle, we argue that they are difficult to reconcile with the "vibe coding" workflow common in LLM-assisted development: unless the end-to-end verification pipeline is fully automated, developers are repeatedly asked to validate specifications, resolve ambiguities, and adjudicate failures, making the human-in-the-loop a likely point of weakness, compromising secure-by-construction guarantees. In this paper we argue that stronger security guarantees can be obtained by enforcing security constraints during code generation (e.g., via constrained decoding), rather than relying solely on post-hoc detection and repair. This direction is particularly promising for diffusion-style code models, whose approach provides a natural elegant opportunity for modular, hierarchical security enforcement, allowing us to combine lower-latency generation techniques with generating secure-by-construction code.


翻译:我们认为,在利用AI生成安全代码方面,当前主流的"以火攻火"方法——即使用基于概率的AI检查器或攻击器来保护概率生成的代码——未能解决安全漏洞的长尾问题。因此,系统可能仍然暴露于零日漏洞之下,这些漏洞可能被资源更充足或更持久的对手发现。虽然将LLMs与形式化方法结合的神经符号方法在原则上具有吸引力,但我们认为它们难以与LLM辅助开发中常见的"氛围编码"工作流程相协调:除非端到端的验证流程完全自动化,否则开发者会被反复要求验证规范、解决歧义并裁决失败,这使得人机交互环节很可能成为弱点,从而损害"构造即安全"的保证。本文主张,通过在代码生成过程中强制执行安全约束(例如,通过约束解码),而非仅仅依赖事后检测与修复,可以获得更强的安全性保证。这一方向对于扩散式代码模型尤为前景广阔,其方法为模块化、层次化的安全执行提供了自然而优雅的机遇,使我们能够将低延迟生成技术与生成"构造即安全"的代码相结合。

0
下载
关闭预览

相关内容

代码(Code)是专知网的一个重要知识资料文档板块,旨在整理收录论文源代码、复现代码,经典工程代码等,便于用户查阅下载使用。
【新书】大规模语言模型的隐私与安全,
专知会员服务
29+阅读 · 2024年12月4日
揭示生成式人工智能 / 大型语言模型(LLMs)的军事潜力
专知会员服务
31+阅读 · 2024年9月26日
生成式人工智能大型语言模型的安全性:概述
专知会员服务
35+阅读 · 2024年7月30日
大型语言模型网络安全综述
专知会员服务
67+阅读 · 2024年5月12日
国防中的LLM:五角大楼的机遇与挑战
专知会员服务
43+阅读 · 2024年3月5日
【ICLR2024】能检测到LLM产生的错误信息吗?
专知会员服务
25+阅读 · 2024年1月23日
《人工智能安全测评白皮书》,99页pdf
专知
36+阅读 · 2022年2月26日
iOS如何区分App和SDK内部crash
CocoaChina
11+阅读 · 2019年4月17日
放弃 RNN/LSTM 吧,因为真的不好用!望周知~
人工智能头条
19+阅读 · 2018年4月24日
网络安全态势感知浅析
计算机与网络安全
18+阅读 · 2017年10月13日
国家自然科学基金
1+阅读 · 2017年12月31日
国家自然科学基金
6+阅读 · 2017年12月31日
国家自然科学基金
4+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
19+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
18+阅读 · 2014年12月31日
VIP会员
相关基金
国家自然科学基金
1+阅读 · 2017年12月31日
国家自然科学基金
6+阅读 · 2017年12月31日
国家自然科学基金
4+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
19+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
18+阅读 · 2014年12月31日
Top
微信扫码咨询专知VIP会员