GH-200 domain - 24% of the exam

Manage GitHub Actions for the enterprise

Manage GitHub Actions for the enterprise is 24% of the GH-200 exam. These are the objectives it covers, each with practice questions, with every answer explained.

The domain in numbers

62
Practice questions
7
Objectives
46
Medium
16
Hard

Where people go wrong

  • Treating runner labels as access control

    The wrong answers reach for a custom or secret label to keep repositories away from a set of self-hosted runners, or to stop public repositories using them. A label is only a routing hint, so any repository whose workflow names it can still target those runners. Access is set on the runner group: repository access limited to selected repositories, or an enterprise group limited to selected organisations, decides who may send jobs.

    See it in a sample question
  • Expecting persistent runners to start each job clean

    The wrong answers try to clean up a long-lived machine: cleanup steps, more runners, serialised jobs, or persistent runners reused to save provisioning time. Each still leaves a host that can carry tooling and credentials from an earlier job into the next. Ephemeral runners accept exactly one job and then deregister, and an autoscaler provisions a fresh instance for the next job, which is what guarantees clean machine state.

    See it in a sample question
  • Gating a secret without an environment

    The wrong answers keep the credential as a repository secret or an organisation secret scoped to the repository, and expect an approval rule to cover it. Neither is bound to an environment, so any permitted job can read it, and an organisation secret does not inherit the rules of the environment a job names. An environment secret is released only to a job that declares the environment, after its required reviewers approve, and a deployment branch policy can refuse runs from any branch other than main.

    See it in a sample question
  • Handling variables as if they were secrets

    The wrong answers apply secret behaviour to configuration variables: fetching a sealed value, encrypting the request body with a public key and key_id, or expecting masked log output. Variables are stored unencrypted. The vars context and the variables REST endpoints return and accept the name and value as plain text, and run logs show them unmasked, so they suit non-sensitive values only, while credentials belong in secrets.

    See it in a sample question

Objectives in this domain

What to study

The official documents this domain's practice questions cite most.

Sample questions from this domain

Free sampleManage GitHub Actions for the enterprisehard

An enterprise has a runner group at the enterprise level containing hardened deployment runners. Only repositories in the payments organisation should be able to send jobs to this group, while every other organisation must be blocked. With the least administrative effort, how should the runner group be scoped?

  • AConfigure the enterprise runner group to be available to selected organisations, choosing only the payments organisation, so other organisations cannot route jobs to its runners. Correct
  • BApply a unique custom label to each deployment runner and ask the payments teams to set runs-on to that label, because matching on a label restricts which repositories can dispatch jobs to those runners.
  • CLeave the runner group open to all organisations and instead add a repository allowlist of payments repositories inside each runner's config.sh registration command at the machine level.
  • DRecreate the runners as organisation runners inside the payments organisation and delete the enterprise group, because runners can only ever be scoped to a single organisation through group membership.
Scope an enterprise runner group to selected organisations so only the chosen organisation's repositories can use its runners. Runner groups are the access-control boundary for self-hosted runners. An enterprise-level group can be made available to all organisations or only to selected ones, and limiting it to the payments organisation blocks every other organisation in one step. Labels merely route jobs and enforce nothing, registration commands set where a runner attaches rather than a per-repository allowlist, and recreating the fleet as organisation runners is far more effort than adjusting the existing group's organisation access.

Why A is correct: An enterprise runner group can be limited to selected organisations, and choosing only the payments organisation means every other organisation is denied access to those runners with a single setting change.

Why B is wrong: Tempting because labels do route jobs to specific runners, but a label is only a routing hint and enforces no access control. Any repository that learns the label could target the runners, so labels do not restrict access.

Why C is wrong: Tempting because registration scopes a runner to a target, but config.sh sets where a runner registers, not a per-repository allowlist. Cross-organisation access is governed by the runner group's organisation settings, not the registration command.

Why D is wrong: Tempting because organisation runners are naturally limited to one organisation, but rebuilding the fleet is heavy work. An enterprise group already supports limiting access to selected organisations without recreating any runner.

Free sampleManage GitHub Actions for the enterprisehard

A platform team runs self-hosted runners that build pull requests. Jobs sometimes leave behind tooling and credentials that a later job on the same machine can read, and the team wants each job to start from a clean machine state with no residue from previous runs. Which approach to the self-hosted fleet best achieves this?

  • AKeep the long-lived runners but add a cleanup step at the end of every workflow that deletes the working directory, because removing the checkout is sufficient to clear all state left on the host.
  • BIncrease the number of persistent runners in the group so each job is more likely to land on a different machine, because spreading jobs across more hosts lowers the chance of reading earlier residue.
  • CConfigure the runners as ephemeral so each runner accepts exactly one job and is then deregistered, pairing this with autoscaling that provisions a fresh machine image per job. Correct
  • DPin every job to a single dedicated runner using a unique label so only one job runs at a time, because serialising work on one host prevents jobs from observing each other's leftovers.
Use ephemeral self-hosted runners with autoscaling so each job runs on a fresh machine and inherits no residual state. An ephemeral self-hosted runner executes only one job before it deregisters, so combining ephemeral runners with autoscaling that builds a fresh image per job means no tooling, credentials, or filesystem changes survive between jobs. End-of-workflow cleanup misses state outside the workspace and may be skipped on failure, adding persistent runners only changes the odds of reuse, and pinning to one labelled host still accumulates residue on that machine.

