Research map / Large language models / Agents, code and math
RealSec-bench: A Benchmark for Evaluating Secure Code Generation in Real-World Repositories
Yanlin Wang, Ziyao Zhang, Chong Wang, Xinyi Xu, Mingwei Liu, Yong Wang, Jiachi Chen, Zibin Zheng
Sun Yat-sen University · Nanyang Technological University · Alibaba Group · Zhejiang University
Read the paperPlace an idea next to itCheck your own paper ↗
AI-extracted. The measured effects below were read by AI from the paper's full text (no summary yet). Numbers and claims can be wrong or missing context, so check the paper before you cite or build on it.
Measured effects reported in the paper
| What was changed | Where | Measured | Effect |
|---|---|---|---|
| add Final Judger on top of three voters (ablation) | SAST adjudication pipeline · manually reviewed 89 alerts | F1: 72.3% -> 89.1% | Improved |
| add Final Judger on top of three voters (ablation) | SAST adjudication pipeline · manually reviewed 89 alerts | precision: 63.0% -> 81.7% | Improved |
| add three voters to raw SAST (ablation) | SAST scan · manually reviewed 89 alerts | recall: 100.0% -> 85.0% | Hurt |
| add retrieval (RAG) | LLMs on RealSec-bench · RealSec-bench | Pass@1 | Improved |
| add retrieval (RAG) | LLMs on RealSec-bench · RealSec-bench | SecurePass@1 | No clear effect |
| use inter-procedural dataflow retriever instead of text-based retrievers (ablation) | RAG · RealSec-bench | SecurePass@1 | Hurt |
| add security guidelines to prompt (ablation) | Claude-3.7-Sonnet · RealSec-bench | Pass@1: 16.2% -> 9.5% | Hurt |
| add security guidelines to prompt (ablation) | Deepseek-V3 and GPT-4.1 · RealSec-bench | SecurePass@1 | Improved |
| add security guidelines to prompt (ablation) | LLMs on RealSec-bench · RealSec-bench | SecurePass@1 (average) | No clear effect |
| use semantic dense retriever (ablation) | Claude-3.7-Sonnet · RealSec-bench | SecurePass@1: 7.6% | Improved |
| use BM25 retriever (ablation) | Qwen3-235B · RealSec-bench | SecurePass@1: up to 7.6% | Improved |
| use any retriever instead of none (ablation) | GPT-4.1 · RealSec-bench | SecurePass@1 | No clear effect |
Open problems this paper states
- “Benchmark is restricted to open-source, Maven-based Java repositories, limiting generalization to other languages and proprietary software.” → Tested on Python or a few languages, so other languages are untested. (an open problem in code generation benchmarks)
Open problems in code generation benchmarks
Do code benchmarks and methods hold beyond Python, small test sets and leaked data?
- Tested on Python or a few languages, so other languages are untested. · 25 papers state it
- Benchmarks are small, with a few dozen to a few hundred problems. · 14 papers state it
- Iterative or multi-step methods cost more tokens, latency and compute. · 12 papers state it
Closest papers by meaning
- BaxBench: Can LLMs Generate Correct and Secure Backends? (ICML 2025 · similarity 0.90)
- SEC-bench: Automated Benchmarking of LLM Agents on Real-World Software Security Tasks (NeurIPS 2025 · similarity 0.89)
- DOMAINEVAL: An Auto-Constructed Benchmark for Multi-Domain Code Generation (AAAI 2025 · similarity 0.88)
- LiveCodeBench: Holistic and Contamination Free Evaluation of Large Language Models for Code (ICLR 2025 · similarity 0.88)
- Instruction Tuning for Secure Code Generation (ICML 2024 · similarity 0.88)
- ProSec: Fortifying Code LLMs with Proactive Security Alignment (ICML 2025 · similarity 0.87)
Writing a paper in this area? scime draft is a free LaTeX editor with AI included, real-time co-authors and a check of your references and venue rules before you submit. It also imports OpenAI Prism projects.