fix(auth): require repo write access for activation - #711
Conversation
|
Note Gittensory Gate skippedPR closed before full evaluation. No late first comment was created.
💰 Earn for open-source contributions like this. Gittensor lets GitHub contributors earn for the work they already do — register to start earning →. Checked by Gittensory, a quiet PR intelligence layer for OSS maintainers. |
|
gittensory · advisory review Reviewed 2 changed file(s) — two independent AI reviewers. Suggested action: ✅ Safe to merge — both reviewers found no blocking issues. Reviewer A · Suggestions
Worth double-checking
Reviewer B · Suggestions
Worth double-checking
|
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
gittensory-ui | 09ecfc7 | Commit Preview URL Branch Preview URL |
Jun 14 2026, 02:16 PM |
Motivation
Description
requireRepoMaintainerwithrequireRepoWriteAccessonPOST /v1/repos/:owner/:repo/activationand by generalizing the stricter guard for other write endpoints.requireRepoWriteAccess(renamedREPO_KEY_WRITE_PERMISSIONS→REPO_WRITE_PERMISSIONS) and updatedai-keyendpoints to use it so both repo-visible settings writes and secret writes require live GitHubadmin/maintain/writepermission.getRepositoryCollaboratorPermissionand seed an installation to assert a read-only collaborator (PR author associationCOLLABORATORwithreadpermission) can preview activation but receives403on activation, and that a session with GitHubwritepermission can activate successfully.Testing
npm test -- --run test/integration/maintainer-activation.test.ts test/unit/routes-ai-byok.test.ts, and all tests passed (21 tests, 21 passed).npm run typecheck, which succeeded with no TypeScript errors.git diff --checkfor the modified files and committed the change.Codex Task