mirror of
https://github.com/pewdiepie-archdaemon/odysseus.git
synced 2026-11-04 04:02:21 +01:00
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:
@@ -233,9 +233,10 @@ def test_research_status_rejects_wrong_owner():
|
||||
rh.get_status.return_value = {"status": "running", "progress": {}}
|
||||
router = setup_research_routes(rh)
|
||||
target = next(r.endpoint for r in router.routes if getattr(r, "path", "") == "/api/research/status/{session_id}")
|
||||
with pytest.raises(HTTPException) as exc:
|
||||
asyncio.run(target(session_id="x", request=_fake_request(user="bob")))
|
||||
assert exc.value.status_code == 404
|
||||
# Another owner's research is indistinguishable from no research at all.
|
||||
out = asyncio.run(target(session_id="x", request=_fake_request(user="bob")))
|
||||
assert out == {"status": "none"}
|
||||
rh.get_status.assert_not_called()
|
||||
|
||||
|
||||
def test_research_cancel_rejects_anonymous():
|
||||
|
||||
Reference in New Issue
Block a user