Skip to content

fix(vault): send credentials only to owner-trusted browsers - #70

Merged
kerdofficial merged 2 commits into
mainfrom
fix/vault-trusted-browsers
Oct 23, 2026
Merged

kerdofficial merged 2 commits into
mainfrom
fix/vault-trusted-browsers

Conversation

@kerdofficial

@kerdofficial kerdofficial commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

What changed

Browser fill and capture now connect only to browsers the owner trusts. Owner vault settings gain cdp_endpoints: trusted browser origins such as http://127.0.0.1:9222. A local request may use an endpoint that matches one of them, or an HTTPS/WSS endpoint that meets the existing remote_cdp_hosts rules. Anything else is refused with missing_permission before Inbot connects, and that includes loopback endpoints that are not registered. Tunnel requests keep the remote rules and ignore cdp_endpoints. PUT /v0/owner/vault/settings now updates only the keys you send.

Credential use requests now include browser: { endpoint, selector, target_id? }. The endpoint is the origin of the agent's CDP endpoint, with no path, query or credentials, so the owner approves a concrete sink. The approval fingerprint still binds the full endpoint, so swapping it after approval still returns idempotency_conflict.

Capture is now gated by use_policy like fill. It uses kind capture, needs an idempotency key on approval grants (REST, MCP capture_credential and CLI) and runs under the same lock as fill. Origin and CDP protocol errors no longer echo text supplied by the peer.

Migration 20 adds cdp_endpoints and rebuilds credential_use_requests so that it allows capture and stores browser. Existing rows are kept.

Why

Before this change, a local request could name any CDP endpoint. The origin check trusted that endpoint's own frame tree and the secret went out through Input.insertText, so the agent chose where the password went. The approval also never showed the endpoint. Capture skipped approval and ran outside the lock.

This is a partial mitigation, not browser authentication: Inbot still cannot authenticate a CDP peer. If a registered local browser stops, a process that binds its port can stand in for it. The docs now say so plainly. An Inbot-owned browser over a CDP pipe would close that gap and is left for a follow-up.

Upgrading changes behavior: until the owner registers a browser under Settings > Trusted browsers or with inbot vault settings set --cdp-endpoints ..., local fill and capture fail with an error that explains how to register one.

UI changes

Approvals now show the browser and field selector:

Approval detail

Settings has a Trusted browsers list above Remote browser hosts:

Settings

Checklist

  • The PR title follows conventional commits
  • The PR does one thing
  • pnpm check passes locally
  • Every affected surface is covered (contract, service, REST, MCP, CLI, web, events, permissions, remote access, docs)

Proof: I ran format, lint, typecheck and vitest (1034 passed). A regression test fails when the old local bypass is restored. On an isolated home, an unregistered loopback listener received no connection for fill or capture, and approval requests showed the sink without the query token. Only synthetic credentials were used.

@kerdofficial
kerdofficial force-pushed the fix/vault-trusted-browsers branch from 3003ab1 to 1563ce4 Compare October 22, 2026 19:53
@kerdofficial
kerdofficial changed the base branch from main to fix/windows-system-tar October 22, 2026 19:53
@kerdofficial kerdofficial mentioned this pull request Oct 22, 2026
4 tasks done
Base automatically changed from fix/windows-system-tar to main October 23, 2026 02:15
@kerdofficial
kerdofficial force-pushed the fix/vault-trusted-browsers branch from 45c13e2 to 4e5cdd8 Compare October 23, 2026 02:15
@kerdofficial
kerdofficial merged commit f020ceb into main Oct 23, 2026
7 of 8 checks passed
@kerdofficial
kerdofficial deleted the fix/vault-trusted-browsers branch October 23, 2026 02:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant