Grading coding agents without trusting them.
SecureBench applies privilege separation to coding-agent benchmarks. Its design, split verification, separates running a task’s tests from judging their results, so the expected answers and the verdict stay outside everything the agent’s work can control. It is the first framework in the scientific literature for evaluating coding agents to make this separation.
Today, the agent can reach everything its grade depends on.
In most benchmarks the tests run where the agent worked. Once its code runs, it can read the expected answers, edit the tests or forge the report. BenchJack reached near-perfect scores on nine of ten popular agent benchmarks without solving their tasks, and ImpossibleBench finds that frontier models modify tests that contradict the task. Agents already do this unprompted, as OpenAI’s July 2026 Hugging Face incident showed.
SecureBench moves the answers and the verdict out of the agent’s reach.
Disclosure of evaluation informationA model inspected the Python call stack to retrieve the answer the scorer had already computed (METR).
Stopped by G1 Mutual isolation
Forged observationsIn SWE-bench, a conftest.py hook can overwrite each test’s reported outcome (BenchJack).
Stopped by G2 Verdict integrity
Cross-case interferenceFound in our study: in Terminal-Bench’s polyglot-c-py, the Python side can replace the compiled binary with one that prints the expected answer.
Stopped by G3 Test case isolation
Access-policy misuseIn evaluations that CAISI reviewed, agents searched the internet for walkthroughs and answers (CAISI).
Stopped by G4 Access control
Four security goals, each met by one part of the design.
Each goal answers a class of known attack. Together they hold even when the agent’s code takes over the environment that runs the tests.
- G1Mutual isolation
The agent’s work reaches the grader through one defined channel, and nothing else passes between them.
- G2Verdict integrity
Only the grader decides whether an attempt passes. A forged success report cannot produce a pass.
- G3Test case isolation
Each test case runs on its own, so one case cannot affect another.
- G4Access control
The agent reaches only the resources the task’s policy allows.
- Stops
- Access-policy misuse
Each part of grading runs with only the access it needs.
The agent works in its own environment. SecureBench then captures the files it changed, the candidate, and runs each test case in a fresh Evaluation environment. There an adapter runs the candidate and reports what came out. Only the Oracle, on the trusted host, holds the expected answers and issues the verdict.
Scroll sideways to see the whole figure.
Most tasks convert, and a few properties block the rest.
180 of the 202 tasks of Terminal-Bench 2.0 and DeepSWE v1.1 convert: 68 of 89 and 112 of 113. Of the 22 exclusions, 14 need what SecureBench leaves out by design, such as a running service, privileges or a speed target. Agents did the conversion at a median cost of about $10 per task. Of the 429 attacks run against the conversions, the native graders accepted 230 and SecureBench none.
What happened to each task
| Outcome | Terminal-Bench | DeepSWE |
|---|---|---|
| Converted | 68 | 112 |
| Privileges or system paths | 5 | 0 |
| Running process as deliverable | 3 | 0 |
| Deliverable outside any scope | 2 | 0 |
| Speed target | 4 | 0 |
| Pack size | 4 | 0 |
| Machine resources | 1 | 0 |
| Reference fails natively | 1 | 1 |
| Model safeguards | 1 | 0 |
| Triaged | 89 | 113 |
Converted tasks grade like the originals.
Two agents attempted every converted task natively and under SecureBench, and both graders judged the files each attempt left. On the same files the graders agree on 98.7% of comparisons, and none of the disagreements is a conversion error. The agents pass almost as many tasks under SecureBench as natively.
| Sonnet 5.5 | GPT 6.1 Sol | |
|---|---|---|
| Graders agree on the same files | 99.4% | 97.9% |
| Tasks passed natively, first run | 121 | 142 |
| Tasks passed under SecureBench, first run | 118 | 140 |
| Tasks passed natively, second run | 120 | 142 |
| Tasks passed under SecureBench, second run | 125 | 134 |
No adversarial attempt passed through a flaw in SecureBench.
An adversarial agent attacked every converted task, once with a description of the design and once with all the grading code, but never the expected answers. With full knowledge, SecureBench rejected 75% of the completed attempts. Most passes exploit weak tests in the original tasks, and the native grader passes most of those as well. In a smaller campaign on the original tasks, SecureBench rejected 55 of the 71 attacks that pass the native graders.
| Limited knowledge | Full knowledge | |
|---|---|---|
| Completed attempts | 139 | 168 |
| Rejected by SecureBench | 117 | 126 |
| Passed through a flaw in SecureBench | 0 | 0 |
| Passed through weak upstream tests | 14 | 33 |
| Other passes | 8 | 9 |
Every verdict can be re-judged offline.
Each attempt stores the evidence the Oracle judged. With the task pack, a reviewer recomputes every verdict without running anything.
- 1
Re-judge offline
Every case’s evidence is stored next to the Oracle’s judgment of it, and the judge is deterministic and free of side effects.
- 2
Failures stay failures
Errors inside an Evaluation environment count against the candidate. A candidate that crashes its adapter fails the case like a wrong answer, so it cannot turn a wrong answer into a missing result.
- 3
Full provenance
Task, image and Oracle digests, the framework commit, the harness and model, and the worker’s qualification.
- 4
Append-only
Retries and invalid attempts are recorded, never overwritten. A run index hashes every record, and a root digest closes the run.
Attempt record, abridged
{"status": "failed","failure_class": "case_error",2"judged": [1{ "case": 0, "evidence": {…}, "judgment": {…} },…],"candidate": "sha256:…","provenance": {3"task": {…}, "framework": {…},"agent": {…}, "run": {…}, "worker": "…"},"logs": {…}}
Run index: the sha256 of this record, then a root digest4