Skip to content

armgit / avibe

Public Imported from GitHub
0

Make your computer a home for your AI partner. Avibe is the local-first Agent OS: Vibey, its built-in AI partner, works out of the box, and Claude Code, Codex & OpenCode run unchanged beside it — reach them from your browser, phone, or any chat app.

fix(auth): close remaining remote read gaps

Max1ce5ffb7e548
diff --git a/tests/test_instance_authorization.py b/tests/test_instance_authorization.py
index b78210f9c..2b2dc63d5 100644
--- a/tests/test_instance_authorization.py
+++ b/tests/test_instance_authorization.py
@@ -100,7 +100,7 @@ def test_http_policy_defaults_unknown_api_to_owner() -> None:
assert required_instance_role("GET", "/api/projects/proj-1") == "viewer"
assert required_instance_role("GET", "/api/projects/proj-1/agents-md") == "owner"
assert required_instance_role("GET", "/api/agents") == "editor"
- assert required_instance_role("GET", "/api/skills") == "editor"
+ assert required_instance_role("GET", "/api/skills") == "owner"
assert required_instance_role("GET", "/api/vault/secrets") == "editor"
assert required_instance_role("GET", "/api/vault/tags") == "editor"
assert required_instance_role("POST", "/api/vault/requests/access") == "editor"
diff --git a/tests/test_resource_acl_show_pages.py b/tests/test_resource_acl_show_pages.py
index 76bd1b26d..49a395e3a 100644
--- a/tests/test_resource_acl_show_pages.py
+++ b/tests/test_resource_acl_show_pages.py
@@ -152,8 +152,9 @@ def test_remote_show_page_list_and_direct_requests_enforce_policy(monkeypatch, t
assert catalog.status_code == 200
assert {item["session_id"] for item in catalog.get_json()["pages"]} == {"ses-public", "ses-scope"}
+ assert all("path" not in item for item in catalog.get_json()["pages"])
assert mutation.status_code == 403
- assert mutation.get_json()["code"] == "resource_access_forbidden"
+ assert mutation.get_json()["code"] == "remote_execution_disabled"
assert page.status_code == 403
diff --git a/vibe/authorization.py b/vibe/authorization.py
index 8d17d7525..13c67ee2f 100644
--- a/vibe/authorization.py
+++ b/vibe/authorization.py
@@ -320,7 +320,6 @@ _EDITOR_HTTP_RULES = tuple(
for method, pattern in (
("GET", r"^/api/agents$"),
("GET", r"^/api/agent-backends$"),
- ("GET", r"^/api/skills$"),
("GET", r"^/api/vault/(?:secrets|tags)$"),
("GET", r"^/api/cloud/token$"),
("GET", r"^/api/asr/status$"),
diff --git a/vibe/ui_server.py b/vibe/ui_server.py
index ec222be9b..a3388f9f4 100644
--- a/vibe/ui_server.py
+++ b/vibe/ui_server.py
@@ -4683,6 +4683,18 @@ def show_pages_list_get():
payload = api.list_show_pages()
context = getattr(g, "authorization_context", None)
+ remote_request = bool(
+ getattr(g, "remote_session_payload", None) is not None
+ or _is_remote_access_request(_load_remote_access_config())
+ )
+ if remote_request or (context is not None and context.is_remote):
+ payload = {
+ **payload,
+ "pages": [
+ {key: value for key, value in page.items() if key != "path"}
+ for page in payload.get("pages", [])
+ ],
+ }
if context is not None and not context.is_instance_owner:
engine = _projects_engine()
with engine.connect() as conn: