Skip to content

Require authentication for local automation metadata - #15

Draft
shrey150 wants to merge 2 commits into
mainfrom
codex/desktop-automation-auth
Draft

shrey150 wants to merge 2 commits into
mainfrom
codex/desktop-automation-auth

Conversation

@shrey150

@shrey150 shrey150 commented Nov 13, 2026 •

Copy link
Copy Markdown

The optional localhost automation server now requires a per-launch bearer token before returning Browserbase session or CDP metadata. Clients read automation.json and send Authorization: Bearer <token>; the descriptor is written atomically with owner-only POSIX file permissions. /health remains available without the token.

The server rejects unexpected Host headers and browser-origin requests before accessing session metadata. It remains disabled by default and bound to loopback.

E2E Test Matrix

Command / flow Observed output Confidence / sufficiency
npm run build:main && node --test tests/automation.test.cjs Real loopback HTTP regression test passes Covers unauthenticated rejection, valid bearer metadata, hostile Host/Origin/Fetch Metadata rejection, POSIX descriptor permissions, token rotation and shutdown
Original server with a synthetic session provider A request with an unrelated Host/Origin received synthetic credential-bearing metadata; descriptor mode was 0644 Confirms the original boundary failure using no real credentials

Compatibility: existing automation clients must add the bearer token. The README documents this deliberate security change. A process running as the same OS user can still read the descriptor; this is not a boundary between applications owned by the same user.

Combined validation: the mainline candidate containing #13–#18 and #20 passed builds, all 34 automated tests, and the high/critical advisory gate on Linux, macOS, and Windows. Cross-platform CI results.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant