Skip to content

[Feat] Block shared publishing from private Sessions - #2642

Draft
roomote-roomote[bot] wants to merge 1 commit into
roomote/private-sessions-04-integrationsfrom
roomote/private-sessions-05-egress
Draft

roomote-roomote[bot] wants to merge 1 commit into
roomote/private-sessions-04-integrationsfrom
roomote/private-sessions-05-egress

Conversation

@roomote-roomote

@roomote-roomote roomote-roomote Bot commented Sep 13, 2026

Copy link
Copy Markdown
Contributor

​Opened on behalf of @daniel-lxs. Follow up by mentioning @roomote-roomote, in the web UI, or in Telegram.

What changed

  • Limit private Sessions to Brain reads and explicitly private integrations; block artifacts, wakeups, PR review, external communication, automations, and custom-skill mutation.
  • Suppress external notifications and reject source-control writes with an explicit read allowlist.
  • Mark proxy credentials read-only and reject Git receive-pack; fail bootstrap if a provider would expose a raw write token.

Why this change was made

Private content must not escape through shared channels, source control, schedules, artifacts, or deployment settings.

Impact

Shared egress remains unchanged. Private delegation reads repositories only where a genuinely read-only credential path exists.

Related PRs

@roomote-community

roomote-community Bot commented Sep 13, 2026

Copy link
Copy Markdown
Contributor

2 issues outstanding. See task

  • packages/sdk/src/server/lib/task-runs/dequeue-helpers.ts:802 throws private credential failures after claiming the run, leaving raw-token-provider private tasks stuck active instead of settling as canceled.
  • packages/sdk/src/server/lib/task-runs/dequeue-helpers.ts:795 mints GitLab write-capable project tokens before failing the read-only check, leaving their descriptors unavailable for revocation.

Reviewed a8d5b99

const merged = mergeProviderTokens(
providers.map((provider) => tokensByProvider.get(provider)!),
);
if (!readOnly) return merged;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The read-only check runs only after all provider credentials have been minted. With a PAT-backed GitLab connection, createTaskRunScopedGitLabTokens creates one-day Developer project tokens with write_repository; this branch then throws without persisting their descriptors, so the normal cleanup path cannot revoke them. Decide read-only support before minting, or revoke the newly created descriptors before failing.

Object.values(merged.envVars).some(Boolean) ||
(merged.gitCredentials?.some((credential) => Boolean(credential.token)) ??
false);
if (exposesRawCredential) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The new private-task failure is thrown after the run has been claimed, but neither dequeueTaskRun nor dequeueResumeTaskRun catches it to cancel and release that run. The worker receives a rejected dequeue response before it has a taskRun to settle, so every private task using a raw-token provider (including GitHub) can remain stuck active/claimed instead of failing closed visibly. Return or handle a classified bootstrap failure here so the dequeue paths execute their existing cancellation flow.

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