feat(security): apply audited PR #6738 remediations and test hardening

- Enforce vision probe SSRF safe local host validation, SafeProbeBackend TOCTOU elimination, and session owner authorization
- Authorize session titling endpoints against registered owner configuration
- Sanitize sensitive metadata logging from agent loop debug logs
- Add async non-blocking execution for spec router tools and thinking decisions
- Harden email cache invalidation fencing and thread-safe mutation
- Add regression test suites for legacy browser authority, spec contracts, spec router request scoping, and task MCP delivery
This commit is contained in:
Alexandre Teixeira
2026-10-27 17:25:25 +00:00
parent 3246ae5d9c
commit 0133de6f0e
43 changed files with 2187 additions and 673 deletions
+2 -2
View File
@@ -34,6 +34,7 @@ def _install_spec_router(monkeypatch, *, p):
fake.LAST_DECISIONS = [
{'message': PROMPT, 'choice': 'answer_directly', 'answer_directly': p},
]
fake.latest_decision = lambda: fake.LAST_DECISIONS[-1]
monkeypatch.setitem(sys.modules, 'src.spec_router', fake)
monkeypatch.setattr(
'src.agent_loop._configured_model_tool_surface_raw',
@@ -133,8 +134,7 @@ async def test_spec_direct_router_error_is_unchanged(monkeypatch):
monkeypatch.setenv('ODYSSEUS_SPEC_DIRECT_NOTOOLS', '1')
class _Boom:
@property
def LAST_DECISIONS(self):
def latest_decision(self):
raise RuntimeError('router down')
monkeypatch.setitem(sys.modules, 'src.spec_router', _Boom())
monkeypatch.setattr(