René's URL Explorer Experiment


Title: improvement(permissions): confine workspace role changes to existing members by icecrasher321 · Pull Request #6180 · simstudioai/sim · GitHub

Open Graph Title: improvement(permissions): confine workspace role changes to existing members by icecrasher321 · Pull Request #6180 · simstudioai/sim

X Title: improvement(permissions): confine workspace role changes to existing members by icecrasher321 · Pull Request #6180 · simstudioai/sim

Description: Summary Fixes a workspace-access bypass. PATCH /api/workspaces/[id]/permissions accepted arbitrary userIds and inserted permission rows for them, letting any workspace admin attach an account — and, through the credential sync this route performs, hand it the workspace’s secrets — without the invitation flow’s plan check, seat provisioning, or invitee consent. The write is now a conditional UPDATE of an existing row so introducing a member is structurally unreachable, and every state-dependent guard (owner, organization admins, billing account, the caller’s own authority) is re-evaluated under lock, since an admin could otherwise drive an ownership transfer against their own in-flight batch and strand a user as workspace owner with read. Reviewer-visible changes: permissions.createdAt now means join time rather than last-role-change (documented on the admin members endpoint), the PATCH response is an acknowledgement only, and the owner/billing-account role controls are disabled in the members lists — all three were offering or reporting something the server never honored. Type of Change Other: Security Testing Tests added Checklist Code follows project style guidelines Self-reviewed my changes Tests added/updated and passing No new warnings introduced I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)

Open Graph Description: Summary Fixes a workspace-access bypass. PATCH /api/workspaces/[id]/permissions accepted arbitrary userIds and inserted permission rows for them, letting any workspace admin attach an account — and...

X Description: Summary Fixes a workspace-access bypass. PATCH /api/workspaces/[id]/permissions accepted arbitrary userIds and inserted permission rows for them, letting any workspace admin attach an account — and...

Opengraph URL: https://github.com/simstudioai/sim/pull/6180

X: @github

direct link

