mirror of
https://github.com/pewdiepie-archdaemon/odysseus.git
synced 2026-11-04 20:22:21 +01:00
feat(runtime): enforce server request authority
This commit is contained in:
@@ -17,6 +17,7 @@ import tempfile
|
||||
from types import SimpleNamespace
|
||||
|
||||
import pytest
|
||||
from tests.runtime_evidence_helpers import server_authorized_executor
|
||||
|
||||
from src.tool_execution import (
|
||||
NO_TOOL_SECURITY_CONTEXT,
|
||||
@@ -31,6 +32,9 @@ from src.tool_execution import (
|
||||
)
|
||||
|
||||
|
||||
_execute_tool_block = server_authorized_executor(_execute_tool_block)
|
||||
|
||||
|
||||
async def execute_tool_block(*args, **kwargs):
|
||||
kwargs.setdefault("security_context", NO_TOOL_SECURITY_CONTEXT)
|
||||
return await _execute_tool_block(*args, **kwargs)
|
||||
|
||||
Reference in New Issue
Block a user