René's URL Explorer Experiment


Title: Shared workspaces: scoped tokens can't run `coder start`, and `use`-role users can't report usage · Issue #30423 · coder/coder · GitHub

Open Graph Title: Shared workspaces: scoped tokens can't run `coder start`, and `use`-role users can't report usage · Issue #30423 · coder/coder

X Title: Shared workspaces: scoped tokens can't run `coder start`, and `use`-role users can't report usage · Issue #30423 · coder/coder

Description: Found while auditing the VS Code extension's OAuth scopes (coder/vscode-coder#1138, coder/vscode-coder#1128). Both affect workspaces shared with another user. 1. coder start and coder update fail on a shared workspace with any scoped tok...

Open Graph Description: Found while auditing the VS Code extension's OAuth scopes (coder/vscode-coder#1138, coder/vscode-coder#1128). Both affect workspaces shared with another user. 1. coder start and coder update fail o...

X Description: Found while auditing the VS Code extension's OAuth scopes (coder/vscode-coder#1138, coder/vscode-coder#1128). Both affect workspaces shared with another user. 1. coder start and coder update fa...

Opengraph URL: https://github.com/coder/coder/issues/30423

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Shared workspaces: scoped tokens can't run `coder start`, and `use`-role users can't report usage","articleBody":"Found while auditing the VS Code extension's OAuth scopes (coder/vscode-coder#1138, coder/vscode-coder#1128). Both affect workspaces shared with another user.\n\n## 1. `coder start` and `coder update` fail on a shared workspace with any scoped token\n\nWith dynamic parameters, `prepWorkspaceBuild` (`cli/create.go`) resolves the owner with `OrganizationMember(org, owner)` and falls back to `User(owner)`. For a scoped token both fail:\n\n- `GET /api/v2/organizations/{org}/members/{user}` returns 404 for a token with `coder:workspaces.operate coder:workspaces.access workspace:create user:read user:read_personal`. It does so even for the caller's own membership. The review also reported a 500 with `organization:read`; I haven't re-verified that.\n- `GET /api/v2/users/{user}` returns 404 for another user, because `user:read` scoped this way only covers the caller.\n\nSo the CLI fails with:\n\n```\nget owning member: Resource not found or you do not have access to this resource\n```\n\nThe same user's unscoped session starts the workspace. A REST start build (`POST /api/v2/workspaces/{id}/builds`) with the same token also works, so only the CLI's owner lookup is blocked. `organization_member:read` is not a public low-level scope, so a client can't request it directly. Per the review, no scope short of `coder:all` avoids the failure.\n\n**Repro**\n1. Share a workspace with a member (ACL role `admin`) and stop it.\n2. As the member, create a token with the scopes above.\n3. Run `CODER_SESSION_TOKEN=\u003ctoken> coder start -y \u003cowner>/\u003cworkspace>`.\n\n**Expected:** the start succeeds. Either the member lookup works for scoped tokens with access to the workspace, or the CLI resolves the owner in a way such tokens can.\n\n## 2. Users shared a workspace with the `use` role can't report usage\n\n`POST /api/v2/workspaces/{id}/usage` authorizes `policy.ActionUpdate` on the workspace (`postWorkspaceUsage`, `coderd/workspaces.go`). The `use` workspace role (`db2sdk.go`) grants only:\n- `application_connect`\n- `read`\n- `ssh`\n- `workspace_start`\n- `workspace_stop`\n\nIt doesn't grant `update`, so `coder ssh --usage-app=…` (used by VS Code and others) can't report usage on such workspaces, whatever the token's scopes. `UpdateWorkspaceUsageWithBodyContext` only logs `failed to post workspace usage` as a warning, so the workspace's usage stops being recorded with no visible error.\n\n**Expected:** anyone allowed to SSH into or connect to the workspace can report usage. For example, authorize usage with `ssh` or `application_connect` instead of `update`, or add the needed action to the `use` role.\n","author":{"url":"https://github.com/EhabY","@type":"Person","name":"EhabY"},"datePublished":"2026-10-06T12:43:35Z","url":"https://github.com/coder/coder/issues/30423"}

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322
route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:e973c036-1f6c-3137-f39a-a2c40fa6dd35
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-id82AA:2F9718:C1ACAE:104BD84:6B00FEB7
html-safe-noncef969924ce6dcd13ba4937357268b06f158b408d1becc17ba6f7f41607f8ea85c
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4MkFBOjJGOTcxODpDMUFDQUU6MTA0QkQ4NDo2QjAwRkVCNyIsInZpc2l0b3JfaWQiOiI2NTAyMjU2MzQyNDYyNDMwOTAzIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmacc768a072c572fcb634731d85f4b6814410a29ecf4d9cda460c9e93568eb0aa22
hovercard-subject-tagissue:5728580738
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/coder/coder/30423/issue_layout
twitter:imagehttps://opengraph.githubassets.com/d6bc7b5fdbcd511227a51edc198f027b6c58b8ae67eb2879d9dac5a01e9c7575/coder/coder/issues/30423
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/d6bc7b5fdbcd511227a51edc198f027b6c58b8ae67eb2879d9dac5a01e9c7575/coder/coder/issues/30423
og:image:altFound while auditing the VS Code extension's OAuth scopes (coder/vscode-coder#1138, coder/vscode-coder#1128). Both affect workspaces shared with another user. 1. coder start and coder update fail o...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernameEhabY
hostnamegithub.com
expected-hostnamegithub.com
Nonecb7fa109eca7d4156c889f474306b0e91336055e9adf8fd4684b61e49094d124
turbo-cache-controlno-preview
go-importgithub.com/coder/coder git https://github.com/coder/coder.git
octolytics-dimension-user_id95932066
octolytics-dimension-user_logincoder
octolytics-dimension-repository_id440752086
octolytics-dimension-repository_nwocoder/coder
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id440752086
octolytics-dimension-repository_network_root_nwocoder/coder
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release2b59d31a4e44f08b7af67a4b67f8fd0af3befe2a
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/coder/coder/issues/30423#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fcoder%2Fcoder%2Fissues%2F30423
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fcoder%2Fcoder%2Fissues%2F30423
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=coder%2Fcoder
Reloadhttps://github.com/coder/coder/issues/30423
Reloadhttps://github.com/coder/coder/issues/30423
Reloadhttps://github.com/coder/coder/issues/30423
coderhttps://github.com/coder
coderhttps://github.com/coder/coder
Codehttps://github.com/coder/coder
Issues320 (320)https://github.com/coder/coder/issues
Pull requests468 (468)https://github.com/coder/coder/pulls
Discussionshttps://github.com/coder/coder/discussions
Actionshttps://github.com/coder/coder/actions
Projectshttps://github.com/coder/coder/projects
Security and quality49 (49)https://github.com/coder/coder/security
Insightshttps://github.com/coder/coder/insights
https://github.com/coder/coder
New issuehttps://github.com/login?return_to=https://github.com/coder/coder/issues/30423
New issuehttps://github.com/login?return_to=https://github.com/coder/coder/issues/30423
Shared workspaces: scoped tokens can't run coder start, and use-role users can't report usagehttps://github.com/coder/coder/issues/30423#top
Area: rbachttps://github.com/coder/coder/issues?q=state%3Aopen%20label%3A%22Area%3A%20rbac%22
apiArea: HTTP APIhttps://github.com/coder/coder/issues?q=state%3Aopen%20label%3A%22api%22
bughttps://github.com/coder/coder/issues?q=state%3Aopen%20label%3A%22bug%22
cliArea: CLIhttps://github.com/coder/coder/issues?q=state%3Aopen%20label%3A%22cli%22
needs-triageIssue that require triagehttps://github.com/coder/coder/issues?q=state%3Aopen%20label%3A%22needs-triage%22
workspaceshttps://github.com/coder/coder/issues?q=state%3Aopen%20label%3A%22workspaces%22
https://github.com/EhabY
EhabYhttps://github.com/EhabY
on Oct 6, 2026https://github.com/coder/coder/issues/30423#issue-5728580738
coder/vscode-coder#1138https://github.com/coder/vscode-coder/pull/1138
coder/vscode-coder#1128https://github.com/coder/vscode-coder/pull/1128
https://github.com/apps/linear-code
linear-codehttps://github.com/apps/linear-code
on Oct 6, 2026https://github.com/coder/coder/issues/30423#issuecomment-6016516607
Linear Codehttps://linear.app
ENG-3449https://linear.app/codercom/issue/ENG-3449
EhabYhttps://github.com/EhabY
bughttps://github.com/coder/coder/issues?q=state%3Aopen%20label%3A%22bug%22
cliArea: CLIhttps://github.com/coder/coder/issues?q=state%3Aopen%20label%3A%22cli%22
apiArea: HTTP APIhttps://github.com/coder/coder/issues?q=state%3Aopen%20label%3A%22api%22
Area: rbachttps://github.com/coder/coder/issues?q=state%3Aopen%20label%3A%22Area%3A%20rbac%22
workspaceshttps://github.com/coder/coder/issues?q=state%3Aopen%20label%3A%22workspaces%22
needs-triageIssue that require triagehttps://github.com/coder/coder/issues?q=state%3Aopen%20label%3A%22needs-triage%22
on Oct 6, 2026https://github.com/coder/coder/issues/30423#event-32598959414
Sign up for freehttps://github.com/signup?return_to=https://github.com/coder/coder/issues/30423
Sign in to commenthttps://github.com/login?return_to=https://github.com/coder/coder/issues/30423
Area: rbachttps://github.com/coder/coder/issues?q=state%3Aopen%20label%3A%22Area%3A%20rbac%22
apiArea: HTTP APIhttps://github.com/coder/coder/issues?q=state%3Aopen%20label%3A%22api%22
bughttps://github.com/coder/coder/issues?q=state%3Aopen%20label%3A%22bug%22
cliArea: CLIhttps://github.com/coder/coder/issues?q=state%3Aopen%20label%3A%22cli%22
needs-triageIssue that require triagehttps://github.com/coder/coder/issues?q=state%3Aopen%20label%3A%22needs-triage%22
workspaceshttps://github.com/coder/coder/issues?q=state%3Aopen%20label%3A%22workspaces%22
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.