app
adom-vscode
Public Made by Adomby adom
Let Claude, Codex and Kimi drive VS Code inside your Adom container
Security review: verb exposure on port 8821 (core install on every container)
adom-vscode ships as a core feature to every Adom user, so its HTTP verb surface needs a deliberate security review. Requested by John, 2026-08-01, alongside the 1.1.12 change that made exec HD-local only.
Done in 1.1.12:
- /exec and /exec/stream are refused on cloud (hw) containers (errorCode exec_disabled_on_cloud, HTTP 403). HD workspaces sit behind the user's firewall; cloud containers do not. /health and /container report execAllowed, and the verb roster omits exec where disabled. Escape hatch: ADOM_VSCODE_ALLOW_EXEC=1 in the extension host env (platform-set only).
Still to consider (the future TODO):
- /command executes ANY VS Code command, including terminal sendText-style flows, so it is close to exec-equivalent. Decide whether it needs the same hd/hw gating or an allowlist of safe commands on hw.
- Other state-changing verbs on hw: apikey set (writes the session key via sudo), config set, extensions install/update, queue clear. Decide the per-verb policy matrix for hd vs hw.
- CORS is currently Access-Control-Allow-Origin: * on 127.0.0.1:8821. Credentialed cross-site requests are blocked by the browser under *, but tighten this anyway (drop CORS entirely or allowlist the workbench origin).
- Reachability: the code-server proxy (VSCODE_PROXY_URI /proxy/8821/) can expose the port beyond loopback with the user's auth. Audit what the proxy allows and whether :8821 should refuse proxied requests (e.g. require a loopback Host header or a shared token).
- Auth model: today the API trusts anything on loopback, like the pre-token adom-desktop bridges. Consider a bridge-token pattern (file readable only by the workspace user, required header) so a compromised web page or other-user process cannot drive the API. This is the ssh/sshd analogy: loopback trust was fine for one user, a token is the keypair.
- Caller identity: adopt X-Adom-Caller-* style attribution (like adom-desktop) so the Activity/queue records WHICH AI thread asked, for user visibility.
The bar: every verb should be justified per container class, and anything arbitrary-execution-shaped defaults to HD-local.