How to audit GitHub repo access in a private org
This guide is for GitHub org admins and engineering managers who need to answer a simple question reliably: who can access which repositories, and why?
In growing private orgs, repo access audits usually fail for the same reasons: direct grants accumulate, nested team inheritance gets hard to reason about, ownership drifts, and nobody wants to click through hundreds of repositories by hand.
TL;DR
- Problem: private GitHub orgs lose track of stale admins, direct grants, inherited access, and who actually owns each repo.
- Who this is for: GitHub org admins, engineering managers, and security-minded platform teams.
- What this helps you fix: access reviews, stale admin cleanup, team-vs-direct grant decisions, and audit preparation.
1. What usually breaks first
- An ex-employee or internal mover still has
adminon a private repository. - Direct user grants were added as shortcuts and never removed.
- Nested team inheritance gives wider access than current ownership really needs.
- External collaborators are still attached to repos long after the original engagement ended.
- Audit or compliance questions take hours because access has to be reconstructed repo by repo.
The point of an access audit is not just to count permissions. It is to work out whether the current access model still matches reality.
2. What to review first
Start with the highest-risk cases before you try to perfect the whole org.
- Repository admins: check who has
adminand whether they still need it. - Direct user grants: review every direct repo grant that bypasses teams.
- External collaborators: confirm that every external access path still has a real owner and business reason.
- Sensitive repos: validate that inherited parent-team access is still appropriate.
- Repos without a clear owner: ambiguous ownership usually means ambiguous permissions too.
3. Team access vs direct access
Team-based access is usually the right default because it makes ownership, onboarding, offboarding, and access reviews more predictable. Direct user grants are not always wrong, but they should be exceptions with a visible reason.
- Prefer teams for long-term access that follows ownership or function.
- Allow direct access sparingly for temporary exceptions, narrow admin coverage, or transitional states.
- Review direct grants regularly because they are the first place access drift hides.
If a repository has many direct user grants, the audit problem is usually structural, not just administrative.
4. How to run the audit with native GitHub
- List repositories that matter most first: critical services, sensitive internal code, customer-facing systems, and compliance-heavy repos.
- Review repository roles and identify
admin,maintain, and direct collaborator access. - Review team access and note where child teams inherit broader access from parents.
- Check external collaborators and confirm the business reason still exists.
- Record the owning team or escalation owner for every repo you review.
- Turn repeated direct grants into a structural issue list instead of fixing them one by one in isolation.
Native GitHub is fine for verifying one repository at a time. It becomes expensive when you need org-wide visibility and cleanup.
5. Where repod helps
This is where repod becomes operationally useful rather than just conceptually aligned.
- See repo-team access across the org without clicking through repositories one by one.
- Export current state to a spreadsheet for review and ownership cleanup.
- Make bulk repo-team access changes with a reviewable diff before apply.
- Delegate day-to-day repo-team access work without handing out GitHub org admin.
If you want the repod workflow itself, continue with how to export, review, and apply GitHub repo-team access changes in repod.
6. Audit checklist
- [ ] Identify repos with sensitive code or high operational risk.
- [ ] Review all repository admins.
- [ ] Review direct user grants.
- [ ] Review external collaborators.
- [ ] Validate nested team inheritance on sensitive repos.
- [ ] Record or confirm an owning team for each repo.
- [ ] Turn repeat exceptions into team-structure changes where possible.
Related guides
- How to restrict GitHub repo visibility to one team in a private org
- How to manage GitHub repo visibility with nested teams using repod
- GitHub governance and permission drift guide for private orgs
- GitHub team access vs direct repository access
- How to export, review, and apply GitHub repo-team access changes in repod
- How to delegate GitHub repo-team access work without handing out org admin
- GitHub fine-grained PAT guidance for repod