paper-with-me

Papers

BaxBench: Can LLMs Generate Correct and Secure Backends?

2025-02-17 · Mark Vero, Niels Mündler, Victor Chibotaru, Veselin Raychev, Maximilian Baader, Nikola Jovanović, Jingxuan He, Martin Vechev

Automatic program generation has long been a fundamental challenge in computer science. Recent benchmarks have shown that large language models (LLMs) can effectively generate code at the function level, make code edits, and solve algorithmic coding tasks. However, to achieve full automation, LLMs should be able to generate production-quality, self-contained application modules. To evaluate the capabilities of LLMs in solving this challenge, we introduce BaxBench, a novel evaluation benchmark consisting of 392 tasks for the generation of backend applications. We focus on backends for three critical reasons: (i) they are practically relevant, building the core components of most modern web and cloud software, (ii) they are difficult to get right, requiring multiple functions and files to achieve the desired functionality, and (iii) they are security-critical, as they are exposed to untrusted third-parties, making secure solutions that prevent deployment-time attacks an imperative. BaxBench validates the functionality of the generated applications with comprehensive test cases, and assesses their security exposure by executing end-to-end exploits. Our experiments reveal key limitations of current LLMs in both functionality and security: (i) even the best model, OpenAI o1, achieves a mere 62% on code correctness; (ii) on average, we could successfully execute security exploits on around half of the correct programs generated by each LLM; and (iii) in less popular backend frameworks, models further struggle to generate correct and secure applications. Progress on BaxBench signifies important steps towards autonomous and secure software development with LLMs.

📄 PDF Abstract BibTeX arXiv:2502.11844

Code (0)

등록된 구현이 없습니다.

Methods 이 논문이 사용한 방법론

Focus 설명 없음

Similar Papers 제목 키워드 기반

MACGen: Toward Functionally Correct and Secure Code Generation via Multi-Agent Collaboration

2026-08-26 · Miseon Yu, Jaehoon Choi, Younghan Lee, Yunheung Paek arxiv

Despite their strong ability to generate code, large language models often fail to produce secure code, as their outputs frequently contain security vulnerabilities. Secure code generation is inherently challenging becau…

Code Generation

SecPI: Secure Code Generation with Reasoning Models via Security Reasoning Internalization

2026-04-04 · Hao Wang, Niels Mündler, Mark Vero, Jingxuan He 외 arxiv

Reasoning language models (RLMs) are increasingly used in programming. Yet, even state-of-the-art RLMs frequently introduce critical security vulnerabilities in generated code. Prior training-based approaches for secure …

Code Generation

Activating Latent Security Knowledge through LLM-Guided Risk Analysis for Secure Code Generation

2026-06-15 · Xiaoyun Xu, Lichao Wu, Jona te Lintelo, Siyu Zhang 외 arxiv

Large language models are pretrained on extensive software and security corpora, yet they frequently generate functionally correct code containing well-known vulnerabilities. Existing defenses commonly treat this behavio…

Code 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

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