Repository navigation
Keep API tokens from loosening permission modes; mailbox browser-only; no pooled connections across network policies - #23
Merged
Conversation
…ections A token could already not PATCH a conversation into Accept edits or Auto, but it could choose those modes when it created a conversation, sent or scheduled a message, created or changed an automation, started a task or handed off. With Auto mode switched on for the project that ran every tool call with nobody asked. One check, requireBrowserToLoosen, now guards all of those entry points; Plan and Ask stay open to tokens. Also: - Mailbox accounts, messages, attachments and drafts are session-only: a read-scoped token could read every connected mailbox. - guardedRequest opens a fresh connection per request, so a keep-alive socket opened under a policy that allows private addresses cannot carry a later request whose policy does not (no DNS check runs on reuse). - The installer refuses redirects to plain http. - Codex refuses extra CLOUD_HARNESS_ variables like AGENT_STUDIO_ ones. - A neutral sample name in the component gallery and a login test. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
wget follows a redirect to plain http and has no option to refuse it, so the fallback undid the redirect check. The mailbox's local-model list joins the other mailbox routes so that the guide's "every mailbox route" holds. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
A security review of the published 2.0.0-beta.4 found one medium and a few low issues. No secrets or personal data were found in the repository history, pull requests, releases or the release package.
Medium — an API token could take the person out of the loop.
PATCH /api/sessions/:idrefused a token that loosened the permission mode, but the same choice was accepted, unchecked, when a tokenPOST /api/sessions),POST /api/sessions/:id/messages),POST /api/deferred-messages),In a project with Auto mode switched on, a write-scoped token could therefore start a run in which every tool call was allowed with nobody asked. Before this change, the new integration test showed a token creating an
accept-editssession (201).Threat considered: a leaked or member-held API token used to start unattended runs that skip human approval.
What changes
requireBrowserToLoosen(agents/token-modes.ts) is one check used by all seven entry points. Tokens may still choose Plan and Ask; Accept edits and Auto need a signed-in browser (session_required).sessionOnly. Before, a read-scoped token could list, read and download every connected mailbox, and create, change and delete drafts.guardedRequest: usesagent: false. A keep-alive socket opened under a policy that allows private addresses could carry a later request whose policy does not, because no DNS check runs on reuse. The new unit test fails without the fix.--proto-redir '=https');CLOUD_HARNESS_prefix as well asAGENT_STUDIO_, matchingbuildChildEnv.Checks run locally
npm run typecheckpassed.npm run lintpassed.npm run test:unit: 3321 passed.npm run test:integration: 1340 passed.npm run test:acceptance(before the rebase onto Add a visual product tour and custom-domain setup #22):Not changed here (recorded for later)
npm ciwith install scripts on while it holdsid-token: write..gitincluded, as writable.typeactions are not shown escaped in the approvals./tmp, readable by the agent's own tools.🤖 Generated with Claude Code