Repository navigation
fix(auth): check a workspace's personal-key switch after membership - #9540
Conversation
…so a non-member never learns what it named exists
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
There was a problem hiding this comment.
No issues found across 4 files
Confidence score: 5/5
- Automated review surfaced no issues in the provided summaries.
- No files require special attention.
This PR changes authentication, authorization, or input validation. Ultrareviews find 2.4x more serious bugs than standard reviews. Comment @cubic-dev-ai ultrareview to run one.
Turn on auto-fix | Re-trigger cubic
[Medium impact] The PR appears safe to merge, with no outstanding findings. SummaryThe PR checks workspace membership before refusing personal API keys or OAuth tokens under the workspace setting.
Reviews (2) · Last reviewed commit: "test(auth): import the key-switch error ..." · Reviewed by Greptile |
|
@cubic-dev-ai review this PR |
@waleedlatif1 I have started the AI code review. It will take a few minutes to complete. |
Summary
authorizeWorkspaceOperationrefused a personal API key or OAuth token on a workspace with personal keys switched off before checking membership. Workspace use cases load their canonical context before authorizing, so a non-member got403 PERSONAL_API_KEYS_DISABLEDfor a resource that exists and404for one that doesn't. With v2 file routes accepting guessablefiles/…paths, that is a practical file-existence oracle for those workspaces.NoWorkspaceAccessError(404 on v2). A member still getsPERSONAL_API_KEYS_DISABLED. The only visible change for members: one whose role is also too low gets the insufficient-role 403 first (still a 403).Type of Change
Testing
workspace-authorization.test.ts: the case that pinned column-before-role is inverted ("conceals the workspace before refusing the workspace personal-key column"); it fails on the old orderChecklist
test-auditauthoring gate)