Guide
GitHub Roles: Organization, Team and Repository Roles Explained
Every GitHub role in one place: organization roles from owner to security manager, team maintainer, repository roles, and how to review who holds each.
Part of the guide User Access Review: How to Run One, Step by Step
Your auditor picked GitHub for a sample, or someone asked who can change settings in your organization. The answer is spread across three kinds of role, and the one people forget can give more access than the rest. This guide lists every GitHub role, what it allows, where to see who holds it, and how to review it.
GitHub roles are sets of permissions given to people or teams at three levels. Organization roles, such as owner, security manager or all-repository admin, apply across the whole organization. The team maintainer role lets someone manage one team. Repository roles, from Read to Admin, apply to one repository. One person can hold roles at every level.
A few GitHub words come up on this page:
- Organization: a shared GitHub account for a company or team. It owns repositories and teams.
- Repository: one project’s code and its history.
- Team: a group of members. A team can be given a role on a repository, and teams can sit inside other teams.
- Permission: the right to do one action, such as delete an issue. A role is a set of permissions.
- Base permission: the repository role every member of the organization gets on every repository, set by the owners.
The three levels of GitHub roles
GitHub’s page on roles in an organization splits roles into three levels:
| Level | What it controls | Roles |
|---|---|---|
| Organization | The organization’s settings, people and teams. Some organization roles also give access to every repository. | Owner, member, moderator, billing manager, security manager, CI/CD admin, app manager, the five all-repository roles, and custom roles on Enterprise Cloud. |
| Team | Who is in one team and its settings. | Member and maintainer. |
| Repository | What a person or team can do in one repository. | Read, Triage, Moderate, Write, Maintain, Admin, and custom repository roles on Enterprise Cloud. |
When you invite someone to an organization, GitHub’s page on roles says you can add them as an owner, a billing manager or a member. The other organization roles are given to people who are already members.
GitHub organization roles
Predefined roles are built into every organization, so nobody has to create them. This table covers each one, with what to look for in a review.
| Role | What it allows | What to check in a review |
|---|---|---|
| Owner | Full administrative access to the organization, and admin access to every repository it owns. In GitHub’s table of predefined role permissions, only owners can invite members, remove members, view the organization audit log or delete the organization. | A short list of named people, each with a reason. GitHub says to keep it limited, but to no fewer than two people. |
| Member | The default role, with no administrative rights. By default a member can create repositories and teams and see every member and team, and gets the base permission on the repositories. | That each member still works with you, and what the base permission gives them. |
| Moderator | Everything a member can do, plus block and unblock contributors who are not members, set interaction limits and hide comments in all of the organization’s public repositories. | Low risk for your code, but still a role someone gave out. Confirm it is still needed. |
| Billing manager | Manage billing settings, such as payment details. Cannot see the organization’s members or teams, cannot create or access repositories, and does not appear in the list of members. | Usually finance. GitHub says a billing manager can invite other billing managers, so check the whole list. |
| Security manager | Read access to every repository, write access to all security alerts, and control of the security feature settings for the organization and each repository. | Read access to all code comes with it. Check that only the security team holds it. |
| CI/CD admin | Admin access to GitHub Actions for the organization: its policies, runners, secrets, variables and usage. | Secrets are often cloud credentials. Treat this as privileged access. |
| App manager | Manage the settings of GitHub Apps the organization has registered. It does not allow installing or uninstalling apps. | Who builds and runs your internal apps. Confirm each holder. |
| All-repository read, triage, write, maintain or admin | The matching repository role on every repository in the organization, current and future. | All-repository write and admin are broad. Each holder needs a reason, as an owner does. |
Sources: GitHub’s pages on roles in an organization, permissions of predefined organization roles, managing security managers, and the July 2024 GitHub changelog on all-repository roles. GitHub’s page on repository roles for an organization says owners have admin access to every repository the organization owns.
Two points are easy to miss. First, the all-repository roles cover repositories created later as well, so the access grows each time someone creates a repository. GitHub’s changelog says that this access is called out in the team and repository views rather than listed as a grant on each repository. Look for it under Role assignments, described below. Second, a role can be given to a team, and then the people in that team hold it too.
Custom organization roles
On GitHub Enterprise Cloud, owners can build their own organization roles from a list of permissions, for example a role that can only view the audit log. GitHub says these are only available to organizations on Enterprise Cloud. If you have them, list each custom role by name with the permissions it contains, and review its holders like any other role.
Outside collaborators
GitHub lists outside collaborators on the same page as the roles, but they are not members and hold no organization role. An outside collaborator is a person with access to one or more of your repositories, such as a consultant or a temporary worker. They only get repository roles, one repository at a time, and base permissions do not apply to them. The GitHub collaborator permissions guide covers how to find and review them.
The team maintainer role
Inside a team, a person is either a member or a maintainer. GitHub’s page on the team maintainer role says a maintainer can, among other things:
- add organization members to the team and remove them,
- make other team members maintainers,
- remove the team’s access to repositories,
- rename the team and change its visibility.
The first point matters most in a review. If a team has Admin on your production code, its maintainers decide who gets that Admin access. Review who maintains each team that holds Write or Admin, and do not treat team membership as something only owners change.
GitHub repository roles
Each repository has six standard roles, from least to most access: Read, Triage, Moderate, Write, Maintain and Admin. GitHub’s page on repository roles for an organization lists what each one allows, and organizations on Enterprise Cloud can add custom repository roles. In short, Write can push code and change GitHub Actions secrets, and Admin can manage who has access and delete the repository. The GitHub collaborator permissions guide goes through each role and where a person’s access to a repository comes from.
One setting sits between the levels. Owners choose a base permission, which GitHub’s page on base permissions says applies to every member on every repository. A higher role given on one repository overrides it. If the base permission is Write, every member can push to every repository, unless branch rules block it.
Enterprise roles, if you have an enterprise account
Companies on GitHub Enterprise Cloud may have an enterprise account above their organizations, with roles of its own. GitHub’s page on the abilities of enterprise roles says enterprise owners control every enterprise setting and can add or remove organizations. It also says they do not have access to organization settings or content by default, but can gain it by joining any organization. That makes enterprise owners part of your review, even though they do not appear as owners of each organization. Enterprise accounts also have billing manager, app manager, security manager and custom roles, so list those holders too.
How roles add up
A person’s access is the sum of everything they hold. GitHub’s page on using organization roles says a user or team can hold several organization roles. On top of those, the same person can get access from the base permission, from their teams and from a direct grant on a repository.
Here is an example, with made-up names. Priya is a member, so the base permission gives her Read everywhere. Her team has Write on the payments repository, and the same team holds the CI/CD admin role. She can push to payments, and she can also change the Actions secrets for the whole organization. If her manager only sees “Write on payments”, the review misses the larger access. Show each person every role they hold, and where it comes from.
How to see who holds each GitHub role
An organization owner can see most of it. Each step says where to start.
- Owners and members. Click the People tab of the organization (not Settings). Filter by role to list the owners.
- Organization roles. In the organization’s Settings, in the “Access” section of the sidebar, click Organization roles, then Role assignments. Use the Users and Teams tabs. Next to each one, click the number of roles to see them.
- Role definitions. In the same place, Role management shows the permissions inside each predefined and custom role.
- Base permission. In Settings, under “Access”, click Member privileges and read the “Base permissions” setting.
- Moderators. In Settings, under “Access”, click Moderation, then Moderators. GitHub manages moderators on this page of their own.
- Billing managers. In Settings, click Billing and licensing, then Additional billing details. GitHub says billing managers do not appear in the list of members. If an enterprise account owns your organization, billing managers are set at the enterprise level instead.
- Team maintainers. Open each team from the Teams tab and look at Members, where each person’s team role is shown.
- Enterprise owners. If you have an enterprise account, an enterprise owner opens it and clicks People, then Administrators, as GitHub’s page on viewing people in your enterprise describes.
For more than a handful of people, ask an engineer to export the lists. This script uses the GitHub CLI and the REST API for organization roles. It only reads. It needs a login as an organization owner, and a classic token needs the admin:org scope. The default gh auth login does not include that scope, so run gh auth refresh -h github.com -s admin:org first. It does not list moderators, billing managers or enterprise owners: use the steps above for those.
#!/usr/bin/env bash
# Reads only. Needs the GitHub CLI (gh), logged in as an organization owner.
set -euo pipefail
ORG=${ORG:?set ORG to your organization name}
printf 'role\ttype\tname\tassignment\n'
gh api --paginate "orgs/$ORG/members?role=admin&per_page=100" \
--jq '.[] | ["owner", "user", .login, "-"] | @tsv'
# Prefix each row with the role name, so no name ends up inside a jq program.
label() { while IFS= read -r line; do printf '%s\t%s\n' "$1" "$line"; done; }
gh api "orgs/$ORG/organization-roles" --jq '.roles[] | [.id, .name] | @tsv' |
while IFS=$'\t' read -r id name; do
{ gh api --paginate "orgs/$ORG/organization-roles/$id/users?per_page=100" \
--jq '.[] | ["user", .login, .assignment] | @tsv' </dev/null | label "$name"; } ||
echo "note: could not list users for role $name" >&2
{ gh api --paginate "orgs/$ORG/organization-roles/$id/teams?per_page=100" \
--jq '.[] | ["team", .slug, .assignment] | @tsv' </dev/null | label "$name"; } ||
echo "note: could not list teams for role $name" >&2
done
The output is tab-separated text you can paste into a spreadsheet. The assignment column says whether a user holds the role directly, through a team (indirect), or both (mixed). The API also returns inherited_from, the team or teams the user got the role through. The role column shows the name GitHub’s API uses, which can differ from the label in Settings. If GitHub refuses the request for a role, the script prints a note and moves on. GitHub’s API page says it answers 422 when organization roles are not enabled.
To list the maintainers of one team, run gh api --paginate "orgs/$ORG/teams/TEAM/members?role=maintainer&per_page=100" --jq '.[] | [.login, .role, (.inherited | tostring)] | @tsv' with the team’s short name in place of TEAM. GitHub includes the members of child teams in this list, and true in the last column means the person came in through a child team. GitHub also notes that owners who join a team are shown as maintainers.
How to review GitHub roles
You can run this with the exports above, a spreadsheet and the people who know the work. The free user access review template has the columns.
- Start with owners and enterprise owners. Each one needs a named reason. Fewer is better, but GitHub suggests at least two owners.
- Review the broad organization roles next. All-repository write and admin, CI/CD admin and security manager reach every repository. Treat them as privileged access and review them the way the privileged user access review guide describes.
- Check the base permission. Write down the level and confirm it is still what you want every member to have.
- List team maintainers for teams with Write or Admin. Ask the team’s owner to confirm each one.
- Send each line to someone who knows the work. The manager for staff, the head of security for the security manager role, finance for billing managers. Ask for keep or remove, with a reason for every line that gives admin rights.
- Remove at the source and check again. If the role came from a team, change the team, not the person. Then pull the lists again, and search the GitHub audit log for the changes. Keep the first export, the decisions with who made them and when, and the second export together.
Roles are only part of GitHub access. The same review also covers repository access, outside collaborators, and access that is not tied to a person, such as installed GitHub Apps and deploy keys. The user access review guide covers the whole process across your systems.
How often to review GitHub roles
SOC 2 and ISO 27001 set no interval for access reviews. Your own policy does, and your auditor tests that you kept to it. If PCI DSS applies to your systems, PCI DSS v4.0.1 requirement 7.2.4 says user accounts and access privileges are reviewed at least once every six months. You can choose to review owner and other admin roles more often than the rest. That is a choice, not a rule.
Where Acciew fits
Acciew, in early access, runs the listing and asking steps of a GitHub review, and does the same for Keycloak and AWS. For GitHub it reads the organization members and their role, teams and team membership including nested teams, outside collaborators, installed applications, and each repository’s collaborators and team permissions with their level. It then sends each manager an email link to their own short list. Other organization roles, moderators, billing managers and enterprise owners are not on that list, so collect them with the steps above. It only reads, so changing roles stays with your organization owners.
Have an access review coming up?
Acciew is in early access. We are looking for design partners: teams with a user access review ahead of them.
Apply as a design partnerQuestions and answers
What roles are there in a GitHub organization?
GitHub has roles at three levels. Organization roles include owner, member, moderator, billing manager, security manager, CI/CD admin, app manager and five all-repository roles from read to admin. Teams have member and maintainer. Each repository has its own roles, from Read to Admin. Outside collaborators are not members and only get repository roles.
What is the difference between an organization owner and a member on GitHub?
An owner has full administrative access to the organization and admin access to every repository it owns. A member is the default role with no administrative rights. By default a member can create repositories and teams and see all members and teams, and gets the base permission on the repositories.
How many owners should a GitHub organization have?
GitHub says the owner role should be limited, but to no fewer than two people. With one owner, the organization can become hard to manage if that person is unreachable. Keep a short list of named owners, each with a reason.
Can a GitHub user have more than one organization role?
Yes. GitHub says a user or team can hold several organization roles, assigned one at a time. A person can also get a role through a team, so check both the user and team tabs of the role assignments page before you decide what someone can do.
Are custom roles available on every GitHub plan?
No. GitHub says custom organization roles are only available to organizations on GitHub Enterprise Cloud, and custom repository roles need GitHub Enterprise Cloud too. The predefined organization roles are available in every organization.
This guide is part of User Access Review: How to Run One, Step by Step. Read the whole guide there.