Detail bug report: View on Detail
Closes #171
listRepositories and userInstallationRepositories in packages/forge-github/src/client/installations.ts cap pagination at MAX_PAGES = 50 × PAGE_SIZE = 100 = 5000 repos. When a GitHub App installation has more than 5000 accessible repositories, the loop exhausts the page cap and silently returns a truncated list — no error, no log, no marker.
This truncated list is the sole GitHub-side input to adminOfEvery in apps/worker/src/jobs/recover-installation.ts, which decides the granted-admin authorization result. A user who is admin of only the first 5000 repos (but not the omitted ones) can be wrongly verified as admin of every repo and granted granted-admin, letting them claim/administer an org installation they don't fully control. Symmetrically, a legitimate full admin whose user-list is truncated can be wrongly denied.
After each pagination loop, compare the fetched count against the last-seen body.total_count and throw if found.length < totalCount. The throw propagates through verify() → outcomeFor()'s existing try/catch, which returns "failed" with "recovery-failed" — fail-closed, never silently authorizing on partial data. Applied to both listRepositories and userInstallationRepositories.
installations-pagination.test.ts verify both functions throw when total_count exceeds the cap (6000), throw at one-over-the-cap (5001), and do not throw at the exact cap (5000) or below.recover-installation.integration.test.ts verifies that a truncated listRepositories call causes recoverInstallation to return "failed", report "recovery-failed", and deny the claim (userCanClaimInstallation returns false).installations.test.ts (6) and recover-installation.integration.test.ts (11) confirm no regression in normal pagination, early-return statuses, and the grant/deny paths.Automatic Fixes PRs can be configured here.
The latest updates on your projects. Learn more about Unkey Deploy
| Name | Status | Preview | Inspect | Updated (UTC) |
|---|---|---|---|---|
| tripwire / web (preview) | Ready | Visit Preview | Inspect | Nov 7, 2026 6:55am |
Capy couldn't review this pull request because grim's workspace is out of credits, add credits or enable auto-reload to resume automatic reviews.
@detail-app[bot], Tripwire blocked this change request.
Rate limit: You opened 58 change requests in a short time. Wait before you open another.
A new commit will not fix this.
If you think it should merge anyway, say so in a comment. A maintainer will decide.
Sign in to comment.