[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"detail-sidebar-cat-0-en-105":3,"doc-seo-496430-105":59,"doc-detail-496430-en":131},{"code":4,"msg":5,"data":6},0,"success",[7,13,18,23,28,33,38,43,48,51,55],{"id":8,"doc_module":4,"doc_module_name":9,"category_name":10,"show_sort_weight":11,"slug":12},1,"Document","Story & Novel",90,"story-novel",{"id":14,"doc_module":4,"doc_module_name":9,"category_name":15,"show_sort_weight":16,"slug":17},2,"Literature",80,"literature",{"id":19,"doc_module":4,"doc_module_name":9,"category_name":20,"show_sort_weight":21,"slug":22},4,"Exam",70,"exam",{"id":24,"doc_module":4,"doc_module_name":9,"category_name":25,"show_sort_weight":26,"slug":27},5,"Comic",60,"comic",{"id":29,"doc_module":4,"doc_module_name":9,"category_name":30,"show_sort_weight":31,"slug":32},6,"Technology",50,"technology",{"id":34,"doc_module":4,"doc_module_name":9,"category_name":35,"show_sort_weight":36,"slug":37},7,"Healthcare",40,"healthcare",{"id":39,"doc_module":4,"doc_module_name":9,"category_name":40,"show_sort_weight":41,"slug":42},8,"Research & Report",30,"research-report",{"id":44,"doc_module":4,"doc_module_name":9,"category_name":45,"show_sort_weight":46,"slug":47},9,"Religion & Spirituality",20,"religion-spirituality",{"id":46,"doc_module":4,"doc_module_name":9,"category_name":49,"show_sort_weight":46,"slug":50},"World Cup","world-cup",{"id":52,"doc_module":4,"doc_module_name":9,"category_name":53,"show_sort_weight":52,"slug":54},10,"Lifestyle","lifestyle",{"id":56,"doc_module":4,"doc_module_name":9,"category_name":57,"show_sort_weight":24,"slug":58},19,"General","general",{"code":4,"msg":60,"data":61},"ok",{"site_id":62,"language":63,"slug":64,"title":65,"keywords":66,"description":67,"schema_data":68,"social_meta":124,"head_meta":126,"extra_data":128,"updated_unix":130},105,"en","ase-a-repository-level-benchmark-for-evaluating-security-in-ai-generated-code-496430","A.S.E: A Repository-Level Benchmark for Evaluating Security in AI-Generated Code","","The increasing adoption of large language models (LLMs) in software engineering necessitates rigorous security evaluation of their generated code. However, existing benchmarks often lack relevance to real-world AI-assisted programming scenarios, making them inadequate for assessing practical security risks in production. This paper introduces A.S.E, a repository-level evaluation benchmark that mirrors real AI coding tasks and provides a comprehensive, reliable framework for assessing security. Experiments with leading LLMs show persistent difficulty in secure coding, especially in complex repository settings.",{"@graph":69,"@context":123},[70,84,106],{"@type":71,"itemListElement":72},"BreadcrumbList",[73,77,79,82],{"item":74,"name":75,"@type":76,"position":8},"https://docshare.wps.com","Home","ListItem",{"item":78,"name":9,"@type":76,"position":14},"https://docshare.wps.com/document/",{"item":80,"name":40,"@type":76,"position":81},"https://docshare.wps.com/document/research-report/",3,{"item":83,"name":65,"@type":76,"position":19},"https://docshare.wps.com/document/ase-a-repository-level-benchmark-for-evaluating-security-in-ai-generated-code-496430/496430/",{"url":83,"name":65,"@type":85,"image":86,"author":91,"headline":65,"publisher":94,"fileFormat":97,"inLanguage":63,"description":67,"dateModified":98,"datePublished":99,"encodingFormat":97,"isAccessibleForFree":100,"interactionStatistic":101},"DigitalDocument",{"url":87,"@type":88,"width":89,"height":90},"https://docshare.wps.com/thumbnails/ase-a-repository-level-benchmark-for-evaluating-security-in-ai-generated-code-496430/496430.png","ImageObject",300,407,{"name":92,"@type":93},"Dipper","Person",{"url":74,"name":95,"@type":96},"DocShare","Organization","application/pdf","2026-11-25","2026-10-02",true,{"@type":102,"interactionType":103,"userInteractionCount":105},"InteractionCounter",{"@type":104},"ViewAction",12,{"@type":107,"mainEntity":108},"FAQPage",[109,115,119],{"name":110,"@type":111,"acceptedAnswer":112},"Why are existing benchmarks inadequate for evaluating security of AI-generated code?","Question",{"text":113,"@type":114},"Most focus on code quality such as syntax and functional correctness, while security considerations are insufficient. In addition, many datasets rely on synthetic snippets and isolated code-generation tasks that do not reflect real repository-level AI-assisted programming.","Answer",{"name":116,"@type":111,"acceptedAnswer":117},"What does A.S.E (AI Code Generation Security Evaluation) aim to do?",{"text":118,"@type":114},"A.S.E provides a repository-level benchmark that closely mirrors real-world AI programming scenarios, using high-quality GitHub repositories with documented CVEs to assess security risks of generated code.",{"name":120,"@type":111,"acceptedAnswer":121},"What key design features does A.S.E use for its evaluation?",{"text":122,"@type":114},"It uses CVE-related vulnerability code extracted from CVE patches as the data source, simulates realistic code-generation by providing intra-file and cross-file contexts to LLMs, and applies targeted static vulnerability detection rules for accurate and reproducible assessment.","https://schema.org",{"og:url":83,"og:type":125,"og:title":65,"og:site_name":95,"og:description":67},"article",{"robots":127,"canonical":83},"index,follow",{"doc_id":129,"site_id":62},496430,1791332327,{"code":4,"msg":5,"data":132},{"doc_id":129,"user_id":133,"nickname":92,"user_avatar":134,"doc_module":4,"category_id":39,"category_name":40,"doc_title":65,"doc_description":67,"doc_content":135,"file_id":136,"file_url":137,"file_type":138,"file_size":139,"view_count":105,"is_deleted":4,"is_public":8,"is_downloadable":8,"audit_status":8,"page_count":140,"language":141,"language_code":63,"site_id":62,"html_lang":63,"table_of_contents":142,"faqs":143,"seo_title":144,"seo_description":67,"update_tm":145,"read_time":146,"preview_page_count":19,"preview_urls":147},1374404997633,"https://ap-avatar.wpscdn.com/davatar_a8503ba1806abce46bf441b54a3ca4cd","arXiv :2508 . 18106v3 [ cs . SE] 18 Sep 2025  \nA.S.E: A Repository-Level Benchmark for Evaluating Security in  \nAI-Generated Code  \nKeke Lian 1†, Bing Wang2†, Lei Zhang3 , Libo Chen4 , Junjie Wang5 , Ziming Zhao6 , Yujiu Yang5 , Miaoqian Lin 1 , Haotong Duan 1 , Haoran Zhao3 , Shuang Liao3 , Mingda Guo3 , Jiazheng Quan2 , Yilu Zhong2 , Chenhao He4 , Zichuan Chen4 , Jie Wu5 , Haoling Li5 ,  \nZhaoxuan Li7 , Jiongchi Yu8 , Hui Li2∗, Dong Zhang 1∗  \n1 Tencent 2Peking University 3Fudan University 4 Shanghai Jiao Tong University  \n5 Tsinghua University 6Zhejiang University 7 Institute of Information Engineering, Chinese Academy of Sciences  \n8 Singapore Management University  \nA.S.E Code: [https://github.com/Tencent/AICGSecEval](https://github.com/Tencent/AICGSecEval)  \nA.S.E Website: [https://aicgseceval.tencent.com/home](https://aicgseceval.tencent.com/home)  \nAbstract  \nThe increasing adoption of large language models (LLMs) in software engineering necessitates rigorous security evaluation of their generated code. However, existing benchmarks often lack relevance to real-world AI-assisted programming scenarios, making them inadequate for assessing the practical security risks associated with AI-generated code in production environments. To address this gap, we introduce A.S.E (AI Code Generation Security Evaluation), a repository-level evaluation benchmark designed to closely mirror real-world AI programming tasks, offering a comprehensive and reliable framework for assessing the security of AI-generated code. Our evaluation of leading LLMs on A.S.E reveals several key findings. In particular, current LLMs still struggle with secure coding. The complexity in repository-level scenarios presents challenges for LLMs that typically perform well on snippet-level tasks. Moreover, a larger reasoning budget does not necessarily lead to better code generation. These observations offer valuable insights into the current state of AI code generation and help developers identify the most suitable models for practical tasks.  \n†Co-first authors.  \n* Corresponding authors: Hui Li ([lih64@pkusz.edu.cn](lih64@pkusz.edu.cn)) and Dong Zhang ( [zalezhang@tencent.com](zalezhang@tencent.com)).  \nThey also lay the groundwork for refining LLMs to generate secure and efficient code in real-world applications.  \n1 Introduction  \nThe rapid advancement of large language models (LLMs) has greatly enhanced the AI programming ecosystem, with tools like Cursor [1] and Claude Code [2] enabling developers to choose models that best fit their tasks. These AI assistants significantly improve programming efficiency, leading to a surge of AI-generated code in production environments. However, research [3, 4, 5, 6, 7, 8, 9, 10, 11] has shown that such code can harbor security vulnerabilities, posing serious risks such as data breaches or system failures [10, 3, 12, 13]. Relying on developers to ensure the security of AI-generated code can be highly challenging given the complexity of modern software systems. Therefore, there is a pressing need to identify and utilize AI models that are capable of generating secure code.  \nDespite the numerous benchmarks [14, 15, 16, 17, 7, 4, 5, 18, 6, 3, 11] developed by both academia and industry to evaluate AI-generated code, most of them [14, 15, 16, 17] primarily focus on code  \nquality, such as syntax correctness and functional accuracy, while overlooking critical security considerations. Although some benchmarks [7, 4, 5, 18, 6, 3, 11] attempt to address code security (as shown in Table 1), they are often inadequate to assess the actual security risks of AI-generated code in real-world production scenarios due to several key reasons: (a) Limited relevance to real-world data. These datasets are typically sourced from humancurated synthetic code snippets, which have limited relevance to the functional and security scenarios of real-world projects. (b) Code generation tasks detached from real-world AI programming. Their code gener","cbCait76282kFrQe","https://ap.wps.com/l/cbCait76282kFrQe","pdf",12496594,23,"English","# Introduction\n## Motivation and problem with existing benchmarks\n## A.S.E overview and design features","[{\"question\":\"Why are existing benchmarks inadequate for evaluating security of AI-generated code?\",\"answer\":\"Most focus on code quality such as syntax and functional correctness, while security considerations are insufficient. In addition, many datasets rely on synthetic snippets and isolated code-generation tasks that do not reflect real repository-level AI-assisted programming.\"},{\"question\":\"What does A.S.E (AI Code Generation Security Evaluation) aim to do?\",\"answer\":\"A.S.E provides a repository-level benchmark that closely mirrors real-world AI programming scenarios, using high-quality GitHub repositories with documented CVEs to assess security risks of generated code.\"},{\"question\":\"What key design features does A.S.E use for its evaluation?\",\"answer\":\"It uses CVE-related vulnerability code extracted from CVE patches as the data source, simulates realistic code-generation by providing intra-file and cross-file contexts to LLMs, and applies targeted static vulnerability detection rules for accurate and reproducible assessment.\"}]","A.S.E: A Repository-Level Benchmark for Evaluating Security in AI-Generated Code | PDF",1790931903,58,[148,152,156,160],{"page_no":8,"url":149,"width":150,"height":151},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-17/c239d6607e9e1b94d5804c8621461119.webp",983,1272,{"page_no":14,"url":153,"width":154,"height":155},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-17/a1b2101cb14c945f5ffbd1090f67742e.webp",982,1270,{"page_no":81,"url":157,"width":158,"height":159},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-17/174ad22ca137f0e63a5f8515718f3843.webp",981,1269,{"page_no":19,"url":161,"width":162,"height":163},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-17/3489b867860dc708f22f841699f29550.webp",980,1268]