paper-with-me

Papers

SoK: AI Secure Code Generation: Progress, Pitfalls, and Paths Forward

2026-06-23 · Rupam Patir, Keyan Guo, Haipeng Cai, Hongxin Hu arxiv

The increasing use of AI systems for code generation raises a central security question: what can today's models and coding agents actually do to produce secure code, where do they still fail, and what would move the field forward? Existing work has explored prompting, fine-tuning, reinforcement learning, and agentic workflows for secure code generation, but the field still lacks a systematic understanding of how these techniques improve security and why substantial failures persist. In this SoK, we systematize the progress, pitfalls, and paths forward for AI secure code generation. We introduce a three-level framework that measures models' natural-language understanding of secure coding principles, their code-level actuation of those principles during generation, and the knowledge--actuation gaps between the two. We instantiate this framework across models and coding agents on benchmarks covering both isolated function-level security and full web-application security. Our results show that secure-coding-principle understanding is a statistically strong predictor of code-level outcomes, including functional correctness, security, and joint functional-security correctness. Yet substantial knowledge--actuation gaps remain: models can recognize relevant security principles but still fail to translate them into secure and functional code. These findings offer a principle-centered account of where AI secure code generation stands today and identify concrete paths forward through principle-guided generation, evaluation, benchmarking, and agentic workflows.

📄 PDF Abstract BibTeX arXiv:2606.25195

Code (0)

등록된 구현이 없습니다.

Tasks

Reinforcement LearningCode Generation

Similar Papers 제목 키워드 기반

SoK: Understanding (New) Security Issues Across AI4Code Use Cases

2025-12-20 · Qilong Wu, Taoran Li, Tianyang Zhou, Varun Chandrasekaran arxiv

AI-for-Code (AI4Code) systems are reshaping software engineering, with tools like GitHub Copilot accelerating code generation, translation, and vulnerability detection. Alongside these advances, however, security risks r…

Vulnerability DetectionAdversarial RobustnessCode TranslationCode Generation

Constrained Decoding for Secure Code Generation

2024-04-30 · Yanjun Fu, Ethan Baker, Yu Ding, Yizheng Chen

Code Large Language Models (Code LLMs) have been increasingly used by developers to boost productivity, but they often generate vulnerable code. Thus, there is an urgent need to ensure that code generated by Code LLMs is…

Code Generation

Pitfalls in Language Models for Code Intelligence: A Taxonomy and Survey

2023-10-27 · Xinyu She, Yue Liu, Yanjie Zhao, Yiling He 외

Modern language models (LMs) have been successfully employed in source code generation and understanding, leading to a significant increase in research focused on learning-based code intelligence, such as automated bug r…

Code Generation

Learn from Your Mistakes: Tree-like Self-Play for Secure Code LLMs

2026-06-02 · Wenqi Chen, Ziyan Zhang, Bin Wang, Lin Liu 외 arxiv

While Large Language Models (LLMs) excel in code generation, they remain prone to replicating subtle yet critical vulnerabilities endemic to their training data. Current alignment techniques, such as Supervised Fine-Tuni…

Reinforcement LearningCode Generation

SecRepoBench: Benchmarking LLMs for Secure Code Generation in Real-World Repositories

2025-04-29 · Connor Dilgren, Purva Chiniya, Luke Griffith, Yu Ding 외

This paper introduces SecRepoBench, a benchmark to evaluate LLMs on secure code generation in real-world repositories. SecRepoBench has 318 code generation tasks in 27 C/C++ repositories, covering 15 CWEs. We evaluate 19…

BenchmarkingCode GenerationPrompt Engineering