fix(auth): scope getPrCiStatus access to maintainer installation#404
Merged
Ayush-Patel-56 merged 2 commits intoJun 23, 2026
Merged
Conversation
Contributor
|
@pavsoss is attempting to deploy a commit to the codersogs-3057's projects Team on Vercel. A member of the Team first needs to authorize it. |
# Conflicts: # src/app/actions/maintainer.ts
Ayush-Patel-56
approved these changes
Jun 23, 2026
Ayush-Patel-56
left a comment
Collaborator
There was a problem hiding this comment.
Resolved the conflict (combined the new requireMaintainer() pattern with requireService: true for the new assertMaintainerInstall check) and pushed. Real IDOR fix - confirmed the auth check runs before the cache lookup, tests cover both authorized/unauthorized paths, 46/46 passing.
Approving.
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.
Summary
Fix authorization gap in
getPrCiStatuswhere maintainers could query CI status for installations they did not manage.Root Cause
The endpoint verified only maintainer role (
isUserMaintainer) but did not validate ownership of the providedinstallationId.Changes
getServiceSupabase()assertMaintainerInstall(service, user.id, installationId)not_authorisedfor unauthorized installation accessSecurity Impact
Prevents cross-installation CI status access (IDOR / tenant isolation issue).
Validation
Related issue
Closes #384