Skip to content

Keep the computer fleet off a signed-in user's listing - #45

Open
kevin9327 wants to merge 1 commit into
CopilotKit:mainfrom
kevin9327:refuse-unsigned-computer-fleet
Open

Keep the computer fleet off a signed-in user's listing#45
kevin9327 wants to merge 1 commit into
CopilotKit:mainfrom
kevin9327:refuse-unsigned-computer-fleet

Conversation

@kevin9327

Copy link
Copy Markdown

The problem

The admin computers page asks for every Bot's machine. That list lived behind a session only. :botId is unused, and the handler returns gateway.computers(), so any signed-in person who could hit one valid bot path learned every Bot id and whether its computer was running, including private coworkers.

This is not #35/#37 (acting as another Bot) or #29/#30 (a bot id becoming a filesystem path). It is the global listing, and it does not use the path id.

The approach

The same requireAdmin the policy routes already use. A signed-in user is refused before the gateway is asked. An administrator still gets the fleet.

Proof

  • bun test server/tests/computer-routes.test.ts — 2 pass, 0 fail
  • bunx biome format / lint on the touched files — clean

Test plan

  • Sign in as a non-admin and open /admin/computers or GET /api/computers/<any-bot>/computers. Expect 403 and no fleet.
  • Sign in as an administrator and load the same route. Expect the computer list as before.

The admin computers page asks for every Bot's machine. That list was
behind a session only, so anyone signed in could read private coworker
ids and whether those computers were running.
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

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