SandboxEval: Towards Securing Test Environment for Untrusted Code

📅 2025-03-27
📈 Citations: 0
Influential: 0
📄 PDF

career value

165K/year
🤖 AI Summary
This work addresses security risks—such as sensitive information leakage, unauthorized file access, and untrusted external network connections—arising from executing LLM-generated code within evaluation environments. We propose the first standardized sandbox security testing framework tailored for LLM evaluation infrastructures. Methodologically, we design multi-dimensional handcrafted adversarial test cases, integrate them into the open-source Dyff evaluation platform, and combine dynamic behavioral monitoring with privilege-boundary verification to quantitatively assess sandbox protection capabilities and guide hardening efforts. Our contributions are threefold: (1) the first systematic characterization of the boundary conditions under which LLMs generate malicious code under instruction-based prompting; (2) a reproducible mechanism for precise risk localization; and (3) empirically grounded evidence supporting effective mitigation strategies—collectively enhancing the robustness and trustworthiness of AI evaluation systems.

Technology Category

Application Category

📝 Abstract
While large language models (LLMs) are powerful assistants in programming tasks, they may also produce malicious code. Testing LLM-generated code therefore poses significant risks to assessment infrastructure tasked with executing untrusted code. To address these risks, this work focuses on evaluating the security and confidentiality properties of test environments, reducing the risk that LLM-generated code may compromise the assessment infrastructure. We introduce SandboxEval, a test suite featuring manually crafted test cases that simulate real-world safety scenarios for LLM assessment environments in the context of untrusted code execution. The suite evaluates vulnerabilities to sensitive information exposure, filesystem manipulation, external communication, and other potentially dangerous operations in the course of assessment activity. We demonstrate the utility of SandboxEval by deploying it on an open-source implementation of Dyff, an established AI assessment framework used to evaluate the safety of LLMs at scale. We show, first, that the test suite accurately describes limitations placed on an LLM operating under instructions to generate malicious code. Second, we show that the test results provide valuable insights for developers seeking to harden assessment infrastructure and identify risks associated with LLM execution activities.
Problem

Research questions and friction points this paper is trying to address.

Evaluating security of test environments for untrusted LLM-generated code
Assessing vulnerabilities in assessment infrastructure during code execution
Developing test suite to simulate real-world safety scenarios for LLMs
Innovation

Methods, ideas, or system contributions that make the work stand out.

SandboxEval secures test environments for untrusted code
Manually crafted test cases simulate real-world safety scenarios
Evaluates vulnerabilities like data exposure and filesystem manipulation
🔎 Similar Papers
No similar papers found.
R
Rafiqul Rabin
Digital Safety Research Institute, UL Research Institutes
J
Jesse Hostetler
Digital Safety Research Institute, UL Research Institutes
S
Sean McGregor
Digital Safety Research Institute, UL Research Institutes
B
Brett Weir
Digital Safety Research Institute, UL Research Institutes
N
Nick Judd
Digital Safety Research Institute, UL Research Institutes