ChatPaper.aiChatPaper

A.S.E: AI生成コードのセキュリティ評価のためのリポジトリレベルベンチマーク

A.S.E: A Repository-Level Benchmark for Evaluating Security in AI-Generated Code

August 25, 2025
著者: Keke Lian, Bin Wang, Lei Zhang, Libo Chen, Junjie Wang, Ziming Zhao, Yujiu Yang, Haotong Duan, Haoran Zhao, Shuang Liao, Mingda Guo, Jiazheng Quan, Yilu Zhong, Chenhao He, Zichuan Chen, Jie Wu, Haoling Li, Zhaoxuan Li, Jiongchi Yu, Hui Li, Dong Zhang
cs.AI

要旨

ソフトウェアエンジニアリングにおける大規模言語モデル(LLM)の採用が増加する中、生成されるコードの厳密なセキュリティ評価が求められています。しかし、既存のベンチマークは不十分であり、孤立したコードスニペットに焦点を当て、再現性に欠ける不安定な評価方法を採用し、入力コンテキストの品質と出力のセキュリティを結びつけることに失敗しています。これらのギャップを埋めるため、我々はA.S.E(AI Code Generation Security Evaluation)を導入します。これは、リポジトリレベルのセキュアなコード生成のためのベンチマークです。A.S.Eは、CVEが文書化された実世界のリポジトリからタスクを構築し、ビルドシステムやクロスファイル依存関係などの完全なリポジトリコンテキストを保持します。その再現可能でコンテナ化された評価フレームワークは、専門家が定義したルールを使用して、セキュリティ、ビルド品質、生成安定性の安定した監査可能な評価を提供します。A.S.Eでの主要なLLMの評価から、以下の3つの重要な発見が得られました:(1)Claude-3.7-Sonnetが全体的なパフォーマンスで最高の結果を達成しました。(2)プロプライエタリモデルとオープンソースモデルの間のセキュリティギャップは狭く、Qwen3-235B-A22B-Instructが最高のセキュリティスコアを獲得しました。(3)セキュリティパッチングにおいて、簡潔で「速い思考」のデコード戦略が、複雑で「遅い思考」の推論を一貫して上回りました。
English
The increasing adoption of large language models (LLMs) in software engineering necessitates rigorous security evaluation of their generated code. However, existing benchmarks are inadequate, as they focus on isolated code snippets, employ unstable evaluation methods that lack reproducibility, and fail to connect the quality of input context with the security of the output. To address these gaps, we introduce A.S.E (AI Code Generation Security Evaluation), a benchmark for repository-level secure code generation. A.S.E constructs tasks from real-world repositories with documented CVEs, preserving full repository context like build systems and cross-file dependencies. Its reproducible, containerized evaluation framework uses expert-defined rules to provide stable, auditable assessments of security, build quality, and generation stability. Our evaluation of leading LLMs on A.S.E reveals three key findings: (1) Claude-3.7-Sonnet achieves the best overall performance. (2) The security gap between proprietary and open-source models is narrow; Qwen3-235B-A22B-Instruct attains the top security score. (3) Concise, ``fast-thinking'' decoding strategies consistently outperform complex, ``slow-thinking'' reasoning for security patching.
PDF733September 1, 2025