fix(agent): close untrusted-context gate bypasses

This commit is contained in:
RaresKeY
2026-08-15 01:58:32 +00:00
parent 329f9d298d
commit 2295504141
16 changed files with 287 additions and 66 deletions
+1
View File
@@ -50,6 +50,7 @@ async def test_edit_file_blocked_at_execution_for_non_admin(monkeypatch):
_desc, result = await te.execute_tool_block(
ToolBlock("edit_file", json.dumps({"path": p, "old_string": "a", "new_string": "b"})),
owner="bob",
security_context=te.NO_TOOL_SECURITY_CONTEXT,
)
assert result.get("exit_code") == 1 and "admin" in result.get("error", "").lower()
os.unlink(p)