首个多语言补丁回滚基准测试,助力自动化修复旧版软件漏洞
BackportBench: A Multilingual Benchmark for Automated Backporting of Patches
- 构建涵盖三类主流包管理器的202个可运行回滚任务
- 发现智能体方法在需逻辑结构修改的任务中表现最优
- 为开发者和研究者提供可复现的评估标准与实践指引
现代软件项目快速演进以集成新功能和安全补丁。用户虽应更新依赖以保障安全,但因升级可能破坏现有代码,仍普遍使用老旧且易受攻击的版本。开发者可通过将安全补丁回滚至旧版本缓解此问题,但手动操作耗时且易出错。现有自动化回滚技术多局限于代码块或函数级场景,且评估指标不完善。为此,我们提出BackportBench——首个综合性多语言补丁回滚基准测试,包含来自PyPI、Maven和npm的202个回滚任务,每个任务均配备可执行Docker环境与相关测试用例。我们基于该基准评估了现有补丁移植方法及具备潜力的LLM技术。结果表明,智能体方法在需逻辑与结构变更的场景中优于传统方法,但跨语言性能差异明显。据此,我们为未来自动化回滚研究与实践提出若干启示。
原文摘要 · Abstract (English)
Many modern software projects evolve rapidly to incorporate new features and security patches. It is important for users to update their dependencies to safer versions, but many still use older, vulnerable package versions because upgrading can be difficult and may break their existing codebase. Software developers can mitigate this problem by backporting security patches to older releases. However, manually backporting is time-consuming and error-prone. The effectiveness of existing automated backporting techniques on general software remains unclear since they typically target only code-hunk or function-level patch porting scenarios and are evaluated with imperfect metrics. To facilitate the development and evaluation of automated backporting techniques, we introduce BackportBench, the first comprehensive benchmark suite for patch backporting problem. BackportBench is a multilingual benchmark that contains 202 patch backporting problems from PyPI, Maven, and npm, each with executable Docker environments and relevant test cases. We evaluated existing patch porting methods and LLM-based techniques that have the potential to adapt to this task using BackportBench. The results show that the agentic method has outperformed traditional patch porting methods, especially on cases that require logical and structural changes. However, the performance varies across different programming languages. Based on the findings, we draw several implications for researchers and software practitioners in future work on automated backporting.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。