Updated November 10, 2026
Permissions redesign during a GitHub migration: the model to design before the wave
A GitHub migration is the one moment the permission model gets rebuilt end to end. What the target model looks like, what teams over-permission by default, and the decisions to make before wave one ships.
Update, November 2026. Role and permission facts were re-checked against GitHub Docs and corrected: custom repository roles are a GitHub Enterprise Cloud feature built from an inherited role plus listed permissions, team synchronization supports Entra ID and Okta only (Enterprise Managed Users link teams to IdP groups through SCIM), rulesets have no rule that requires signed tags, and enterprise teams are now part of the model. Percentages presented as field observations were removed.
Every source platform's permission model is slightly wrong by the time you migrate off it. Bitbucket Server accumulates project-level defaults nobody has revisited since the initial rollout. Azure DevOps Repos permissions inherit from Azure DevOps project ACLs that were shaped by an org chart that no longer exists. GitLab groups end up with a mix of direct memberships and inherited memberships that produces surprising effective permissions. The common thread is that permission drift is silent: nothing breaks when someone accumulates too much access, and the audit that would catch it never quite happens on a busy quarter.
A migration to GitHub is the one moment the model gets rebuilt end to end, and it is worth treating as a first-class design activity rather than a mechanical translation. The translation itself is not portable: GitHub's primitives (organization roles, teams, repository roles, branch and tag rulesets, environment protection, CODEOWNERS) do not map one to one onto any source platform's model. Attempting a literal mapping bakes the source platform's drift into the target and multiplies the audit surface. This post is the target model we recommend designing toward on GitHub migrations, what teams over-permission by default, and the decisions to make before wave one ships.
TL;DR
- Redesign, do not mirror. The migration is the audit. Stale source-platform permissions (leavers, defunct projects, over-broad admin) should not be recreated.
- IDP team sync is mandatory over about 100 people. Manual team management is a two-way audit failure; automate before wave one, not after.
- Owner count is the loudest signal in the audit. Two to four permanent enterprise owners plus a break-glass account is the model we recommend.
- Repository roles do the day-to-day work. Custom repository roles (GitHub Enterprise Cloud only, up to 20 per organization) handle the cases the five default roles do not fit; keep the total number of custom roles small and documented.
- Branch rulesets are the merge-time gate. CODEOWNERS routes review; rulesets enforce it. Design both together and test the combination on a canary repo before wave one.
- Environment protection for deployments is where secrets live. Required reviewers on
prodis the single most impactful control you can add during the migration. - Break-glass access is a first-class object with its own audit trail, not an owner account somebody remembered the password to.
The target model, at a glance
Before decomposing each layer, the model as a whole matters. On GitHub, permissions stack in a specific way that any redesign has to internalise:
- Enterprise → Organization → Team → Repository. Enterprise policies (SSO, IP allow lists, enterprise-wide rulesets, member privileges) constrain organizations. Organizations own repositories and teams. Teams grant repository access at a role level. Individuals can also be granted direct repository access, and this is usually a mistake worth catching in review.
- Effective permission is the sum of everything applied. GitHub's documentation is explicit that roles and permissions are additive: a person who gets access through several avenues has the sum of all access grants. If someone is on the
platform-adminsteam with Admin on a repo, and also directly granted Write, they effectively have Admin. A lower direct grant never reduces a higher one; the mental model is "highest of all paths." - Rulesets sit at repository, organization, or enterprise level and apply to matching refs. They are the merge-time enforcement layer and can be composed (multiple rulesets can apply to the same branch, layered together).
- CODEOWNERS is a file in the repository. It has no effect until a ruleset or branch protection requires code owner review. Treat it as data, not policy.
The redesign lands in that stack, not on top of it. Every question worth asking during a migration comes down to which layer a control belongs in, and the answer is rarely the same one the source platform used.
Organization design: one org, many, or an enterprise?
The first decision is at the top. Bitbucket "projects" translate to something between a GitHub team and a GitHub organization; Azure DevOps "projects" translate to something between an organization and a repository. What you actually want on GitHub depends on scale and separation requirements.
The shape we recommend as a starting point (planning guidance that depends on the estate, not a measured benchmark):
| Estate size | Repos | Recommended shape | Owner headcount |
|---|---|---|---|
| Small | Under 100 | One organization, teams for divisions | 2 to 3 |
| Mid | 100 to 1,000 | One enterprise, 2 to 5 organizations by business line | 2 to 4 per org, capped by enterprise policy |
| Large | 1,000 to 10,000 | One enterprise, 5 to 15 organizations, some EMU | 2 to 4 per org, enterprise-wide policy for consistency |
| Very large | Over 10,000 | Multiple enterprises only where regulation demands it; otherwise one enterprise, many orgs | Governed centrally |
Ranges are our recommendation for GitHub Enterprise Cloud targets, to be validated against your own compliance boundaries. Regulated industries (finance, healthcare, defence) sometimes push toward more organizations or separate enterprises for compliance segregation; commercial estates tend to consolidate.
The pattern that fails is "one organization per acquired company" carried forward from the acquisition history. Every new organization is a fresh permission surface, and the operational overhead scales linearly with organization count. Consolidate where the compliance boundary allows it.
Teams: IDP-synced, hierarchical, and narrow
GitHub teams are the primary permission container. The design decisions that matter most:
- Sync from the identity provider, not from GitHub. With personal accounts on GitHub Enterprise Cloud, team synchronization ties organization teams to IDP groups; the supported identity providers are Entra ID (commercial tenants) and Okta. It manages team membership only: it does not add people to an organization they are not already a member of. With Enterprise Managed Users you do not use team synchronization; teams are linked to IdP groups through SCIM, and that link can also add and remove organization members. Either way membership flows from the IDP: joiners appear when their IDP group membership propagates, leavers disappear when they are offboarded from the IDP. This closes the leaver-still-has-access loop that source platforms tend to leave open.
- Enterprise teams are a separate layer. GitHub now has enterprise teams, managed at the enterprise level and assignable to many organizations. They can hold enterprise roles, receive Copilot Business licenses, and be given bypass access on rulesets, but they currently cannot be code owners, cannot be nested, have no team maintainers, and do not support team synchronization with personal accounts. Use them for cross-organization access and licensing; keep CODEOWNERS and review routing on organization teams.
- Hierarchies exist; use them sparingly. GitHub supports parent-child teams within an organization. Child teams inherit repository access from the parent, which is useful for representing a division that contains sub-teams. Deep hierarchies (three or more levels) become hard to reason about and produce surprising effective permissions; two levels is our default.
The narrow question to work through per team: is this team a group of people (a division, a squad, a role) or a scope of access (a set of repositories with shared review requirements)? The two often want different shapes. A "backend engineers" team is a group of people; a "prod-deploy approvers" team is a scope of access. When one team is both, the design has usually collapsed two concepts that should be separate, and the migration is the moment to separate them.
Repository roles: default versus custom
Every repository grants access at one of five default role levels: Read, Triage, Write, Maintain, Admin. Most repositories need three: Read for consumers, Write for contributors, Admin for maintainers.
Custom repository roles are available only to organizations on GitHub Enterprise Cloud, up to 20 per organization. A custom role is not a free-form permission set: it starts from an inherited role (Read, Triage, Write, or Maintain) and adds individual permissions from a fixed list. The cases where they matter:
- A "release manager" role: Write, plus the permission to create protected tags, without access to repository settings.
- A "security engineer" role: Maintain, plus the permission to delete code scanning results (GitHub's own example).
- An "integration engineer" role: Write, plus the permission to manage webhooks, instead of handing out Admin for one settings page.
Two needs that look like custom repository roles are not. Read access to every repository for an auditor is an organization role: the predefined "All-repository read" role, or the security manager role, which adds security alerts and settings. And "may merge only Dependabot updates" cannot be expressed as a role at all; that is a ruleset and workflow question.
Custom roles are useful but easy to overuse. The pattern to watch for: a migration that produces 15 custom roles because someone tried to model every source-platform-specific role verbatim. Fewer is better; a role that fits three repositories is worth defining, a role that fits one is a sign the default hierarchy plus CODEOWNERS would carry the intent more cleanly.
Branch and tag rulesets: the enforcement layer
Repository rulesets are the modern replacement for branch protection rules, and the enforcement layer for the target model. Repository-level rulesets are available on GitHub Team and GitHub Enterprise plans; organization-level and enterprise-level rulesets need GitHub Enterprise. They match refs by pattern, and enforce a checklist of requirements: required reviewers, required status checks, required code owner review, linear history, signed commits, deployment gates.
The design we recommend as a default, at the organization level:
mainandmasteron every repo require: at least one pull request review, a passing status check on the required CI job, and Code Owner review where a CODEOWNERS file exists.- Release tag patterns (
v*.*.*) on every repo: creation, update, and deletion are restricted, with only the release-manager team and the automation identity on the bypass list. Note that the available rules include required signed commits but no rule that requires a tag itself to be signed; if you need signed tags, verify them in the release workflow. - Deletion of
main,master, or anyrelease/*branch is blocked organization-wide. Restoring a deleted mainline in a migration wave is a bad afternoon.
Repository-level rulesets can add to the organization defaults, never subtract: rulesets have no priority, the rules of every matching ruleset are aggregated, and where the same rule is defined twice the most restrictive version applies. Team-owned repositories that need stricter rules (a compliance-flagged repo requiring two reviews, or signed commits everywhere) get a repository-level ruleset layered on top.
The migration-specific trap: source platforms enforced some of these controls (Bitbucket branch permissions, Azure DevOps branch policies) with different semantics. The literal translation does not preserve behaviour, so pilot the ruleset design on a canary repo, run a week of realistic pushes and pull requests through it, and only then bulk-apply to the migrated wave.
CODEOWNERS: routing, not enforcement
The CODEOWNERS file tells GitHub who to auto-request as a reviewer when a pull request touches specific paths. It is a text file in the repository, versioned like any other. It has no direct enforcement effect: a pull request can be merged without the code owner reviewing unless a ruleset or branch protection specifically requires code owner approval.
Two design rules we recommend:
- Every mainline path has an owner. A
*catch-all at the top of the file maps to a default team (typically the repo's maintainer team). Paths without an owner default to a maintainer review, not to nobody. - Owners are teams, not individuals. An individual owner is a single point of failure; a team of three or four with proper coverage is the resilient shape. Team-level ownership also plays well with the IDP-sync model above: as the team roster changes in the IDP, the CODEOWNERS routing follows automatically.
CODEOWNERS is also the moment to translate the Bitbucket default-reviewers concept or the Azure DevOps required-reviewer policies. The translation is not one to one, and the migration is the design opportunity.
Environments and deployment protection
For any repository that deploys somewhere, environments are the correct home for deployment secrets and the correct place to enforce human approval before a deploy. An environment is a named object attached to a repository (typical names: dev, staging, prod) with its own secrets, variables, and protection rules.
The controls that matter on prod and any environment that touches customer data:
- Required reviewers. A named person or team (up to six reviewers can be listed, and one approval is enough) must approve before a deployment job targeting the environment runs. This is the single highest-leverage control in the whole migration; it turns a compromised token or a runaway automation into a stopped job rather than a fired-off deploy.
- Wait timer. A configurable delay after the deployment job is triggered (1 minute to 30 days) that lets a change be cancelled if something looks wrong at the last minute.
- Deployment branches. Restrict which branches can deploy to the environment.
proddeploys only frommainor arelease/*branch is the pattern that saves the most incidents.
The migration is the moment to actually configure required reviewers on prod, not to defer it. A deferred required-reviewer configuration easily becomes a "we'll do it after cutover" that never happens.
Break-glass access as a first-class object
Enterprise migrations always need a "how do we get in when everything is broken" answer, and the shape of the answer matters. Two anti-patterns to design out:
- The shared owner account. One
admin@company.comlogin whose password is in a password manager three people know. It works, it is auditable to a single username, and when someone leaves the team that username's ownership does not change. - The permanent super-user. A specific engineer designated as "the one who can fix anything." That engineer has enterprise owner rights permanently, and the audit trail attributes their emergency actions to their regular identity.
The pattern that works: a documented break-glass procedure that names a specific account (owned by the organisation, not a person), stored credentials in a secret manager with strict access logging, and a runbook that says exactly when the account is used and how the use is reviewed. Every time the break-glass account acts, the incident report includes a section documenting the use, and the credential is rotated after.
This tends to be the last item designed and one of the first an auditor will ask about after a migration; treat it accordingly.
The pre-wave permissions dry run
Before wave one ships, run a permissions dry run on a canary repository (typically the "hello-world" or "docs" repo that everyone can afford to have broken for a day). The dry run exercises the full model:
- A member of each team pushes, opens a pull request, requests a review, and merges.
- A member of the release-manager team cuts a release tag, and someone outside that team confirms they cannot.
- A member of the deploy-approver team approves a
proddeployment. - The break-glass account is used to restore a "deleted" file, and the audit trail is reviewed.
- A leaver is offboarded from the IDP, and their team memberships are checked as empty within the SLA the sync targets.
Anything that surprises you in the dry run gets fixed before wave one, not after. The first-week-after-migration failure list has a permissions section for a reason, and the dry run is what shortens it.
How Shyftport handles this
Permissions redesign is a workstream we run in parallel with the repository migration itself, and it is one of the workstreams we insist on doing before wave one rather than after. Our permissions playbook covers the enterprise and organization shape, the team-to-IDP mapping (with the leaver audit built in), the default ruleset that lands on every migrated repo, the CODEOWNERS bulk generation from source-platform default-reviewer data, and the environment-protection configuration for deploys. To be exact about where software ends and delivery begins: the platform does not migrate permissions on any path, and the one piece of this it automates today is translating Bitbucket Cloud branch restrictions into GitHub rulesets, created in evaluate mode so you review them before enforcing (how that translation works); everything else in the playbook is engineering we do with you. We produce a written target-model document per client before migration begins, we pilot it on a canary repo, and we treat the pre-wave dry run as a gate on cutover. If your GitHub migration is imminent and the permission model has not been redesigned, talk to a Shyftport engineer and we will pressure-test the target model against your actual estate.
Sources
- Roles in an organization (GitHub)(accessed 2026-11-10)
- About teams (GitHub)(accessed 2026-11-10)
- Managing team synchronization with your identity provider(accessed 2026-11-10)
- About repository rulesets(accessed 2026-11-10)
- About code owners(accessed 2026-09-24)
- Using environments for deployment(accessed 2026-11-10)
- Managing GitHub Enterprise's Enterprise Managed Users(accessed 2026-11-10)
- About custom repository roles (GitHub)(accessed 2026-11-10)
- Teams in an enterprise (GitHub)(accessed 2026-11-10)
- Available rules for rulesets (GitHub)(accessed 2026-11-10)
FAQ
- Should we mirror the source platform's permissions on GitHub or redesign them?
- Redesign them. Source permissions drift silently: former team members, defunct projects, and over-broad admin grants that nobody has audited in years. Mirroring bakes that debt into the new platform. GitHub's permission primitives (organization roles, teams, repository roles, branch rulesets, environment protection, CODEOWNERS) are different enough from Bitbucket or Azure DevOps or GitLab that a one-to-one translation is not what you want anyway. The migration is the audit; treat it that way.
- Do we need IDP team sync from day one on GitHub?
- For any organisation over about 100 people, yes. Managing team membership manually is a two-way audit failure: leavers stay in teams, and joiners get access late. On GitHub Enterprise Cloud with personal accounts, team synchronization ties organization teams to IDP groups (Entra ID commercial tenants or Okta); with Enterprise Managed Users, teams are linked to IdP groups through SCIM instead. Either way membership updates flow through the identity provider. Set this up before the first wave lands; retrofitting it after teams have accumulated manual members is significantly more work.
- How does CODEOWNERS relate to branch protection in the target model?
- CODEOWNERS is the routing layer; branch protection is the enforcement layer. CODEOWNERS says who reviews changes to which paths, but only branch protection (or a ruleset) makes that review required to merge. Both are needed. The common mistake in a migration is to write a rich CODEOWNERS file and forget to enable the 'Require review from Code Owners' rule; the file then becomes a suggestion, not a gate.
- What is the right blast radius for organization owners on GitHub?
- Small and explicit. Organization owners can do anything, including delete repositories, remove other owners, and change SSO settings. Our default: two to four permanent owners for the whole enterprise (not per organization), plus a documented break-glass account. All routine administration goes through organization roles, team maintainer roles, and repository-level Admin, never through owner status. Too many owners is an easy over-permissioning to fall into, and it is preventable at design time.
Related reading
GitLab to GitHub with GitHub Enterprise Importer: what it migrates and what it leaves
GitHub Enterprise Importer has migrated GitLab repositories to GitHub Enterprise Cloud since August 2026. It carries Git history, issues and merge requests as pull requests, but not CI/CD, LFS objects, permissions, variables, webhooks or registries.
GitHub Universe 2026 recap, part 3: what it changes for teams planning a migration to GitHub
Universe 2026 shipped no migration tooling: GitHub Enterprise Importer, mannequins and the supported sources are unchanged. What moved is the business case, through the Copilot access licence model.
Secrets migration: Bitbucket variables to GitHub OIDC, and the credentials you stop storing
Bitbucket workspace variables are a translation task. GitHub OIDC federation turns the migration into a chance to delete whole classes of long-lived credentials. Here is the model we recommend for cutovers where OIDC is on the table.