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 local read routes

Maxe94d28d80ca8
diff --git a/tests/test_instance_authorization.py b/tests/test_instance_authorization.py
index 5401d6966..d2d63a62c 100644
--- a/tests/test_instance_authorization.py
+++ b/tests/test_instance_authorization.py
@@ -131,6 +131,10 @@ def test_http_policy_defaults_unknown_api_to_owner() -> None:
("POST", "/api/show-pages/ses-1/visibility"),
("GET", "/api/backend/codex/runtime"),
("GET", "/api/backend/claude/auth"),
+ ("GET", "/api/backend/codex/auth"),
+ ("GET", "/api/opencode/permission-status"),
+ ("GET", "/api/harness/tasks"),
+ ("GET", "/api/harness/watches"),
("GET", "/api/global-prompts"),
("GET", "/api/harness/runs"),
("GET", "/api/harness/runs/run-1"),
@@ -186,7 +190,7 @@ def test_remote_http_policy_defaults_local_machine_and_unknown_routes_to_local_o
("GET", "/api/models/runtime/status", REMOTE_HTTP_ALLOWED),
("GET", "/api/models/agents/codex/chain", REMOTE_HTTP_ALLOWED),
("GET", "/api/backend/codex/runtime", REMOTE_HTTP_LOCAL_ONLY),
- ("GET", "/api/opencode/permission-status", REMOTE_HTTP_ALLOWED),
+ ("GET", "/api/opencode/permission-status", REMOTE_HTTP_LOCAL_ONLY),
("GET", "/api/vault/audit", REMOTE_HTTP_ALLOWED),
("POST", "/api/dock/pins", REMOTE_HTTP_ALLOWED),
("POST", "/api/web-push/subscriptions", REMOTE_HTTP_ALLOWED),
diff --git a/vibe/authorization.py b/vibe/authorization.py
index 89ec690b7..5d787d745 100644
--- a/vibe/authorization.py
+++ b/vibe/authorization.py
@@ -432,15 +432,15 @@ _REMOTE_OWNER_ALLOWED_HTTP_RULES = tuple(
),
(
frozenset({"GET", "HEAD"}),
- r"^/api/backend/(?:(?:codex)/auth|[^/]+/auth/oauth/status/[^/]+)$",
+ r"^/api/backend/[^/]+/auth/oauth/status/[^/]+$",
),
(
frozenset({"GET", "HEAD"}),
- r"^/api/(?:opencode/permission-status|remote-access/status)$",
+ r"^/api/remote-access/status$",
),
(
frozenset({"GET", "HEAD"}),
- r"^/api/harness/(?:counts|tasks|watches)$",
+ r"^/api/harness/counts$",
),
(frozenset({"GET", "HEAD"}), r"^/api/users$"),
)