mlsanityData to 7 Oct 2026

CWEval: Outcome-driven Evaluation on Functionality and Security of LLM Code Generation

arXiv 2501.08200 ↗First posted 14 Jan 2025cs.SE cs.CL cs.LGcited by 55

Not on the map. Why?

Abstract (arXiv)

Large Language Models (LLMs) have significantly aided developers by generating or assisting in code writing, enhancing productivity across various tasks. While identifying incorrect code is often straightforward, detecting vulnerabilities in functionally correct code is more challenging, especially for developers with limited security knowledge, which poses considerable security risks of using LLM-generated code and underscores the need for robust evaluation benchmarks that assess both functional correctness and security. Current benchmarks like CyberSecEval and SecurityEval attempt to solve it but are hindered by unclear and impractical specifications, failing to assess both functionality and security accurately. To tackle these deficiencies, we introduce CWEval, a novel outcome-driven evaluation framework designed to enhance the evaluation of secure code generation by LLMs. This framework not only assesses code functionality but also its security simultaneously with high-quality task specifications and outcome-driven test oracles which provides high accuracy. Coupled with CWEval-bench, a multilingual, security-critical coding benchmark, CWEval provides a rigorous empirical security evaluation on LLM-generated code, overcoming previous benchmarks' shortcomings. Through our evaluations, CWEval reveals a notable portion of functional but insecure code produced by LLMs, and shows a serious inaccuracy of previous evaluations, ultimately contributing significantly to the field of secure code generation. We open-source our artifact at: https://github.com/Co1lin/CWEval .

Key facts. Cited by 55 papers in the map (data through 7 Oct 2026). Builds on 19 of its 24 references that are in the map. First posted on arXiv 14 Jan 2025.

Builds on

19 of 24 references.

References · 19

  1. 2022Training language models to follow instructions with human feedbackcited by 15,712
  2. 2021Evaluating Large Language Models Trained on Codecited by 8,053
  3. 2021Program Synthesis with Large Language Modelscited by 3,509
  4. 2024LiveCodeBench: Holistic and Contamination Free Evaluation of Large Language Models for Codecited by 1,906
  5. 2023Is Your Code Generated by ChatGPT Really Correct? Rigorous Evaluation of Large Language Models for Code Generationcited by 1,332
  6. 2021Measuring Coding Challenge Competence With APPScited by 879
  7. 2022CodeGen: An Open Large Language Model for Code with Multi-Turn Program Synthesiscited by 876
  8. 2021Asleep at the Keyboard? Assessing the Security of GitHub Copilot's Code Contributionscited by 417
  9. 2023Large Language Models for Code: Security Hardening and Adversarial Testingcited by 149
  10. 2022Practical Program Repair in the Era of Large Pre-trained Language Modelscited by 133
  11. 2023Purple Llama CyberSecEval: A Secure Coding Benchmark for Language Modelscited by 130
  12. 2023Learning Performance-Improving Code Editscited by 103
7 more
  1. 2024CyberSecEval 2: A Wide-Ranging Cybersecurity Evaluation Suite for Large Language Modelscited by 84
  2. 2020Code Prediction by Feeding Trees to Transformerscited by 70
  3. 2024Evaluating Language Models for Efficient Code Generationcited by 69
  4. 2024Instruction Tuning for Secure Code Generationcited by 63
  5. 2019TreeGen: A Tree-Based Transformer Architecture for Code Generationcited by 58
  6. 2020Fast and Memory-Efficient Neural Code Completioncited by 38
  7. 2022M2TS: Multi-Scale Multi-Modal Approach Based on Transformer for Source Code Summarizationcited by 14

Built on by

Cited by year (2026 to 7 Oct)

Citing papers per year: 2025: 26; 2026: 29.

55 papers.

Sort:

By area:

  1. 2026Qwen3-Coder-Next Technical Reportcited by 60
  2. 2025BaxBench: Can LLMs Generate Correct and Secure Backends?cited by 38
  3. 2025The Scales of Justitia: A Comprehensive Survey on Safety Evaluation of LLMscited by 24
  4. 2025Is Vibe Coding Safe? Benchmarking Vulnerability of Agent-Generated Code in Real-World Taskscited by 18
  5. 2025SafeGenBench: A Benchmark Framework for Security Vulnerability Detection in LLM-Generated Codecited by 17
  6. 2025PurpCode: Reasoning for Safer Code Generationcited by 17
  7. 2025SecRepoBench: Benchmarking Code Agents for Secure Code Completion in Real-World Repositoriescited by 14
  8. 2025A.S.E: A Repository-Level Benchmark for Evaluating Security in AI-Generated Codecited by 12
  9. 2025SecureVibeBench: Benchmarking Secure Vibe Coding of AI Agents via Reconstructing Vulnerability-Introducing Scenarioscited by 11
  10. 2025Rethinking the Evaluation of Secure Code Generationcited by 10
  11. 2025Teaching an Old LLM Secure Coding: Localized Preference Optimization on Distilled Preferencescited by 10
  12. 2025Exploring the Security Threats of Knowledge Base Poisoning in Retrieval-Augmented Code Generationcited by 9
