fix(auth): restore team-scoped authorization - #25
Merged
roodboi merged 2 commits intoMar 24, 2026
Conversation
|
roodboi
pushed a commit
that referenced
this pull request
Mar 24, 2026
## <small>1.21.1 (2026-03-24)</small> * Merge branch 'main' into codex/fix-authorization-bypass-for-team-management ([3c4eee5](3c4eee5)) * Merge pull request #25 from hack-dance/codex/fix-authorization-bypass-for-team-management ([4e0a5fd](4e0a5fd)), closes [#25](#25) * fix(auth): restore team-scoped authorization ([5622392](5622392))
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
listTeams()andgetTeam()authorize on organization membership which allowed any active org member to administer every team in that org, widening privileges unintentionally.Description
listTeams()to require an activeteam-scoped membership for the acting user when deciding which teams to return instead of authorizing on organization membership.getTeam()to require an activeteam-scoped membership for the acting user for team access instead of checking organization membership.org-team-membership.test.ts) to assert that org-only members cannot list or add members to teams they do not belong to.Testing
bun test services/auth-broker/tests/org-team-membership.test.ts, but the run could not be executed becausebunis not installed in the current environment and therefore the tests could not be executed here.bun x ultracite check services/auth-broker/src/modules/orgs/service.ts services/auth-broker/tests/org-team-membership.test.ts, but this also failed due tobunnot being available in this environment.bun testandbun x ultracite fix/bun x ultracite checkin CI or locally to validate before merging.Codex Task