mirror of
https://github.com/pewdiepie-archdaemon/odysseus.git
synced 2026-10-14 19:02:22 +02:00
fix(agent): close untrusted-context gate bypasses
This commit is contained in:
@@ -18,17 +18,23 @@ from types import SimpleNamespace
|
||||
import pytest
|
||||
|
||||
from src.tool_execution import (
|
||||
NO_TOOL_SECURITY_CONTEXT,
|
||||
_AGENT_WORKDIR,
|
||||
_active_workspace,
|
||||
_resolve_search_root,
|
||||
_resolve_tool_path,
|
||||
_resolve_tool_path_in_workspace,
|
||||
agent_cwd,
|
||||
execute_tool_block,
|
||||
execute_tool_block as _execute_tool_block,
|
||||
get_active_workspace,
|
||||
)
|
||||
|
||||
|
||||
async def execute_tool_block(*args, **kwargs):
|
||||
kwargs.setdefault("security_context", NO_TOOL_SECURITY_CONTEXT)
|
||||
return await _execute_tool_block(*args, **kwargs)
|
||||
|
||||
|
||||
def _block(tool, content=""):
|
||||
return SimpleNamespace(tool_type=tool, content=content)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user