MSBA-291 · Lesson 12 of 12 · 20 min
Case study: an enterprise governance model
▶ Video coming soon A video version of this lesson is on the way.
The last working session of the year was not a working session at all. Skerry's technology steering committee had asked the platform team to present a single document that described how the new GitHub enterprise would be governed: what was controlled, by whom, how exceptions were handled and how anyone would know it was working. Marisol asked Priya to sit in as the outsider and tell her afterwards which parts she would not have understood without the previous eleven sessions. This lesson presents the problem the committee set, the model the team proposed, and the questions the committee asked.
The brief
The committee's brief fitted on one page.
| The committee wanted | Constraint |
|---|---|
| One governance model for all GitHub use at Skerry | Covers the main enterprise, skerry-oss and the planned partner enterprise on GHE.com |
| Clear ownership of every control | No control without a named owning team |
| Developer speed preserved | No new approval step for everyday work |
| Evidence for the January 2027 audit | Controls must produce operating evidence automatically |
| Predictable cost | Licence and Actions spend reported monthly |
| A way to change the model | Changes reviewed like code |
Read the brief before reading the team's answer, and sketch your own outline: which layers would you govern, which tools from this course would you use for each, and how would you show each one works?
The model: principles
The team opened with four principles, written so that a developer could apply them without reading the rest of the document.
| Principle | What it means in practice |
|---|---|
| Restrict the few, open the many | Controls apply to actions that are hard to undo; everyday work needs no approval |
| Target by metadata, not by list | Rules, configurations and runner access follow custom properties, so new repositories are covered automatically |
| Machines act as machines | Automation uses GitHub Apps and workflow tokens, never people's credentials |
| Every control leaves a record | Each control is chosen partly for the evidence it produces |
The model: layers
The heart of the document was a table of layers. Each layer named the controls, where they were configured, who owned them and what evidence they produced.
| Layer | Controls | Configured in | Owner | Evidence |
|---|---|---|---|---|
| Identity and access | Managed users, SCIM groups, enterprise teams, roles (MSBA-290) | Entra ID and enterprise settings | Identity engineering | Provisioning logs, access reviews, suspension events |
| Repositories and metadata | Creation and visibility policies, base permissions, required custom properties, templates | Enterprise and organization settings | Platform team | Policy change events, property coverage report |
| Rulesets | Baseline enterprise ruleset; confidential, store and tag rulesets; push rulesets | Governance repository applied through the API | Platform team with security | Rule insights, bypass events |
| Apps and tokens | Approved app list, OAuth restrictions, classic tokens restricted, 90-day fine-grained limit | Organization and enterprise settings | Platform team | Installation and authorization events, token exception register |
| Actions and runners | Allowed actions, lockfiles in stores, read-only token default, fork rules, execution protections, runner groups | Enterprise and organization policies | Build infrastructure | Policy events, runner registration events, queue and cost metrics |
| Packages and supply chain | Workflow-only publishing, inherited access, attestations verified at deployment | Package settings and workflows | Build infrastructure with security | Attestation verification results |
| Security configurations | Enforced baseline and code security configurations, push protection, delegated bypass in stores | Enterprise and organization configurations | Security | Security overview coverage and alert metrics |
| Compliance evidence | Audit log streaming for 13 months, saved queries, quarterly report downloads | Enterprise settings and SIEM | Security with internal audit | Populations and samples on request |
Everything as code
A model that lives only in settings drifts. The team's answer to the committee's last requirement was the governance repository introduced in lesson 2. It held the ruleset definitions, the security configuration definitions, the allowed-actions patterns, the runner group definitions and the approved app list, each as a file. A change to any control was a pull request. Its own ruleset required approval from two of the platform, build infrastructure and security teams, and a workflow applied merged changes through the API using a GitHub App with the narrowest permissions that could do the job. The app's private key lived in the vault, and the app was the only actor allowed to change enterprise rulesets.
governance/
rulesets/
enterprise-baseline.json
skerry-confidential.json
stores-branches.json
stores-push.json
release-tags.json
security-configurations/
skerry-baseline.json
skerry-code-security.json
actions/
allowed-actions.txt
runner-groups.yml
apps/
approved-apps.yml
exceptions/
register.yml
.github/workflows/
apply.yml # applies merged changes through the API as the governance app
drift-check.yml # nightly: compares live settings with the files and opens an issue on driftThe drift check was what made the model believable. Every night a workflow read the live settings through the API and compared them with the files. If anything differed, because someone had changed a setting in the web interface during an incident, for example, it opened an issue assigned to the owning team. In the first month it found three drifts, all from emergency changes that had been made correctly but not written back to the files.
Exceptions
No model fits every case. The committee wanted to know how exceptions would work without becoming the norm. The team proposed a register.
| Field | Example |
|---|---|
| What is excepted | Classic token for the legacy build tool used by 7 repositories |
| Why | Vendor does not yet support fine-grained tokens or GitHub Apps |
| Compensating control | Token stored in the vault; usage alert on any repository outside the 7 |
| Owner | Build infrastructure |
| Approved by | Security lead and platform lead |
| Expiry | March 31, 2027 |
Every exception had an expiry date, and the drift check treated an expired exception like drift. The register itself was a file in the governance repository, so approving an exception was a reviewed pull request and the history of exceptions was evidence in its own right. Ottoline's audit team asked for the register as the first item of their January request.
Measuring whether it works
The team proposed a short monthly scorecard. Each measure had a target and an owner, and each could be produced automatically.
| Measure | Target | Source |
|---|---|---|
| Repositories with required custom properties set | 100 percent | Custom property report |
| Repositories covered by the baseline security configuration | 100 percent within one day of creation | Security overview |
| Ruleset bypasses with a linked incident or change | 100 percent | Bypass events joined to the incident system |
| Critical code scanning alerts older than 14 days | Zero | Security overview |
| Open token exceptions past expiry | Zero | Exception register |
| 95th-percentile runner queue time | Under 2 minutes | Actions metrics |
| Licences assigned to people inactive for 90 days | Under 3 percent | Licence and activity reports |
| Drift issues open longer than 7 days | Zero | Governance repository issues |
Worked problem
Working out a licence measure
In November, Skerry's main enterprise had 1,180 consumed licences, and 47 belonged to people with no activity in 90 days. Does it meet the target of under 3 percent?
Show solution
- Divide 47 by 1,180.
- That is about 0.040.
- So about 4 percent of licences are inactive, which is above the 3 percent target.
Answer: No; about 4 percent are inactive, so the identity team reviewed those 47 accounts with managers before the next billing date.
Roles and responsibilities
The committee asked who would do what. The team answered with a compact responsibility table, in which R means responsible for doing the work, A accountable for the outcome, C consulted and I informed.
| Activity | Platform | Build infrastructure | Security | Identity | Internal audit |
|---|---|---|---|---|---|
| Change rulesets | R/A | C | C | I | I |
| Change security configurations | C | I | R/A | I | I |
| Change Actions policies and runners | C | R/A | C | I | I |
| Approve apps and token exceptions | R | C | A | I | I |
| Provision and remove access | I | I | C | R/A | I |
| Produce audit evidence | R | C | A | C | C |
Risks the team named
A good governance document names its own weaknesses. The team listed four.
| Risk | Why it matters | Response |
|---|---|---|
| Platform features keep changing | Lockfiles, execution protections and enforcement options all arrived in the last few months | Quarterly review of GitHub's changelog against the model |
| The governance app is powerful | It can change enterprise rulesets | Narrow permissions, key in the vault, every change from a reviewed pull request |
| Developers route around controls | Friction leads to shadow tools | Scorecard includes queue times and exception counts; office hours each week |
| A second enterprise drifts | The partner enterprise on GHE.com is managed separately | The same governance repository applies to both, with environment-specific files |
The committee's questions
The committee asked three questions. The first was whether the model slowed developers down. Marisol's answer was the data group pilot: median time from pull request to merge had fallen from 19 hours to 11, mostly because reviews no longer waited for an administrator to override broken branch protection. The second was what happened if GitHub had an outage. Freya explained that the model governed GitHub but did not make Skerry depend on it any more than before, and that the incident runbook included the break-glass access from MSBA-290 and a plan for store deployments to continue from the last attested images. The third was whether the model would survive the platform team being busy. The answer was the drift check and the scorecard: both ran without anyone remembering to run them.
Worked problem
Testing the model against a scenario
A new team in the data group creates a repository for a customer-facing recommendation service and sets data-classification to confidential. List what the model does automatically, without anyone in the platform team acting.
Show solution
- The confidential-code ruleset applies to its default and release branches, requiring two approvals, code owner review, a passing build and code scanning results.
- The code security configuration applies, turning on code scanning default setup, dependency review, secret scanning and push protection.
- Runner groups allow the repository to use the standard and Azure private runners but not the store runners.
- Alerts route to the owning team from the owning-team property.
- Every action the team takes appears in the audit log stream.
Answer: Rulesets, security configurations, runner access and alert routing all follow the confidential classification automatically, and the audit log records the rest.
Debrief
Priya's feedback to Marisol afterwards was that the document was clear, but that she would not have understood why custom properties mattered so much without lesson 1, or why lockfiles mattered without lesson 5. The committee did not need those details; the developers did. The team added a one-page developer guide to the governance repository, written as answers to the questions developers actually asked: why can I not merge, how do I get an app installed, why did my token stop working and where do I ask for an exception.
That closes the GitHub administration story for this course. MSBA-299 reviews it against the GH-100 exam domains, from support and deployment through identity, access, policies, Actions and security, with practice questions written for the exam's style.
How the model changes
A governance model is never finished. The team agreed three triggers for revising it. First, GitHub releases: someone in the platform team read the changelog weekly, and any change that touched a layer, such as a new ruleset rule, a policy option or a change to defaults like the December 2026 pull_request_target block, was assessed within a month. Second, incidents: every incident review asked whether a control had failed, been bypassed or been missing. Third, the quarterly scorecard review: a measure that stayed red for two quarters meant the control or its target was wrong.
Changes to the model itself followed the same path as changes to any control: a pull request to the governance repository, with the reasoning in the description and approval from the owning teams. The document the committee read was generated from that repository's README, so it could not fall out of date with the controls it described.
| Trigger | Example | Expected response time |
|---|---|---|
| GitHub changelog entry affecting a layer | Lockfiles reach general availability | Assessed within a month |
| Incident involving a control | A bypass used without a linked incident | Reviewed in the incident follow-up |
| Scorecard measure red for two quarters | Inactive licences stay above target | Control or target revised at the next quarterly review |
| New enterprise or major acquisition | The partner enterprise on GHE.com | Model applied before the first developer joins |
Common mistakes
MistakeWriting governance as a document of settings to configure once.
InsteadKeep controls as code, apply them automatically and check for drift.
MistakeAllowing exceptions without expiry dates.
InsteadGive every exception an owner, a compensating control and an expiry.
MistakeMeasuring only security outcomes.
InsteadMeasure developer experience and cost too, or controls will be routed around.
MistakeGoverning a second enterprise separately.
InsteadApply the same model from the same repository to every enterprise.
Summary and key terms
- A governance model names its principles, layers, owners, evidence, exceptions, measures and risks.
- Targeting by custom property lets one model cover new repositories automatically.
- Keeping controls as code in a governance repository gives review, history and drift detection.
- An exception register with owners, compensating controls and expiry dates keeps exceptions rare.
- A monthly scorecard covers security, developer experience and cost.
- The audit log stream turns the model into evidence without extra work.
- Governance model
- A description of what is controlled, by whom, how exceptions work and how success is measured.
- Governance repository
- A repository holding control definitions as files, applied through the API.
- Drift check
- An automated comparison of live settings with their definitions in code.
- Exception register
- A record of approved deviations with owners, controls and expiry dates.
- Compensating control
- A safeguard that reduces risk when a standard control cannot apply.
- Scorecard
- A short set of measures with targets that show whether governance is working.
Practice problems
Work each problem on paper first, then reveal the answer to check.
What does the nightly drift check do?
Show answer
Compares live settings with the governance files and opens an issue when they differ.
Which three fields make an exception safe to grant?
Show answer
An owner, a compensating control and an expiry date.
Why include runner queue time in a governance scorecard?
Show answer
Slow or blocked developers route around controls, so experience is part of governance.
Lesson quiz · 5 questions
Score 60% or more to complete this lesson.
Create a free account to save your progress, take quizzes and earn a certificate.