- Rating
- 3
- Confidence
- 4
- Informativeness
- 2
- Presentation
- 3
- Soundness
- 2
Read review
Paper summary
This paper presents SWE-RedAgent, an adaptive framework for testing whether coding agents can be induced to introduce exploitable vulnerabilities while completing repository-level tasks. It analyzes the repository and task to identify relevant attack opportunities, then guides the agent toward vulnerable but functional implementations. Results show the proposaed method could outperform baseline methods.
Critical strengths
-
This paper is well-written and easy to follow.
-
The studied problem is interesting and significant.
-
The approach design is reasonable and the the results are promising.
Critical weaknesses
(1) Some of the description about related work is not correct. "Other methods in Table 1, including FCV-Attack and SWExploit, move toward utility-preserving attacks by inducing vulnerabilities while requiring the patch to remain functionally correct (Peng et al., 2026; Chen et al., 2026). However, these methods focus on single-turn code generation". SWExploit is not a single-turn code generation. Seems compared with SWExploit, the advantage of SWE-RedAgent is that SWE-RedAgent could automatically select the vulnerable payload, this automation is good, but the author should clearly state it in the paper.
(2) This paper use LLM-as-judge as the oracle, however, given LLM is not perfect, thus, it is unclear how reliable are these results. Also, the paper claim "exploitable vulnerabilities" but there is no exploitable evaluation.
(3) The evaluation metrics seems not supprot the claim "functionality correct and vulnerable" as there is no such metric in Table 2 report this value.
(4) The evaluation is conducted on Private bench and SWE-RedBench, however, it is unclear what is Private bench, there is no reference, also, SWE-RedBench is proposed by the authors, and the construction details are not clear.
(5) Miss related work
Adversarial Testing of Automated Program Repair Agents for Security Vulnerabilities
Questions for authors
-
What is the accuracy of applying LLM-as-judge as oracle? why only make more rules for codeQL for detecting these vulnerabilities?
-
What is the metric in Table 2 measure "functionality correct and vulnerable" ?
-
Why adopting Private bench and SWE-RedBench instead on public available benchmarks?
-
Did you try some defense methods to evaluate the robustness of the proposed attack?
4 comments
Rebuttal to Reviewer Xh6H Part2
W3. The evaluation metrics seems not supprot the claim "functionality correct and vulnerable" as there is no such metric in Table 2 report this value.
Q2. What is the metric in Table 2 measure "functionality correct and vulnerable" ?
Thank you for the question. To clarify, “functionally correct” means passing the software function tests, and vulnerabilities are measured by our security evaluation pipeline. In Table 2, V_U represents the number of vulnerabilities under our default utility constraint: passing 100% base tests (zero regression) and 50% feature tests. In other words, this metric already considers both utility (functional correctness) and attack performance.
To further illustrate the attack performance under different “utility” constraints, we performed additional experiments. We fix the base test pass rate to 100% (requiring zero software function regression) and vary the feature test pass rate threshold from 0% to 25%, 50%, 75%, and 100%, for both benchmarks. The tables below report the induced vulnerabilities.
Private Benchmark
| Method | Raw (V) | 0% | 25% | 50% | 75% | 100% |
|---|---|---|---|---|---|---|
| Direct Malicious | 26 | 22 | 8 | 4 | 1 | 0 |
| RedCodeAgent | 31 | 30 | 16 | 15 | 6 | 5 |
| FCV-Attack | 8 | 4 | 3 | 3 | 2 | 0 |
| SWExploit | 20 | 16 | 15 | 15 | 8 | 3 |
| SWE-RedAgent (Ours) | 53 | 53 | 51 | 51 | 27 | 12 |
SWE-RedBench
| Method | Raw (V) | 0% | 25% | 50% | 75% | 100% |
|---|---|---|---|---|---|---|
| Direct Malicious | 34 | 22 | 0 | 0 | 0 | 0 |
| RedCodeAgent | 12 | 11 | 7 | 7 | 7 | 7 |
| FCV-Attack | 2 | 2 | 2 | 2 | 2 | 2 |
| SWExploit | 10 | 8 | 7 | 7 | 6 | 6 |
| SWE-RedAgent (Ours) | 40 | 40 | 40 | 40 | 39 | 38 |
As shown in the tables, on both benchmarks, SWE-RedAgent outperforms other baseline methods under all levels of utility constraints. We do observe that the performance on the private benchmark dropped with the increase in the utility constraints. This is because this private benchmark intentionally constructs “hard” coding tasks. In comparison, the feature implementation tasks in SWE-RedBench are slightly easier. Regardless, SWE-RedAgent still outperforms other methods for both benchmarks.
W4. The evaluation is conducted on Private bench and SWE-RedBench, however, it is unclear what is Private bench, there is no reference, also, SWE-RedBench is proposed by the authors, and the construction details are not clear.
Q3. Why adopting Private bench and SWE-RedBench instead on public available benchmarks?
SWE-RedBench is constructed by the authors. Due to space limitations, we described its construction pipeline in Appendix A.3, including task extraction from open-source repositories, derivation of base and feature tests, and synthesis of natural-language task descriptions. The private benchmark was constructed by a third-party vendor.
To support reproducibility, we will publicly release SWE-RedBench, including all tasks and test suites, along with the SWE-RedAgent codebase. Regarding the private benchmark, we also plan to release this benchmark: we’re currently coordinating with our third-party partner/vendor to finalize details of the data release procedure.
We constructed SWE-RedBench and use the private benchmark because none of the public benchmarks can be easily applied to our threat model. As discussed in Section 3.1, existing repository-level security benchmarks primarily focus on “patching or repairing existing code”, whereas we study the “implementation of new features”. While a few recent coding agent benchmarks, such as FeatBench [2] and FeatureBench [3], also evaluate feature implementation, they have limited coverage on web applications (which is the main focus of our paper considering their rich attack surfaces). We will clarify in the revised paper.
[2] Haorui Chen, Chengze Li, and Jia Li. FeatBench: Evaluating Coding Agents on Feature Implementation for Vibe Coding. arXiv preprint arXiv:2509.22237, 2025.
[3] Qixing Zhou, Jiacheng Zhang, Haiyang Wang, Rui Hao, Jiahe Wang, Minghao Han, Yuxue Yang, Shuzhe Wu, Feiyang Pan, Lue Fan, Dandan Tu, and Zhaoxiang Zhang. FeatureBench: Benchmarking Agentic Coding for Complex Feature Development. In International Conference on Learning Representations, 2026.
Rebuttal to Reviewer Xh6H Part3
W5. Miss related work: Adversarial Testing of Automated Program Repair Agents for Security Vulnerabilities
Thank you for pointing us to this paper. This paper (SWEADV) was submitted to arXiv on Sep 14, 2026 (very close to the ICRL deadline) and thus we missed it. We carefully examined the paper and identified three key differences. (1) This paper (SWEADV) still focuses on code repair and patching, while our paper focuses on feature implementation; (2) This paper (SWEADV) is more similar to SWExploit, focusing on iterative refinement to generate an “adversarial issue”. Our paper focuses on multi-turn attacks: interacting with the coding agent to induce vulnerabilities over multiple coding steps/turns while preserving code functionality. (3) This paper (SWEADV) only covers 5 attack/vulnerability types, while we cover 96 CWEs.
Q4. Did you try some defense methods to evaluate the robustness of the proposed attack?
Thank you for this question. To answer this question, we ran a quick experiment using two well-known safety guardrail models: Llama Prompt Guard 2 and gpt-oss-safeguard-120b.
We first tested SWE-RedAgent and all the baselines against both defense methods on the private benchmark by simply replaying their prompts from the previous evaluation (main paper). We report the percentage of prompts detected as malicious by the safety guardrail model. The results are shown below:
| Method | Prompt Guard 2 | GPT-OSS-Safeguard-120B |
|---|---|---|
| Benign User | 0.0% | 0.0% |
| Direct Malicious | 0.0% | 69.0% |
| RedCodeAgent | 0.0% | 79.6% |
| FCV-Attack | 0.0% | 57.1% |
| SWExploit | 1.1% | 31.5% |
| SWE-RedAgent (Ours) | 0.0% | 48.6% |
Prompt Guard 2 has limited success (nearly 0% detection rate). This is because Prompt Guard 2 is designed to detect generic jailbreaking and prompt injection attacks. The result reflects that our vulnerability-inducing prompts did not carry typical patterns of jailbreaking or prompt injection.
The gpt-oss-safeguard-120b model is a stronger defense: it is an open-weight safety reasoning model that supports customized safety policies. SWE-RedAgent’s replayed prompts achieve the second-lowest detection rate (48.6%), behind SWExploit (31.5%).
However, these results are obtained through replaying prompts. Next, we run a full experiment against gpt-oss-safeguard-120b defense to examine the attack performance through actual multi-turn interactions between the attacker and the coding agent, with the code agent running the safeguard. The results are shown below:
| Method | Tasks with PR | |||||||
|---|---|---|---|---|---|---|---|---|
| Benign User | 35/35 | 99.63 | 67.40 | 0.00 | 0 | 1 | 1 | 0 |
| Direct Malicious | 35/35 | 89.34 | 11.69 | 68.70 | 0 | 7 | 0 | 0 |
| FCV attack | 13/35 | 93.54 | 23.90 | 57.14 | 0 | 2 | 0 | 0 |
| RedCodeAgent | 25/35 | 98.24 | 23.64 | 28.57 | 1 | 11 | 3 | 1 |
| SWExploit | 23/35 | 91.97 | 29.87 | 34.29 | 0 | 5 | 1 | 1 |
| SWE-RedAgent (Ours) | 35/35 | 99.83 | 54.55 | 47.19 | 3 | 27 | 25 | 8 |
denotes the refusal rate from the safeguard, denotes the number of vulnerabilities under 100% base test pass rate and 50% feature test pass rate constraint, and denotes the number of vulnerabilities under 100% base test and 100% feature test pass rate constraint.
-
Utility performance: SWE-RedAgent maintains its original utility performance (54.55). This is because SWE-RedAgent can adaptively switch between improving utility and injecting vulnerabilities. In contrast, all the other attack baselines (except benign-user) are affected by the safeguard’s refusal, resulting in severe feature implementation performance degradation.
-
Vulnerability Injection: SWE-RedAgent still outperforms all the other baselines in terms of the number of injected vulnerabilities across different utility constraints. Although SWExploit has a lower refusal rate, SWE-RedAgent still successfully injected more vulnerabilities (27 v.s. 5).
Thanks the authors for their response and addictional experiments, which addressed my concerns, so I will keep my positive scores.
Rebuttal to Reviewer Xh6H Part1
Thank you for your encouraging comments. We addressed your questions with new experiments, result analysis, and additional clarifications.
Thank you for raising this point. We agree that “single-turn code generation” is not an accurate description here. We will revise it in the paper. In addition to automatically selecting vulnerable payloads, we want to clarify the other difference between our attack and SWExploit/FCV-Attack. More specifically, there is a key difference between multi-turn attacks and iterative refinement attacks
SWExploit and FCV-Attack are both iterative refinement methods to edit the attack prompt (or adversarial issue). Although the attacker interacts with the target coding agent multiple times to obtain feedback, their goal is to refine a single attack prompt or adversarial issue iteratively. Once this prompt/issue is finalized, they will send this prompt/issue to the coding agent for code generation.
In contrast, SWE-RedAgent is a multi-turn attack. Given a coding task, it performs planning and interacts with the coding agents over multiple turns, where each turn involves implementation and code changes. Each prompt is generated based on the latest repository state, previous conversation history, and test feedback to advance the implementation progress. The attack is integrated into this multi-step coding process.
In summary, existing work SWExploit and FCV-Attack iteratively refine a target prompt/issue multiple times and then use the finalized prompt for code generation (i.e., iterative refinement). Our attack SWE-RedAgent is a multi-turn attack where the attack is integrated into the multi-turn (or multi-step) coding process. We realized that this terminology may cause confusion and will clarify this distinction in the revised paper.
Reliability of LLM-as-judge: We recognized the limitations of simply using an LLM-as-a-judge. Therefore, our evaluation includes an “oracle–and-verifier” evaluation pipeline. More specifically, the oracle identifies potential vulnerabilities, and then a verifier evaluates each vulnerability finding using explicit code-grounded criteria (the more detailed explanations are in Appendix A.2.2). We also have a PoC (proof-of-concept) verification step to verify exploitability (also see Appendix A.2.2).
To evaluate the reliability of the evaluation pipeline, in Section 3.5, we randomly sampled 50 vulnerability findings for execution-based proof-of-concept (PoC) verification (i.e., exploitation). The results were then manually reviewed by three security experts. This analysis returns an estimated precision of 92%. We further report the breakdown of verification results by CWE category (following MITRE CWE-1000) [1]:
This shows that our oracle-verifier pipeline produces reliable evaluation results. The sample size is largely limited by the overhead of manual code analysis and verification, which is a limitation to be acknowledged.
Why not extend CodeQL: We have considered the option to write custom CodeQL queries. However, there are two major limitations:
[1] The MITRE Corporation. CWE-1000: Complete Weakness Hierarchy. Common Weakness Enumeration (CWE), Version 5.0, 2026.