[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"doc-seo-496053-105":3,"detail-sidebar-cat-0-en-105":81,"doc-detail-496053-en":131},{"code":4,"msg":5,"data":6},0,"ok",{"site_id":7,"language":8,"slug":9,"title":10,"keywords":11,"description":12,"schema_data":13,"social_meta":74,"head_meta":76,"extra_data":78,"updated_unix":80},105,"en","ase-a-repository-level-benchmark-for-evaluating-security-in-ai-generated-code","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 requires rigorous, real-world aligned security evaluation for generated code. Existing benchmarks often mismatch production AI-assisted programming and fail to quantify practical security risk. A.S.E (AI Code Generation Security Evaluation) introduces a repository-level benchmark with security defined as the reduction of CVE-aligned static analysis alerts after patch integration. Results show persistent difficulties in secure coding.",{"@graph":14,"@context":73},[15,34,56],{"@type":16,"itemListElement":17},"BreadcrumbList",[18,23,27,31],{"item":19,"name":20,"@type":21,"position":22},"https://docshare.wps.com","Home","ListItem",1,{"item":24,"name":25,"@type":21,"position":26},"https://docshare.wps.com/document/","Document",2,{"item":28,"name":29,"@type":21,"position":30},"https://docshare.wps.com/document/research-report/","Research & Report",3,{"item":32,"name":10,"@type":21,"position":33},"https://docshare.wps.com/document/ase-a-repository-level-benchmark-for-evaluating-security-in-ai-generated-code/496053/",4,{"url":32,"name":10,"@type":35,"image":36,"author":41,"headline":10,"publisher":44,"fileFormat":47,"inLanguage":8,"description":12,"dateModified":48,"datePublished":49,"encodingFormat":47,"isAccessibleForFree":50,"interactionStatistic":51},"DigitalDocument",{"url":37,"@type":38,"width":39,"height":40},"https://docshare.wps.com/thumbnails/ase-a-repository-level-benchmark-for-evaluating-security-in-ai-generated-code/496053.png","ImageObject",300,407,{"name":42,"@type":43},"pop out","Person",{"url":19,"name":45,"@type":46},"DocShare","Organization","application/pdf","2026-11-16","2026-10-02",true,{"@type":52,"interactionType":53,"userInteractionCount":55},"InteractionCounter",{"@type":54},"ViewAction",15,{"@type":57,"mainEntity":58},"FAQPage",[59,65,69],{"name":60,"@type":61,"acceptedAnswer":62},"What problem does A.S.E address in evaluating AI-generated code security?","Question",{"text":63,"@type":64},"A.S.E addresses the mismatch between existing benchmarks and real-world AI-assisted programming, where current evaluations often miss practical security risks in production settings.","Answer",{"name":66,"@type":61,"acceptedAnswer":67},"How does A.S.E operationalize “security” for AI-generated code?",{"text":68,"@type":64},"Security is measured as the reduction of CVE-aligned static analysis alerts after patch integration.",{"name":70,"@type":61,"acceptedAnswer":71},"What key findings does the evaluation of leading LLMs on A.S.E reveal?",{"text":72,"@type":64},"The study finds that current LLMs still struggle with secure coding, that repository-level complexity challenges snippet-focused performance, and that a larger reasoning budget does not necessarily improve code generation quality.","https://schema.org",{"og:url":32,"og:type":75,"og:title":10,"og:site_name":45,"og:description":12},"article",{"robots":77,"canonical":32},"index,follow",{"doc_id":79,"site_id":7},496053,1791160259,{"code":4,"msg":82,"data":83},"success",[84,88,92,96,101,106,111,115,120,123,127],{"id":22,"doc_module":4,"doc_module_name":25,"category_name":85,"show_sort_weight":86,"slug":87},"Story & Novel",90,"story-novel",{"id":26,"doc_module":4,"doc_module_name":25,"category_name":89,"show_sort_weight":90,"slug":91},"Literature",80,"literature",{"id":33,"doc_module":4,"doc_module_name":25,"category_name":93,"show_sort_weight":94,"slug":95},"Exam",70,"exam",{"id":97,"doc_module":4,"doc_module_name":25,"category_name":98,"show_sort_weight":99,"slug":100},5,"Comic",60,"comic",{"id":102,"doc_module":4,"doc_module_name":25,"category_name":103,"show_sort_weight":104,"slug":105},6,"Technology",50,"technology",{"id":107,"doc_module":4,"doc_module_name":25,"category_name":108,"show_sort_weight":109,"slug":110},7,"Healthcare",40,"healthcare",{"id":112,"doc_module":4,"doc_module_name":25,"category_name":29,"show_sort_weight":113,"slug":114},8,30,"research-report",{"id":116,"doc_module":4,"doc_module_name":25,"category_name":117,"show_sort_weight":118,"slug":119},9,"Religion & Spirituality",20,"religion-spirituality",{"id":118,"doc_module":4,"doc_module_name":25,"category_name":121,"show_sort_weight":118,"slug":122},"World Cup","world-cup",{"id":124,"doc_module":4,"doc_module_name":25,"category_name":125,"show_sort_weight":124,"slug":126},10,"Lifestyle","lifestyle",{"id":128,"doc_module":4,"doc_module_name":25,"category_name":129,"show_sort_weight":97,"slug":130},19,"General","general",{"code":4,"msg":82,"data":132},{"doc_id":79,"user_id":133,"nickname":42,"user_avatar":134,"doc_module":4,"category_id":112,"category_name":29,"doc_title":10,"doc_description":12,"doc_content":135,"file_id":136,"file_url":137,"file_type":138,"file_size":139,"view_count":55,"is_deleted":4,"is_public":22,"is_downloadable":22,"audit_status":22,"page_count":140,"language":141,"language_code":8,"site_id":7,"html_lang":8,"table_of_contents":142,"faqs":143,"seo_title":144,"seo_description":12,"update_tm":145,"read_time":109,"preview_page_count":33,"preview_urls":146},962090760408,"https://ap-avatar.wpscdn.com/davatar_085a072bc5b1113ac321206ff7593b45","A.S.E: A Repository-Level Benchmark for Evaluating Security in  \nAI-Generated Code  \nKeke Lian1 * , Bing Wang2∗, Lei Zhang3 , Libo Chen4 , Junjie Wang5 ,  \nZiming Zhao6 , Yujiu Yang5 , Miaoqian Lin1 , Haotong Duan1 , Haoran Zhao3 , Shuang Liao3 , Mingda Guo3 , Jiazheng Quan2 , Yilu Zhong2 , Chenhao He4 , Zichuan Chen4 , Jie Wu5 , Haoling Li5 , Zhaoxuan Li7 , Jiongchi Yu8 ,  \nHui Li2†, Dong Zhang1†  \n1Tencent 2Peking University 3Fudan University 4 Shanghai Jiao Tong University 5Tsinghua University 6Zhejiang University 7IIE, Chinese Academy of Sciences 8 Singapore Management University  \nCorrespondence: [lih64@pkusz.edu.cn](lih64@pkusz.edu.cn), [zalezhang@tencent.com](zalezhang@tencent.com)  \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 measuring security in AI-generated code, where security is operationalized as the reduction of CVE-aligned static analysis alerts after patch integration.  \nOur evaluation of leading LLMs on A.S.E reveals several key findings. In particular, current LLMs still struggle with secure coding.  \nThe 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. They 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 (Cursor, 2025) and Claude Code (Anthropic, 2025) enabling developers to choose models that best fit their tasks. These AI assistants significantly improve programming efficiency, leading to a surge of AI-generated  \n*Equal contribution.  \n†Corresponding authors.  \ncode in production environments. However, research (Siddiq and Santos, 2022 ; Vero et al., 2025 ; Peng et al., 2025 ; Hajipour et al., 2024 ; Li et al., 2025b ; Fu et al., 2024b ; He and Vechev, 2023 ; Pearce et al., 2025 ; Wang et al., 2024) has shown that such code can harbor security vulnerabilities, posing serious risks such as data breaches or system failures (Pearce et al., 2025 ; Siddiq and Santos, 2022 ; Fu et al., 2023 ; Li and Paxson, 2017) . Relying on developers to ensure the security of AIgenerated 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 (Hendryckset al., 2021 ; Dou et al., 2024 ; Chen et al., 2021 ; Austin et al., 2021 ; Li et al., 2025b ; Vero et al., 2025 ; Peng et al., 2025 ; Fu et al., 2024a ; Hajipour et al., 2024 ; Siddiq and Santos, 2022 ; Wanget al., 2024) developed by both academia and industry to evaluate AI-generated code, most of them (Hendrycks et al., 2021 ; Dou et al., 2024 ; Chenet al., 2021 ; Austin et al., 2021) primarily focus on code quality, such as syntax correctness and functional accuracy, while overlooking critical security considerations. Although some benchmarks (Liet al., 2025b ; Vero et al., 2025 ; Peng et al., 2025 ; Fu et al., 2024a ; Hajipour et al., 2024 ; Siddiq and Santos, 2022 ; Wang et al., 2024) attempt to address code securit","cbCaiv3NtP2aURCa","https://ap.wps.com/l/cbCaiv3NtP2aURCa","pdf",6379978,16,"English","# Introduction\n## Motivation and gap in existing benchmarks\n## A.S.E benchmark design\n## Evaluation results and observations","[{\"question\":\"What problem does A.S.E address in evaluating AI-generated code security?\",\"answer\":\"A.S.E addresses the mismatch between existing benchmarks and real-world AI-assisted programming, where current evaluations often miss practical security risks in production settings.\"},{\"question\":\"How does A.S.E operationalize “security” for AI-generated code?\",\"answer\":\"Security is measured as the reduction of CVE-aligned static analysis alerts after patch integration.\"},{\"question\":\"What key findings does the evaluation of leading LLMs on A.S.E reveal?\",\"answer\":\"The study finds that current LLMs still struggle with secure coding, that repository-level complexity challenges snippet-focused performance, and that a larger reasoning budget does not necessarily improve code generation quality.\"}]","A.S.E - A Repository-Level Benchmark for Evaluating Security in AI-Generated Code | PDF",1790926903,[147,151,155,159],{"page_no":22,"url":148,"width":149,"height":150},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-17/d2c14d3be8204309136c1be321928b79.webp",983,1390,{"page_no":26,"url":152,"width":153,"height":154},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-17/2623973a512c8abd339859d4c85a3ce6.webp",982,1388,{"page_no":30,"url":156,"width":157,"height":158},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-17/3923bb581c82beefe8e607b569d78b73.webp",981,1387,{"page_no":33,"url":160,"width":161,"height":162},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-17/323cda24db05ae6b7e947101071ebf84.webp",980,1385]