跳到正文
EasyXiv 检索
投稿 关于 登录

按回车检索 · 直接输入编号(如 1706.03762)可跳转到论文

计算机科学 > 密码学与安全

arXiv:2511.03898 (cs)
[提交于 2025年11月5日]

标题:Secure Code Generation at Scale with Reflexion

作者:Arup Datta, Ahmed Aljohani, Hyunsook Do
查看论文《Secure Code Generation at Scale with Reflexion》的 PDF
查看原文 PDF 中文 PDF (下批处理) EasyResearch 阅读
摘要:Large language models (LLMs) are now widely used to draft and refactor code, but code that works is not necessarily secure. We evaluate secure code generation using the Instruct Prime, which eliminated compliance-required prompts and cue contamination, and evaluate five instruction-tuned code LLMs using a zero-shot baseline and a three-round reflexion prompting approach. Security is measured using the Insecure Code Detector (ICD), and results are reported by measuring Repair, Regression, and NetGain metrics, considering the programming language and CWE family. Our findings show that insecurity remains common at the first round: roughly 25-33% of programs are insecure at a zero-shot baseline (t0 ). Weak cryptography/config-dependent bugs are the hardest to avoid while templated ones like XSS, code injection, and hard-coded secrets are handled more reliably. Python yields the highest secure rates; C and C# are the lowest, with Java, JS, PHP, and C++ in the middle. Reflexion prompting improves security for all models, improving average accuracy from 70.74% at t0 to 79.43% at t3 , with the largest gains in the first round followed by diminishing returns. The trends with Repair, Regression, and NetGain metrics show that applying one to two rounds produces most of the benefits. A replication package is available at https://doi.org/10.5281/zenodo.17065846.
评论: Accepted for publication at the 2nd IEEE International Conference on AI-powered Software (AIware 2025)
主题: 密码学与安全 (cs.CR); 人工智能 (cs.AI); 计算工程、金融与科学 (cs.CE); 软件工程 (cs.SE)
引用方式: arXiv:2511.03898 [cs.CR]
  (或者 arXiv:2511.03898v1 [cs.CR] 对于此版本)
  https://doi.org/10.48550/arXiv.2511.03898
相关 DOI: https://doi.org/10.1109/AIware69974.2025.00038

提交历史

来自:Arup Datta
[v1] 2025年11月5日 星期三 22:46:24 UTC
全文链接:

访问论文:

  • 查看原文 PDF
  • 中文 PDF (下批处理)
  • EasyResearch 阅读
  • TeX 源文件
  • arXiv 原文页面
查看许可

当前浏览上下文:

cs.CR
< 上一篇   |   下一篇 >
最新 | 近期 | 2025-11
切换浏览方式为:
cs
cs.AI
cs.CE
cs.SE

参考文献与引用

  • Google Scholar
  • Semantic Scholar

BibTeX 格式的引用

EasyXiv 是独立运营的中文预印本站点,与 arXiv 及康奈尔大学无隶属关系。 论文元数据与原文来自 arXiv.org,感谢 arXiv 提供开放获取服务。
关于 · 帮助 · 投稿指南 · 版权 · arXiv 原站