Files
orca/cloud/apps/sandbox-control/package.json
T
Neil 730334b4f5 fix(cloud): GH-AS-MEMBER PRs, comments and pushes from a cloud workspace show as the member, not the bot
stablyai/orca#42960 (Neil, dev) was authored by orca-cloud-dev[bot]. Neil had connected GitHub; member
identities only reached git: gh ran on the workspace placeholder (the App's installation token), and
the Worker's member route on api.github.com allowed only REST under the repo while gh pr create is
GraphQL.

- VM: a gh wrapper runs gh with the attested sender's own placeholder (orcad attests, as for git);
  plain gh otherwise. Behind GH_AS_MEMBER=on (dev on).
- Worker, api.github.com with a member placeholder: the member's own token only for REST under the
  workspace repo and for allowlisted authorship mutations whose every target resolves to it
  (repositoryId equals its node id; other ids looked up with the installation token, cached per repo,
  failures not cached). graphql-js parse; variable defaults, owner-level projectIds, duplicate
  top-level keys and anything unexpected are not member requests. Everything else goes out on the
  installation token as before; an out-of-repo pinned mutation is refused with a GraphQL error.
- Shared workspaces never approve or merge as a member (GraphQL and REST): those go out on the
  installation token, so branch protection still applies.
- Identity rule: the only person who can use a workspace always acts; in a shared one the latest
  sender acts until another member sends, for at most MEMBER_GIT_SHARED_MAX_MINUTES (default 480).
- A GitHub connect or disconnect mid-session reaches the running VM's identities now.
- Tokens never enter the VM.
2026-11-15 21:18:00 -08:00

27 lines
734 B
JSON

{
"name": "@orca-cloud/sandbox-control",
"private": true,
"version": "0.0.0",
"type": "module",
"scripts": {
"dev": "wrangler dev -c wrangler.jsonc -c wrangler.build-runner.jsonc --port 8791 --ip 127.0.0.1",
"db:migrate:local": "wrangler d1 migrations apply SANDBOX_DB --local",
"golden-image": "tsx image/build-golden-image.ts",
"typecheck": "node scripts/typecheck.mjs",
"test": "vitest run"
},
"dependencies": {
"graphql": "17.0.2",
"jose": "^6.2.13",
"zod": "^4.6.7"
},
"devDependencies": {
"@cloudflare/workers-types": "^5.20261103.1",
"@types/node": "^24.19.2",
"tsx": "^4.23.15",
"typescript": "^5.9.3",
"vitest": "^5.0.5",
"wrangler": "^4.157.0"
}
}