論文の概要: RealSec-bench: A Benchmark for Evaluating Secure Code Generation in Real-World Repositories
- arxiv url: http://arxiv.org/abs/2601.22706v1
- Date: Fri, 30 Jan 2026 08:29:01 GMT
- ステータス: 翻訳完了
- システム内更新日: 2026-02-02 18:28:15.322553
- Title: RealSec-bench: A Benchmark for Evaluating Secure Code Generation in Real-World Repositories
- Title(参考訳): RealSec-bench: 現実世界のリポジトリでセキュアなコード生成を評価するベンチマーク
- Authors: Yanlin Wang, Ziyao Zhang, Chong Wang, Xinyi Xu, Mingwei Liu, Yong Wang, Jiachi Chen, Zibin Zheng,
- Abstract要約: LLM(Large Language Models)は、コード生成において顕著な能力を示しているが、セキュアなコードを生成する能力は依然として重要で、未調査の領域である。
我々はRealSec-benchを紹介します。RealSec-benchは、現実世界の高リスクなJavaリポジトリから慎重に構築されたセキュアなコード生成のための新しいベンチマークです。
- 参考スコア(独自算出の注目度): 58.32028251925354
- License: http://arxiv.org/licenses/nonexclusive-distrib/1.0/
- Abstract: Large Language Models (LLMs) have demonstrated remarkable capabilities in code generation, but their proficiency in producing secure code remains a critical, under-explored area. Existing benchmarks often fall short by relying on synthetic vulnerabilities or evaluating functional correctness in isolation, failing to capture the complex interplay between functionality and security found in real-world software. To address this gap, we introduce RealSec-bench, a new benchmark for secure code generation meticulously constructed from real-world, high-risk Java repositories. Our methodology employs a multi-stage pipeline that combines systematic SAST scanning with CodeQL, LLM-based false positive elimination, and rigorous human expert validation. The resulting benchmark contains 105 instances grounded in real-word repository contexts, spanning 19 Common Weakness Enumeration (CWE) types and exhibiting a wide diversity of data flow complexities, including vulnerabilities with up to 34-hop inter-procedural dependencies. Using RealSec-bench, we conduct an extensive empirical study on 5 popular LLMs. We introduce a novel composite metric, SecurePass@K, to assess both functional correctness and security simultaneously. We find that while Retrieval-Augmented Generation (RAG) techniques can improve functional correctness, they provide negligible benefits to security. Furthermore, explicitly prompting models with general security guidelines often leads to compilation failures, harming functional correctness without reliably preventing vulnerabilities. Our work highlights the gap between functional and secure code generation in current LLMs.
- Abstract(参考訳): LLM(Large Language Models)は、コード生成において顕著な能力を示しているが、セキュアなコードを生成する能力は依然として重要で、未調査の領域である。
既存のベンチマークは、合成脆弱性に頼るか、独立して機能的正当性を評価することで不足することが多く、現実世界のソフトウェアに見られる機能とセキュリティの間の複雑な相互作用を捉えていない。
このギャップに対処するために、RealSec-benchを紹介します。RealSec-benchは、現実世界の高リスクなJavaリポジトリから慎重に構築されたセキュアなコード生成のための新しいベンチマークです。
提案手法では,体系的なSASTスキャンとCodeQL,LLMに基づく偽陽性除去,厳密な人間専門家による検証を組み合わせた多段階パイプラインを用いる。
結果として得られたベンチマークには、19のCommon Weakness Enumeration (CWE)タイプにまたがる105のインスタンスが含まれている。
また,RealSec-benchを用いて,5つのLLMの広範な実験を行った。
機能的正当性とセキュリティを同時に評価するために,新しい複合メトリックSecurePass@Kを導入する。
Retrieval-Augmented Generation (RAG)技術は機能的正当性を向上するが、セキュリティには無視できる利点がある。
さらに、一般的なセキュリティガイドラインでモデルを明示的にプロンプトすることは、しばしばコンパイルの失敗を招き、脆弱性を確実に防止することなく機能的正しさを損なう。
我々の研究は、現在のLLMにおける機能的コード生成とセキュアコード生成のギャップを強調します。
関連論文リスト
- Beyond Code Similarity: Benchmarking the Plausibility, Efficiency, and Complexity of LLM-Generated Smart Contracts [3.3672086394822762]
LLMは実契約によく似た意味を持つコードを生成する。
ゼロショット世代のうち20%から26%のみが、テスト中のゼロショット実装と同じ振る舞いをする。
Retrieval-Augmented Generationはパフォーマンスを大幅に向上し、機能的正しさを最大45%向上させる。
論文 参考訳(メタデータ) (2025-11-20T10:47:59Z) - A.S.E: A Repository-Level Benchmark for Evaluating Security in AI-Generated Code [49.009041488527544]
A.S.Eは、AI生成コードのセキュリティを評価するためのリポジトリレベルの評価ベンチマークである。
現在の大規模言語モデル(LLM)は、セキュアなコーディングに苦戦している。
大きな推論予算は、必ずしもより良いコード生成につながるとは限らない。
論文 参考訳(メタデータ) (2025-08-25T15:11:11Z) - Training Language Models to Generate Quality Code with Program Analysis Feedback [66.0854002147103]
大規模言語モデル(LLM)によるコード生成は、ますます本番環境で採用されているが、コード品質の保証には失敗している。
実運用品質のコードを生成するためにLLMにインセンティブを与える強化学習フレームワークであるREALを提案する。
論文 参考訳(メタデータ) (2025-05-28T17:57:47Z) - Benchmarking LLMs and LLM-based Agents in Practical Vulnerability Detection for Code Repositories [8.583591493627276]
JitVulは、各関数をその脆弱性導入とコミットの修正にリンクする脆弱性検出ベンチマークである。
思考・行動・観察と相互言語的文脈を活用するReAct Agentsは,良性のあるコードと区別する上で,LLMよりも優れた性能を示すことを示す。
論文 参考訳(メタデータ) (2025-03-05T15:22:24Z) - CWEval: Outcome-driven Evaluation on Functionality and Security of LLM Code Generation [20.72188827088484]
大規模言語モデル(LLM)は、コード記述の生成や支援によって、開発者を大いに助けている。
機能的に正しいコードの脆弱性を検出することは、特にセキュリティ知識が限られている開発者にとっては、より難しい。
我々は、LLMによるセキュアコード生成の評価を強化するために、新しい結果駆動型評価フレームワークであるCWEvalを紹介する。
論文 参考訳(メタデータ) (2025-01-14T15:27:01Z) - SALAD-Bench: A Hierarchical and Comprehensive Safety Benchmark for Large Language Models [107.82336341926134]
SALAD-Benchは、大規模言語モデル(LLM)を評価するために特別に設計された安全ベンチマークである。
それは、その大規模な、豊富な多様性、三つのレベルにまたがる複雑な分類、多目的機能を通じて、従来のベンチマークを超越している。
論文 参考訳(メタデータ) (2024-02-07T17:33:54Z)
関連論文リストは本サイト内にある論文のタイトル・アブストラクトから自動的に作成しています。
指定された論文の情報です。
本サイトの運営者は本サイト(すべての情報・翻訳含む)の品質を保証せず、本サイト(すべての情報・翻訳含む)を使用して発生したあらゆる結果について一切の責任を負いません。