MSBA-308 · Lesson 6 of 12 · 20 min
Domain review: enterprise management
▶ Video coming soon A video version of this lesson is on the way.
Enterprise management was the domain Lena had rated lowest, so Priya invited Yevgenia Kowalczyk-Arce from Skerry Outdoor Group to Thursday's session. Skerry runs GitHub Enterprise Cloud with several organizations, hundreds of repositories and its own runner fleet, everything Tidewater, a small organization on the Team plan, does not have. "Most exam questions in this domain describe a company like Skerry," Priya said. "You need to think at that scale even though you work at ours." The fourth domain, Manage GitHub Actions for the enterprise, carries 20 to 25 of the exam weight. It has three subgroups: distributing and governing actions and workflows, managing runners at scale, and managing secrets and variables. Managing and Securing GitHub Actions in the Enterprise taught it.
Layers of policy
Every governance question starts with where a setting lives. Actions settings exist at the enterprise, organization and repository levels, and a higher level can restrict what a lower level may choose.
The allowed-actions policy is the center of this subgroup. At each level you can allow all actions and reusable workflows; allow only those in the enterprise or organization; or allow those plus selected ones. Selected ones can include actions created by GitHub, actions from verified creators on the Marketplace, and a list of patterns such as owner/repo@ref or owner/*. Since August 2025 the patterns can also block, by putting an exclamation mark in front, and the policy can require that every action be pinned to a full-length commit SHA. Local actions in the same repository are exempt from pinning. Tidewater ended its hardening sessions with an allow list of 14 third-party actions, all pinned. Skerry's list had about a hundred patterns.
| Setting | Purpose | Typical secure choice |
|---|---|---|
| Allowed actions and reusable workflows | Which external code can run | Enterprise and organization, plus selected patterns |
| Require full-length SHA pinning | Stop tags and branches from changing code underneath you | On, after existing workflows are pinned |
| Default workflow permissions | What GITHUB_TOKEN can do by default | Read repository contents and packages only |
| Allow Actions to create and approve pull requests | Whether automation can approve its own changes | Off |
| Approval for fork pull request workflows | Whether outside contributors' workflows run without review | Require approval for first-time or all outside contributors |
| Artifact and log retention | How long data is kept | As short as audit needs allow |
Distributing shared components
The outline asks you to define and manage reusable components and templates and to control access to them. The building blocks are the ones lesson 4 compared. Workflow templates go in the organization's .github repository. Reusable workflows and actions can live in any repository, and their visibility decides who can call them. A public repository is open to everyone. A private repository must grant access in its own Actions settings, either to repositories in the same organization or, for internal repositories, to the whole enterprise. A question describing a central platform team that wants every organization in an enterprise to use its deployment workflow, without making it public, points at an internal repository with access granted to the enterprise.
Versioning matters here too. Callers should reference shared reusable workflows by a tag or a SHA, not by a branch, so a change to the platform team's main branch does not reach every pipeline at once. Tidewater's node-ci reusable workflow is tagged v2 for that reason.
Worked problem
Sharing without publishing
Skerry's platform team keeps a reusable deployment workflow in a private repository in its platform organization. Teams in two other organizations in the same enterprise cannot call it. What should change?
Show solution
- A private repository's workflows can only be shared within its own organization.
- To reach other organizations in the enterprise, the repository needs internal visibility.
- In the repository's Actions settings, allow access from repositories in the enterprise.
- Make sure the enterprise and organization allowed-actions policies permit workflows from inside the enterprise.
Answer: Make the repository internal, grant enterprise access in its Actions settings, and confirm the allowed-actions policies permit it.
Runners at scale
The second subgroup covers hosted and self-hosted runners, networking, runner groups and the software on runners.
| Runner | Strengths | Responsibilities |
|---|---|---|
| Standard GitHub-hosted | Clean virtual machine for every job, maintained images, no setup | Choose labels; plan for image changes |
| Larger GitHub-hosted | More CPU and memory, GPU options, static IP ranges and private networking options | Paid per minute; assign through runner groups |
| Self-hosted | Your hardware, network access and software | Patching, security, isolation, scaling and cleanup |
| Self-hosted, ephemeral | A fresh runner for each job, often autoscaled | Building the image and the scaling system |
Runner groups control which organizations and repositories can use which runners. A runner in the default group is available to every repository the group allows, which is rarely what you want for a sensitive machine. Tidewater moved Owen's print-room machine, with the licensed typesetting software, from the default group into its own group limited to the guidebook repository, with public repositories not allowed. Groups can also be limited to selected workflows, so only a reviewed deployment workflow can use a deployment runner. At the enterprise level, runner groups are shared to organizations; organizations then share them to repositories.
Self-hosted runner security is a favorite exam topic. Self-hosted runners should not be used with public repositories, because anyone who can open a pull request might run code on the machine. Ephemeral runners, which take one job and are then removed, limit what one job can leave behind for the next. Running the runner service as an unprivileged account and on an isolated network reduces what a compromised job can reach. GitHub's Actions Runner Controller is the documented way to autoscale ephemeral runners on Kubernetes.
Labels and routing. A job's runs-on can name a label, a list of labels that a runner must all have, or a group. Self-hosted runners get default labels for self-hosted, the operating system and the architecture, plus any custom labels you add. A job that stays queued forever usually names a label combination no online runner has.
IP allow lists and networking. If an organization or enterprise uses an IP allow list, workflows must reach GitHub from an allowed address. Self-hosted runners' outbound addresses must be on the list. Standard hosted runners use large shared address ranges that change, so they are hard to allow-list; larger runners can be given static IP ranges, or connected to a private network in Azure, which is how enterprises combine hosted runners with strict network controls. The list of required outbound endpoints for self-hosted runners is published in the documentation.
Software on runners. The outline asks you to identify preinstalled software from image release notes and the toolcache, and to install more at runtime. Each runner image's software list is published with its release. The toolcache holds several versions of runtimes such as Node, Python and Java, and the setup actions, such as setup-node, select from it or download what is missing. Anything else can be installed with the operating system's package manager in a step, ideally with caching, or baked into a custom image for self-hosted runners or a container for the job.
Worked problem
A job that never starts
A job with runs-on: [self-hosted, linux, gpu] sits in the queue for an hour. Skerry has GPU runners online in a group shared with the repository's organization. What should Yevgenia check?
Show solution
- Every label in the list must match a single runner, so check that the GPU runners carry a custom gpu label and run Linux.
- Check that the runner group is shared not only to the organization but to this repository.
- Check whether the group is limited to selected workflows that do not include this one.
- Check that the runners are online and idle rather than busy with other jobs.
Answer: Labels, group access for the repository, selected-workflow limits and runner availability, in that order.
Secrets and variables
The third subgroup asks you to define and scope secrets and variables at the organization, repository and environment levels, use them in workflows and actions, and manage them through the REST API.
Secrets are encrypted and masked in logs; variables are plain configuration values, read through the vars context. Both exist at the same three levels. Organization secrets and variables can be available to all repositories, private and internal repositories, or selected repositories. When a name exists at more than one level, the most specific wins: environment over repository over organization. Environment secrets are released to a job only when it references the environment and its protection rules pass, which is why production credentials belong there.
Managing secrets through the REST API has one step people forget: values must be encrypted with the repository's, organization's or environment's public key before upload, using a sealed box, so you first fetch the public key and its ID. The GitHub CLI's gh secret set does the encryption for you, which is why most teams use it. Variables do not need encryption and are created through their own endpoints.
Rulesets and required checks
Organizations often want every repository to pass a particular check before merging, such as a security scan. The current way to do this is a ruleset at organization level that requires status checks or requires a workflow to pass on targeted repositories and branches. Rulesets can be set to evaluate mode first, which records what would have been blocked without blocking it, a useful step before enforcement. The exam may contrast this with a workflow template, which only suggests a workflow and enforces nothing, and with branch protection rules, which are set one repository at a time.
Self-hosted runner hygiene
Enterprise questions about self-hosted runners usually come back to three habits. First, keep runners in groups limited to the repositories and workflows that need them, and do not allow public repositories to use them. Second, prefer ephemeral runners, which take one job and are then removed, so nothing a job leaves behind can affect the next one; autoscaling tools such as Actions Runner Controller work this way. Third, keep the runner software and the machine image up to date, because the runner application must be recent to keep receiving jobs. Labels then route jobs: every self-hosted runner has the self-hosted label plus labels for its operating system and architecture, and custom labels describe special software or hardware.
Questions that mix the layers
Many enterprise questions combine two or three of these topics in one scenario. A typical one describes a new team that needs a self-hosted runner with special hardware, access to one deployment secret and permission to use a Marketplace action the enterprise has not yet allowed. The answer then has three parts: a runner group limited to the team's repositories, a secret scoped to those repositories or to an environment in them, and a request to the enterprise owners to add the action to the allowed list, since the organization cannot loosen the enterprise policy itself. Reading such a scenario as three small questions, one per layer, made them much easier for Lena.
Common mistakes
MistakeTrying to loosen at the repository level a policy the organization restricts.
InsteadLower levels can only tighten; change the setting at the level that set it.
MistakeLeaving a sensitive self-hosted runner in the default group.
InsteadPut it in its own group limited to specific repositories, and to selected workflows if possible.
MistakeUsing self-hosted runners with a public repository.
InsteadUse hosted runners for public repositories, or isolate ephemeral runners carefully.
MistakeUploading a secret value to the REST API unencrypted.
InsteadEncrypt it with the target's public key first, or use gh secret set.
MistakeAssuming an organization secret overrides a repository secret with the same name.
InsteadThe more specific value wins: environment, then repository, then organization.
Yevgenia left with a promise to show Lena Skerry's runner dashboard the following week, and Lena left with her lowest-rated rows marked as twos at last. Her practice task for the domain was to create a runner group in a test organization, limit it to one repository and one workflow, register a self-hosted runner with a custom label and watch a job route to it.
Summary and key terms
- Enterprise management is 20 to 25 of the exam: governing actions and workflows, runners, and secrets and variables.
- Policies flow down from enterprise to organization to repository and can only be tightened lower down.
- Allowed-actions patterns can include and block, and a policy can require full-length SHA pinning.
- Share private components within an organization, internal ones across an enterprise.
- Runner groups control which repositories and workflows can use which runners; keep self-hosted runners away from public repositories.
- Larger runners can have static IPs or private networking; self-hosted runner addresses must be on any IP allow list.
- Secrets and variables exist at organization, repository and environment levels; the most specific wins.
- Allowed-actions policy
- The setting that decides which actions and reusable workflows may run.
- Runner group
- A set of runners shared with chosen organizations, repositories and workflows.
- Ephemeral runner
- A self-hosted runner that runs one job and is then removed.
- Larger runner
- A GitHub-hosted runner with more resources and optional static IPs or private networking.
- Toolcache
- The cached runtime versions on a runner that setup actions select from.
- Environment secret
- A secret released only to jobs that reference the environment, after its protections pass.
Practice problems
Work each problem on paper first, then reveal the answer to check.
How do you share a reusable workflow with every organization in an enterprise without making it public?
Show answer
Put it in an internal repository and allow access from the enterprise in its Actions settings.
Why should self-hosted runners not serve public repositories?
Show answer
Anyone who can open a pull request could run code on the machine.
Which value wins when a secret name exists at the organization and environment levels?
Show answer
The environment value.
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.