ci: fix security check by verifying repository permissions instead of…#33
Conversation
|
Warning Review limit reached
More reviews will be available in 2 minutes and 42 seconds. Learn how PR review limits work. Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable the review add-on in the billing tab to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file). ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based credits. 🚦 How do rate limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan refill rate. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, the refill rate gradually slows as usage increases. The highest same-day bursts are limited more strictly. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (1)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Addressed Issues:
Fixes #(issue number)
Screenshots/Recordings:
Additional Notes:
This PR replaces the organization membership check in
version-release.ymlwith a repository-level collaborator permission check.Why this was needed:
The previous script used
getMembershipForUserto check if the actor was a member of theAOSSIE-Orgorganization. However, on GitHub, organization memberships are set to "Private" by default. The standardGITHUB_TOKENprovided to actions does not have permission to view private organization memberships, so it was resulting in a404 Not Foundand blocking legitimate maintainers from triggering the release workflow.The Fix:
I have updated the script to use
getCollaboratorPermissionLevelto verify if the actor haswriteoradminaccess to the repository itself. Since the token is inherently scoped to the repository, it has full access to verify collaborator permissions regardless of organization privacy settings. This securely prevents unauthorized users from running the workflow while correctly authorizing actual maintainers.Checklist
We encourage contributors to use AI tools responsibly when creating Pull Requests. While AI can be a valuable aid, it is essential to ensure that your contributions meet the task requirements, build successfully, include relevant tests, and pass all linters. Submissions that do not meet these standards may be closed without warning to maintain the quality and integrity of the project. Please take the time to understand the changes you are proposing and their impact.