mirror of
https://github.com/pewdiepie-archdaemon/odysseus.git
synced 2026-09-26 01:52:21 +02:00
fix(agent): authorize exact actions after untrusted context
This commit is contained in:
+8
-1
@@ -719,7 +719,14 @@ async def execute_api_call(
|
||||
output = f"HTTP {status}\n{formatted}"
|
||||
|
||||
if status >= 400:
|
||||
return {"error": output, "exit_code": 1}
|
||||
return {
|
||||
"error": output,
|
||||
"exit_code": 1,
|
||||
# The error string includes the remote response body. Preserve
|
||||
# it for diagnostics, but make its provenance explicit so the
|
||||
# agent gate does not treat HTTP failure as content-free.
|
||||
"untrusted_content": True,
|
||||
}
|
||||
|
||||
return {"output": output, "exit_code": 0}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user