论文精选

研究揭示自动程序修复代理存在安全漏洞

Adversarial Testing of Automated Program Repair Agents for Security Vulnerabilities

精选理由

朋友,这篇论文挺有意思的,它测试了几个主流的LLM模型在程序修复时的安全性,发现它们很容易被对抗性攻击诱导出漏洞,这个发现挺有价值的。

这篇论文通过创建包含750个对抗性问题的基准测试SWEADV,测试了GPT-5-Mini、MiniMax-M2.5和DeepSeek-R三个LLM后端的自动程序修复代理。研究发现,在51.7%的情况下,这些对抗性问题能诱导代理生成功能正确但存在安全漏洞的代码。预修复检测的平均准确率仅为62.3%,而使用静态分析工具和LLM作为判定的后修复检测准确率更低,分别只有39.4%和55.4%。

原文 · arXiv: DeepSeek

Adversarial Testing of Automated Program Repair Agents for Security Vulnerabilities

Software agents with Large Language Models (LLMs) are designed for Automated Program Repair (APR) tasks, raising the possibility that, in the near future, APR agents will fix bugs automatically without much human intervention. Can we trust an APR agent to produce both functionally correct and secure code in such situations? What if attackers target production APR agents with adversarial issues that seem benign but may influence the agents to produce correct but insecure code? In this paper, we took a first step towards answering these questions by conducting an empirical study. First, we created SWEADV, a benchmark of 750 adversarial issue descriptions constructed from 150 repair tasks in SWE-bench Verified. For each repair task, we created five adversarial issue descriptions, one for each attack type: command execution, deserialization, path traversal, denial of service, and weak hashing. Second, we evaluated mini_swe APR agents from three LLM backends on SWEADV: GPT-5-Mini, MiniMax-M2.5, and DeepSeek-R. We found that on average, adversarial issue descriptions can induce malicious behaviors with successful repair in 51.7% of cases. Third, we investigated whether typical detection mechanisms are sufficient to prevent such malicious patches from being accepted. Pre-repair detection with LLM-as-judge on the adversarial issue descriptions resulted in an average detection accuracy of only 62.3%. Post-repair detection on adversarial APR patches using static analysis tools and LLM-as-judge achieved average detection accuracies of only 39.4% and 55.4%, respectively. We conclude that autonomous APR agents cannot be trusted yet in production deployment, given their susceptibility to adversarial attacks.