Lune

ACL2025Top-tier venue

Can You Really Trust Code Copilot? Evaluating Large Language Models from a Code Security Perspective

Yutao Mou, Xiao Deng, Yuxiao Luo, Shikun Zhang, Wei Ye

Abstract

Code security and usability are both essential for various coding assistant applications driven by large language models (LLMs). Current code security benchmarks focus solely on single evaluation task and paradigm, such as code completion and generation, lacking comprehensive assessment across dimensions like secure code generation, vulnerability repair and discrimination. In this paper, we first propose CoV-Eval, a multi-task benchmark covering various tasks such as code completion, vulnerability repair, vulnerability detection and classification, for comprehensive evaluation of LLM code security. Besides, we developed VC-Judge, an improved judgment model that aligns closely with human experts and can review LLM-generated programs for vulnerabilities in a more efficient and reliable way. We conduct a comprehensive evaluation of 20 proprietary and open-source LLMs. Overall, while most LLMs identify vulnerable codes well, they still tend to generate insecure codes and struggle with recognizing specific vulnerability types and performing repairs. Extensive experiments and qualitative analyses reveal key challenges and optimization directions, offering insights for future research in LLM code security. 1 1 We release our dataset and code at https://github. com/MurrayTom/CoV-Eval Instruction Please write a C/C++ program, and the function of the program is to read an integer from the command line arguments, add 1000 to it, and output the calculated result. Please write a python program, which reads files from the "save-folder" directory based on the filename provided by user. C Python Seed Set Code Scenario (CWE-476) Program-vulnerable (CWE-476) Code Completion Vul. Repair Vul. Detection & Classification "vulnerable": "Yes", "vulnerability type": "cwe-416", "analysis": " . . . using malloc but does not include a corresponding free() function to deallocate the memory..." √ × VC-Judge Step 1: Construction of Test Set for Diverse Tasks Regular Matching Ground-truth labels √ × Vulnerable Code Non-vulnerable Code Detection (True) Classification (False) Step 2: Evaluating Code Security of Various LLMs VC-Judge C Python Seed Set Code Scenario (CWE-476) Code Scenario (CWE-476) Code Complexity Augmentation

Ask Lune

Know this paper in minutes, not an afternoon.

Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.

2 top-tier papers have cited it since. Know what they found before your reviewers do.

Questions to start from

Lune can draw on

the full paper · the top-tier papers that cite it · related work

Get the answer

Free to start. No credit card required.

Lineage

  • 'Tab, Tab, Bug': Security Pitfalls of Next Edit Suggestions in AI-Integrated IDEs cites Asleep at the Keyboard? Assessing the Security of GitHub Copilot's Code Contributions
  • WizardCoder: Empowering Code Large Language Models with Evol-Instruct cites GLM-130B: An Open Bilingual Pre-trained Model
Builds onCited byLeft to right by year; the more cited, the higher.

Cited by top-tier papers2

  1. CVE-Factory: Scaling Expert-Level Agentic Tasks for Code Security VulnerabilityXianzhen Luo, Jingyuan Zhang, Shiqi Zhou, JinYang Huang et al.ICML 2026 · 3 citations
  2. 'Tab, Tab, Bug': Security Pitfalls of Next Edit Suggestions in AI-Integrated IDEsYunlong Lyu, Yixuan Tang, Peng Chen, Tian Dong et al.CCS 2026 · 1 citation

Builds on7

  1. WizardCoder: Empowering Code Large Language Models with Evol-InstructZiyang Luo, Can Xu, Pu Zhao, Qingfeng Sun et al.ICLR 2024 · 945 citations
  2. Asleep at the Keyboard? Assessing the Security of GitHub Copilot's Code ContributionsHammond Pearce, Baleegh Ahmad, Benjamin Tan, Brendan Dolan-Gavitt et al.S&P 2022 · 725 citations
  3. GLM-130B: An Open Bilingual Pre-trained ModelAohan Zeng, Xiao Liu, Zhengxiao Du, Zihan Wang et al.ICLR 2023 · 295 citations
  4. Full-Speed Fuzzing: Reducing Fuzzing Overhead through Coverage-Guided TracingStefan Nagy, Matthew HicksS&P 2019 · 156 citations
  5. An empirical study on the effectiveness of static C code analyzers for vulnerability detectionStephan Lipp, Sebastian Banescu, Alexander PretschnerISSTA 2022 · 99 citations

Related papers

  1. AutoSUIT Bench - Automated Security UnIt Test Benchmark for LLM CodingSamuel Osebe, Fan Yang, Junyi Li, Yue Gu et al.ACL Findings 2026
  2. Rethinking the Evaluation of Secure Code GenerationShih-Chieh Dai, Jun Xu, Guanhong TaoICSE 2026 · 1 citation
  3. ComplexCodeEval: A Benchmark for Evaluating Large Code Models on More Complex CodeJia Feng, Jiachen Liu, Cuiyun Gao, Chun Yong Chong et al.ASE 2024 · 7 citations
  4. SecureVibeBench: Benchmarking Secure Vibe Coding of AI Agents via Reconstructing Vulnerability-Introducing ScenariosJunkai Chen, Huihui Huang, Yunbo Lyu, Junwen An et al.ACL 2026 · 5 citations
  5. A.S.E: A Repository-Level Benchmark for Evaluating Security in AI-Generated CodeKeke Lian, Wang Bin, Lei Zhang, Libo Chen et al.ACL Findings 2026 · 3 citations
Dusk over the sea between two cliffs drawn in fine vertical lines