38 more
  1. 2025RedCodeAgent: Automatic Red-teaming Agent against Diverse Code Agentscited by 9
  2. 2025RESCUE: Retrieval Augmented Secure Code Generationcited by 7
  3. 2026CyberGym-E2E: Scalable Real-World Benchmark for AI Agents' End-to-End Cybersecurity Capabilitiescited by 6
  4. 2026HardSecBench: Benchmarking the Security Awareness of LLMs for Hardware Code Generationcited by 5
  5. 2025XOXO: Stealthy Cross-Origin Context Poisoning Attacks against AI Coding Assistantscited by 4
  6. 2025EditLord: Learning Code Transformation Rules for Code Editingcited by 4
  7. 2025SCGAgent: Recreating the Benefits of Reasoning Models for Secure Code Generation with Agentic Workflowscited by 4
  8. 2025Evaluating LLM Generated Detection Rules in Cybersecuritycited by 4
  9. 2025Benchmarking Correctness and Security in Multi-Turn Code Generationcited by 4
  10. 2025AutoBaxBuilder: Bootstrapping Code Security Benchmarkingcited by 4
  11. 2026Secure Code Generation via Online Reinforcement Learning with Vulnerability Reward Modelcited by 4
  12. 2026What Breaks When LLMs Code? Characterizing Operational Safety Failures of Agentic Code Assistantscited by 3
  13. 2025Secure-Instruct: An Automated Pipeline for Synthesizing Instruction-Tuning Datasets Using LLMs for Secure Code Generationcited by 2
  14. 2026Learning to Generate Secure Code via Token-Level Rewardscited by 2
  15. 2025Large Language Models for IT Automation Tasks: Are We There Yet?cited by 1
  16. 2025BlueCodeAgent: A Blue Teaming Agent Enabled by Automated Red Teaming for CodeGen AIcited by 1
  17. 2025Secure Code Generation at Scale with Reflexioncited by 1
  18. 2025DualGauge: Automated Joint Security-Functionality Benchmarking of Specification-Only Code Generation by LLMs and Coding Agentscited by 1
  19. 2026Extracting Recurring Vulnerabilities from Black-Box LLM-Generated Softwarecited by 1
  20. 2026SecCodeBench-V2 Technical Reportcited by 1
  21. 2026Why LLMs Fail: A Failure Analysis and Partial Success Measurement for Automated Security Patch Generationcited by 1
  22. 2026TOSSS: a CVE-based Software Security Benchmark for Large Language Modelscited by 1
  23. 2026SecPI: Secure Code Generation with Reasoning Models via Security Reasoning Internalizationcited by 1
  24. 2026Constrained Code Generation with Discrete Diffusioncited by 1
  25. 2026Enhancing Reliability in LLM-Based Secure Code Generationcited by 1
  26. 2026Minimal Prompt Perturbations Lead to Code Vulnerabilities: Prompt Fragility and Hidden-State Signals in Coding LLMscited by 1
  27. 2026SEVRA-BENCH: Social Engineering of Vulnerabilities in Review Agentscited by 1
  28. 2025From Model to Breach: Towards Actionable LLM-Generated Vulnerabilities Reportingcited by 0
  29. 2025TaskEval: Synthesised Evaluation for Foundation-Model Taskscited by 0
  30. 2026Inference-Time Safety For Code LLMs Via Retrieval-Augmented Revisioncited by 0
  31. 2026Security-by-Design for LLM-Based Code Generation: Leveraging Internal Representations for Concept-Driven Steering Mechanismscited by 0
  32. 2026A Quasi-Experimental Developer Study of Security Training in LLM-Assisted Web Application Developmentcited by 0
  33. 2026Activating Latent Security Knowledge through LLM-Guided Risk Analysis for Secure Code Generationcited by 0
  34. 2026SoK: AI Secure Code Generation: Progress, Pitfalls, and Paths Forwardcited by 0
  35. 2026SWE-NFI: Studying and Benchmarking Coding Agents for Non-Functional Improvementscited by 0
  36. 2026EduPluginBench: Executable Assurance for AI-Generated Educational Pluginscited by 0
  37. 2026WeSCE: A Benchmark for Measuring Security Drift in LLM-Driven Code Editingcited by 0
  38. 2026MACGen: Toward Functionally Correct and Secure Code Generation via Multi-Agent Collaborationcited by 0

50 most cited of 55 All 55 (JSON)