Domain: github.com

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react-reconciler,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@d5750093facf
route-pattern/:user_id/:repository/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:912ae137-da57-236b-89a3-e78407f6ca93
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idD77A:219171:535108:764A9B:6AFB404E
html-safe-nonceb3e1aef09879b7c79ea856b36a76fbbb1308f9fc1b942b7fdf2be74d2f56d819
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJENzdBOjIxOTE3MTo1MzUxMDg6NzY0QTlCOjZBRkI0MDRFIiwidmlzaXRvcl9pZCI6IjUzMDY2NzQ3NDAxODAyMzg0MTQiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmacc9ef893ea5f843681f00ddd7ab7e9db33cae6b939a0a48cf0480d51410a34a3d
hovercard-subject-tagpull_request:4186269746
github-keyboard-shortcutsrepository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///pull_requests/show/files
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/simstudioai/sim/pull/6180/files
twitter:imagehttps://avatars.githubusercontent.com/u/17950982?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/17950982?s=400&v=4
og:image:altSummary Fixes a workspace-access bypass. PATCH /api/workspaces/[id]/permissions accepted arbitrary userIds and inserted permission rows for them, letting any workspace admin attach an account — and...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
Noned849b928f455c800985398e7f1b659425adb312a5fa14fba5d9a14e62e9fe5dd
turbo-cache-controlno-preview
diff-viewunified
go-importgithub.com/simstudioai/sim git https://github.com/simstudioai/sim.git
octolytics-dimension-user_id199344406
octolytics-dimension-user_loginsimstudioai
octolytics-dimension-repository_id912559512
octolytics-dimension-repository_nwosimstudioai/sim
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id912559512
octolytics-dimension-repository_network_root_nwosimstudioai/sim
turbo-body-classeslogged-out env-production page-responsive full-width
disable-turbotrue
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
releasea6c2f87cbcb6414452377b4967858ed6a66f1109
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/simstudioai/sim/pull/6180/files#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fsimstudioai%2Fsim%2Fpull%2F6180%2Ffiles
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%2Fsimstudioai%2Fsim%2Fpull%2F6180%2Ffiles
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fpull_requests%2Fshow%2Ffiles&source=header-repo&source_repo=simstudioai%2Fsim
Reloadhttps://github.com/simstudioai/sim/pull/6180/files
Reloadhttps://github.com/simstudioai/sim/pull/6180/files
Reloadhttps://github.com/simstudioai/sim/pull/6180/files
simstudioaihttps://github.com/simstudioai
simhttps://github.com/simstudioai/sim
Codehttps://github.com/simstudioai/sim
Issues129 (129)https://github.com/simstudioai/sim/issues
Pull requests200 (200)https://github.com/simstudioai/sim/pulls
Actionshttps://github.com/simstudioai/sim/actions
Projectshttps://github.com/simstudioai/sim/projects
Security and qualityhttps://github.com/simstudioai/sim/security
Insightshttps://github.com/simstudioai/sim/pulse
Sign up for GitHub https://github.com/signup?return_to=%2Fsimstudioai%2Fsim%2Fissues%2Fnew%2Fchoose
terms of servicehttps://docs.github.com/terms
privacy statementhttps://docs.github.com/privacy
Sign inhttps://github.com/login?return_to=%2Fsimstudioai%2Fsim%2Fissues%2Fnew%2Fchoose
icecrasher321https://github.com/icecrasher321
staginghttps://github.com/simstudioai/sim/tree/staging
staging-v22https://github.com/simstudioai/sim/tree/staging-v22
Conversation 12 https://github.com/simstudioai/sim/pull/6180
Commits 2 https://github.com/simstudioai/sim/pull/6180/commits
Checks 27 https://github.com/simstudioai/sim/pull/6180/checks
Files changed https://github.com/simstudioai/sim/pull/6180/files
Please reload this pagehttps://github.com/simstudioai/sim/pull/6180/files
improvement(permissions): confine workspace role changes to existing members https://github.com/simstudioai/sim/pull/6180/files#top
Show all changes 2 commits https://github.com/simstudioai/sim/pull/6180/files
0e6b5b4 improvement(permissions): confine workspace role changes to existing … Aug 2, 2026 https://github.com/simstudioai/sim/pull/6180/commits/0e6b5b43067ba8ec9f0e187dfd9de2cecd53fcdf
21820e0 improvement(permissions): retry lock timeouts and audit admin upserts… Aug 2, 2026 https://github.com/simstudioai/sim/pull/6180/commits/21820e02acb5032ee124516e5c9c2f7eb45b6a31
Clear filters https://github.com/simstudioai/sim/pull/6180/files
Please reload this pagehttps://github.com/simstudioai/sim/pull/6180/files
Please reload this pagehttps://github.com/simstudioai/sim/pull/6180/files
route.test.ts https://github.com/simstudioai/sim/pull/6180/files#diff-1cd3a4efa5d2f0a0b1163583d196f21973f02e3608b4263e2873590f47b811c2
route.ts https://github.com/simstudioai/sim/pull/6180/files#diff-d3a66a663b1c4032f4d947a62183b2e7c286f6b3098272ce587191cb052c438d
route.ts https://github.com/simstudioai/sim/pull/6180/files#diff-1733674e380049892af79db64fe1febda0b36428667c8e6237533c21a51d6418
route.ts https://github.com/simstudioai/sim/pull/6180/files#diff-36331b6ed09cc800757b189a93f7cdfcdb81ee5a9f6c9e205bdbc483dc67c92c
route.test.ts https://github.com/simstudioai/sim/pull/6180/files#diff-db0fcd852e69eddcd9449d11b676577bd09419f9ed79b395fa5a05dfd6275b93
route.ts https://github.com/simstudioai/sim/pull/6180/files#diff-312ea52cc8a82213638ab480f5771640a73d3350c8b147a8bf729e8266f26edb
organization-member-lists.tsx https://github.com/simstudioai/sim/pull/6180/files#diff-2bdf5cc850bc520509b805c9ac07fded05481ee062990ff66221e96b31647510
teammates.tsx https://github.com/simstudioai/sim/pull/6180/files#diff-6552de4cf6d80acc6c8dcc22e8fcfeb9c1c503a332b25cc33f6310c8aaced1b5
role-lock.tsx https://github.com/simstudioai/sim/pull/6180/files#diff-1d71365a0b13edc7c66fee842d85983b3b85b38881f3652e6c9f8d623747e6a7
invitations.ts https://github.com/simstudioai/sim/pull/6180/files#diff-efa0352dde6fcd9c796ff6264336cd76e41cdaff1237883c6322c57dee528745
organization.ts https://github.com/simstudioai/sim/pull/6180/files#diff-589c92452da41752ecc4e89e1da6948c485eb8dbf0da7b924126e46eb18f08bc
workspaces.ts https://github.com/simstudioai/sim/pull/6180/files#diff-cc809bb2a9762a5e34aa3dead6e253dc3a338a8015828af9cbc7a24bd40c8e1d
transaction.test.ts https://github.com/simstudioai/sim/pull/6180/files#diff-761a7000a53d33c36fcf08ac864a9699c6f2064894c8de970d88e7c83df52004
transaction.ts https://github.com/simstudioai/sim/pull/6180/files#diff-0c44f8dd01c9a8a793a4fa759fa403f1d7c95e545bef4af4798236a052be52df
utils.test.ts https://github.com/simstudioai/sim/pull/6180/files#diff-45d86b72a59e0d48f3a927159660215d3f1c1889b96aefc3159dd255c68c505a
utils.ts https://github.com/simstudioai/sim/pull/6180/files#diff-07191b757d3b2d0d7bb1010340242588896ee4ade5df67d9e36b8e07522da1a8
apps/sim/app/api/organizations/[id]/roster/route.test.tshttps://github.com/simstudioai/sim/pull/6180/files#diff-1cd3a4efa5d2f0a0b1163583d196f21973f02e3608b4263e2873590f47b811c2
View file https://github.com/simstudioai/sim/blob/21820e02acb5032ee124516e5c9c2f7eb45b6a31/apps/sim/app/api/organizations/%5Bid%5D/roster/route.test.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/simstudioai/sim/pull/6180/{{ revealButtonHref }}
https://github.com/simstudioai/sim/pull/6180/files#diff-1cd3a4efa5d2f0a0b1163583d196f21973f02e3608b4263e2873590f47b811c2
https://github.com/simstudioai/sim/pull/6180/files#diff-1cd3a4efa5d2f0a0b1163583d196f21973f02e3608b4263e2873590f47b811c2
https://github.com/simstudioai/sim/pull/6180/files#diff-1cd3a4efa5d2f0a0b1163583d196f21973f02e3608b4263e2873590f47b811c2
apps/sim/app/api/organizations/[id]/roster/route.tshttps://github.com/simstudioai/sim/pull/6180/files#diff-d3a66a663b1c4032f4d947a62183b2e7c286f6b3098272ce587191cb052c438d
View file https://github.com/simstudioai/sim/blob/21820e02acb5032ee124516e5c9c2f7eb45b6a31/apps/sim/app/api/organizations/%5Bid%5D/roster/route.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/simstudioai/sim/pull/6180/{{ revealButtonHref }}
https://github.com/simstudioai/sim/pull/6180/files#diff-d3a66a663b1c4032f4d947a62183b2e7c286f6b3098272ce587191cb052c438d
https://github.com/simstudioai/sim/pull/6180/files#diff-d3a66a663b1c4032f4d947a62183b2e7c286f6b3098272ce587191cb052c438d
https://github.com/simstudioai/sim/pull/6180/files#diff-d3a66a663b1c4032f4d947a62183b2e7c286f6b3098272ce587191cb052c438d
https://github.com/simstudioai/sim/pull/6180/files#diff-d3a66a663b1c4032f4d947a62183b2e7c286f6b3098272ce587191cb052c438d
https://github.com/simstudioai/sim/pull/6180/files#diff-d3a66a663b1c4032f4d947a62183b2e7c286f6b3098272ce587191cb052c438d
https://github.com/simstudioai/sim/pull/6180/files#diff-d3a66a663b1c4032f4d947a62183b2e7c286f6b3098272ce587191cb052c438d
https://github.com/simstudioai/sim/pull/6180/files#diff-d3a66a663b1c4032f4d947a62183b2e7c286f6b3098272ce587191cb052c438d
https://github.com/simstudioai/sim/pull/6180/files#diff-d3a66a663b1c4032f4d947a62183b2e7c286f6b3098272ce587191cb052c438d
https://github.com/simstudioai/sim/pull/6180/files#diff-d3a66a663b1c4032f4d947a62183b2e7c286f6b3098272ce587191cb052c438d
apps/sim/app/api/v1/admin/workspaces/[id]/members/[memberId]/route.tshttps://github.com/simstudioai/sim/pull/6180/files#diff-1733674e380049892af79db64fe1febda0b36428667c8e6237533c21a51d6418
View file https://github.com/simstudioai/sim/blob/21820e02acb5032ee124516e5c9c2f7eb45b6a31/apps/sim/app/api/v1/admin/workspaces/%5Bid%5D/members/%5BmemberId%5D/route.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/simstudioai/sim/pull/6180/{{ revealButtonHref }}
https://github.com/simstudioai/sim/pull/6180/files#diff-1733674e380049892af79db64fe1febda0b36428667c8e6237533c21a51d6418
https://github.com/simstudioai/sim/pull/6180/files#diff-1733674e380049892af79db64fe1febda0b36428667c8e6237533c21a51d6418
https://github.com/simstudioai/sim/pull/6180/files#diff-1733674e380049892af79db64fe1febda0b36428667c8e6237533c21a51d6418
https://github.com/simstudioai/sim/pull/6180/files#diff-1733674e380049892af79db64fe1febda0b36428667c8e6237533c21a51d6418
apps/sim/app/api/v1/admin/workspaces/[id]/members/route.tshttps://github.com/simstudioai/sim/pull/6180/files#diff-36331b6ed09cc800757b189a93f7cdfcdb81ee5a9f6c9e205bdbc483dc67c92c
View file https://github.com/simstudioai/sim/blob/21820e02acb5032ee124516e5c9c2f7eb45b6a31/apps/sim/app/api/v1/admin/workspaces/%5Bid%5D/members/route.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/simstudioai/sim/pull/6180/{{ revealButtonHref }}
https://github.com/simstudioai/sim/pull/6180/files#diff-36331b6ed09cc800757b189a93f7cdfcdb81ee5a9f6c9e205bdbc483dc67c92c
https://github.com/simstudioai/sim/pull/6180/files#diff-36331b6ed09cc800757b189a93f7cdfcdb81ee5a9f6c9e205bdbc483dc67c92c
https://github.com/simstudioai/sim/pull/6180/files#diff-36331b6ed09cc800757b189a93f7cdfcdb81ee5a9f6c9e205bdbc483dc67c92c
https://github.com/simstudioai/sim/pull/6180/files#diff-36331b6ed09cc800757b189a93f7cdfcdb81ee5a9f6c9e205bdbc483dc67c92c
https://github.com/simstudioai/sim/pull/6180/files#diff-36331b6ed09cc800757b189a93f7cdfcdb81ee5a9f6c9e205bdbc483dc67c92c
https://github.com/simstudioai/sim/pull/6180/files#diff-36331b6ed09cc800757b189a93f7cdfcdb81ee5a9f6c9e205bdbc483dc67c92c
https://github.com/simstudioai/sim/pull/6180/files#diff-36331b6ed09cc800757b189a93f7cdfcdb81ee5a9f6c9e205bdbc483dc67c92c
https://github.com/simstudioai/sim/pull/6180/files#diff-36331b6ed09cc800757b189a93f7cdfcdb81ee5a9f6c9e205bdbc483dc67c92c
Please reload this pagehttps://github.com/simstudioai/sim/pull/6180/files
https://github.com/simstudioai/sim/pull/6180/files#diff-36331b6ed09cc800757b189a93f7cdfcdb81ee5a9f6c9e205bdbc483dc67c92c
Please reload this pagehttps://github.com/simstudioai/sim/pull/6180/files
Please reload this pagehttps://github.com/simstudioai/sim/pull/6180/files
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.