Why A is wrong: Tempting because cleanup steps reduce obvious residue, but they run only on success paths and cannot remove everything outside the workspace such as caches, installed tooling, or environment changes, so state can still persist.

Why B is wrong: Tempting because more runners spreads load, but persistent machines still accumulate state and a job can land on a previously used host. Probability does not provide the clean-state guarantee the requirement demands.

Why C is correct: Ephemeral runners take a single job and are then removed, so autoscaling fresh images per job guarantees each job starts from clean machine state with no residue carried over from a previous run.

Why D is wrong: Tempting because serialising avoids concurrent interference, but consecutive jobs on the same persistent host still inherit prior state. A single shared machine accumulates residue rather than starting each job clean.

Free sampleManage GitHub Actions for the enterprisemedium

A deploy job must use a production database password that a designated reviewer has to approve before the job can read it, and the same password must be unavailable to any other job in the workflow. At which scope should the password be stored so the approval gate applies before the secret is accessible?

jobs:
  deploy:
    runs-on: ubuntu-latest
    environment: production
    steps:
      - run: ./migrate.sh
        env:
          DB_PASSWORD: ${{ secrets.DB_PASSWORD }}
  • AAs an environment secret in a production environment that has a required reviewer, because the secret is only released to a job targeting that environment after the reviewer approves the run. Correct
  • BAs a repository secret, then add a job-level if condition that checks for an approval label on the run, so the deploy job only proceeds once a reviewer has applied the label.
  • CAs an organisation secret scoped to selected repositories, relying on the organisation's branch protection rules to require a reviewer before the deploy job can read the secret value.
  • DAs a repository secret combined with a concurrency group on the deploy job, because concurrency control holds the job in a pending state until an administrator manually releases it to read the secret.
Store a secret as an environment secret with a required reviewer so an approval gate controls access and limits it to that environment's jobs. Environment secrets are scoped to jobs that declare that environment with the environment key, so they are not visible to other jobs. Adding a required reviewers protection rule to the environment pauses any job targeting it until a designated reviewer approves, and the secret is only released after approval. Repository and organisation secrets carry no such gate and are readable by any permitted job, so they cannot enforce the approval requirement.

Why A is correct: Environment secrets are exposed only to jobs that reference the environment, and a required reviewer protection rule pauses such a job until approval, so the password stays unavailable elsewhere and unreadable until the reviewer signs off.

Why B is wrong: Tempting because an if condition can gate a job, but a repository secret is readable by every job regardless of labels, and a label check is not an enforced approval gate the way an environment reviewer is.

Why C is wrong: Tempting because organisation scoping and reviews both involve governance, but branch protection gates merges rather than secret access, and an organisation secret is readable by any permitted job without an approval step.

Why D is wrong: Tempting because concurrency does queue jobs, but it only serialises runs in the same group and never waits for human approval, so it neither gates secret access nor restricts the secret to a single job.

Free sampleManage GitHub Actions for the enterprisemedium

An engineer is writing a script that creates a non-sensitive repository configuration variable named DEPLOY_REGION through the GitHub REST API. They are unsure whether the request body needs the same client-side encryption that a secret requires. How should the script supply the variable's value on the create-a-repository-variable request?

  • ASend the variable as plaintext in an encrypted_value field together with the repository key_id, because the variables endpoint reuses the secrets schema and validates the supplied key identifier.
  • BSend the name and value fields as plain text in the request body, because configuration variables are non-sensitive and the variables endpoint accepts the value directly with no encryption. Correct
  • CFetch the repository public key, seal the value with a libsodium sealed box, and send the Base64 result, because every Actions configuration item is stored encrypted at rest.
  • DHash the value with SHA-256 and send the digest in the value field, because the variables endpoint stores the irreversible digest and resolves it for the vars context at run time.
Create a configuration variable over REST by sending a plaintext value field, since variables are unencrypted unlike secrets. Configuration variables hold non-sensitive data and are stored unencrypted, so the create-a-repository-variable endpoint takes a name and a plaintext value with no public key, key_id, sealed box or hashing. That contrasts with the secrets endpoints, which demand a libsodium sealed box. Reusing the secrets schema or hashing the value would be rejected or break later reads through the vars context.

Why A is wrong: This is tempting because it mirrors the secrets body shape, but the variables endpoint has no encrypted_value or key_id field. Variables are unencrypted, so reusing the secrets schema makes the request invalid.

Why B is correct: Configuration variables are unencrypted, so the create-a-repository-variable endpoint accepts a name and a plaintext value field directly. No public key fetch or sealed box is involved, unlike the secrets endpoints.

Why C is wrong: This is tempting because secrets require exactly that flow, but configuration variables are non-sensitive and stored unencrypted. Sealing a variable is unnecessary work, and the endpoint would reject the encrypted body.

Why D is wrong: This is tempting because hashing sounds protective, but a digest is irreversible and a workflow must read the real value through vars. The endpoint stores the plaintext value, not a hash.

Other domains in this exam

See also the GH-200 cert hub, the study guide, and the cheat sheet.

Examworthy is not affiliated with or endorsed by GitHub. Original, blueprint-aligned practice material only.