Need
The GitHub sign-in that people complete inside a work Environment (today gh auth login with the GitHub CLI OAuth app) should reach only the Organizations of that Environment. It should still be an OAuth or device-flow sign-in in the person's browser, without personal access tokens and without copying any token.
Why
Root decision 0192 lets the assignee of an individual work Environment share it fully with a trusted member of the same Organization; everything available inside is shared, including signed-in accounts. A GitHub CLI token reaches every Organization the person belongs to, so a full share can expose other Organizations' repositories. Today the rule is that such an Environment is shared fully only with an active member of each involved Organization, and the sharing text explains the broader reach. A sign-in scoped to the Environment's Organizations removes most of that risk.
What is known
- GitHub CLI tokens come from an OAuth App and are not limited to one Organization; an Organization can only block or allow the whole OAuth App.
- A GitHub App user access token (device flow supported) is limited to the app's permissions, the user's permissions and the installations of that app. One shared app installed in many Organizations therefore still reaches all of them.
- Fine-grained PATs can target one resource owner, but PATs are explicitly not wanted.
To decide
Compare at least: a GitHub App per Organization used only for this sign-in; the existing per-Organization broker pattern (attribution and approval constraints for human work); Organization-level OAuth App access restrictions; and how gh/git credential helpers consume the chosen token. Recommend one option to the Operator before implementation.
Planned in Mission Control as DEV-6638 task-2026-10-06-703.
🤖 Generated with Claude Code
Need
The GitHub sign-in that people complete inside a work Environment (today
gh auth loginwith the GitHub CLI OAuth app) should reach only the Organizations of that Environment. It should still be an OAuth or device-flow sign-in in the person's browser, without personal access tokens and without copying any token.Why
Root decision 0192 lets the assignee of an individual work Environment share it fully with a trusted member of the same Organization; everything available inside is shared, including signed-in accounts. A GitHub CLI token reaches every Organization the person belongs to, so a full share can expose other Organizations' repositories. Today the rule is that such an Environment is shared fully only with an active member of each involved Organization, and the sharing text explains the broader reach. A sign-in scoped to the Environment's Organizations removes most of that risk.
What is known
To decide
Compare at least: a GitHub App per Organization used only for this sign-in; the existing per-Organization broker pattern (attribution and approval constraints for human work); Organization-level OAuth App access restrictions; and how
gh/git credential helpers consume the chosen token. Recommend one option to the Operator before implementation.Planned in Mission Control as DEV-6638 task-2026-10-06-703.
🤖 Generated with Claude Code