Good Papers

End-to-End Secure Code Repair with Context-Aware Anonymization and Isolated Agent Execution

PriRex minimizes code exposure via anonymized prompts, sandboxed agents, and differential privacy to secure LLM-based automated repair in enterprises.

Chenyu Wang, Zan Zhou, Chenyu Wang, Yi Sun, Shujie Yang, Yujiao Yuan, Lin Jia, Xu Xiang, Zhiyuan Han

Published Dec 5, 2025Paper ↗

71%
OverallHighly rated
?
OverallHighly ratedVote to see the score
Readers
–

Only vote on papers you've read. Sign in to vote.

AI panel8/20reviewers recommend it
lenient 5/5
medium 3/10
strict 0/5
AI panel?Vote to see what the 20 AI reviewers said

Abstract

In recent years, large language models (LLMs) have demonstrated remarkable capabilities in the field of automated program repair(APR). However, integrating LLM-based repair solutions into enterprise production environments still faces significant challenges. Enterprise codebases often contain proprietary or security-sensitive data, and transmitting such critical information to external models can pose serious privacy and confidentiality risks. Existing automated repair approaches typically expose entire files, toolchains, and execution traces to the model-far exceeding the information necessary for generating patches. This overexposure can lead to unauthorized tool usage and potential leakage of sensitive information through model outputs. To address these challenges, we propose PriRex, a privacyfirst, secure, and efficient APR framework. PriRex enforces strict minimization of exposed code and execution context while maintaining high repair accuracy. The framework comprises three core components: (1) Minimal Exposure Prompting, which extracts only the essential code fragments needed for repair and applies context anonymization; (2) Secure Sandboxed Agent Execution, which constrains agent behavior through whitelisting and risk-scored environments to prevent unauthorized operations; and (3) Differential Privacy-Enhanced Inference, which uses token-level semantic filtering to detect and mitigate potential information leakage in model outputs.