Exam Information
Free practice questions with explanations
Microsoft GH-200 Practice Questions
Answer a question to see the correct answer and the explanation, or click Show answer. Newest questions first.
- Questions
- 11
- Answered
- 0
- Correct
- 0
- Score
- -
-
1 Question 1 Single choice Author and maintain actions
A platform team maintains a private JavaScript action used by 40 repositories. Their workflow currently references the action as uses: acme/deploy-helper@main. After a recent commit to main introduced a breaking change, several pipelines failed without any workflow edits. The team wants consumers to receive only deliberate, reviewable updates, and they want to be able to roll back quickly if a release is faulty. The action repository already uses semantic version tags. Which change to the consuming workflows and the release process BEST meets these requirements?
Correct Answer: BExplanationPinning to an exact semantic version tag such as v2.4.1 stops unreviewed changes from reaching consumers, and publishing new patch tags gives a clear rollback target. A floating major tag can still be offered for those who opt in. Moving a v2 tag on every merge recreates the same silent-change problem as @main. Full SHA pinning is secure but makes the tag-based release strategy the team already uses harder to adopt and does not by itself give versioned release semantics. Gating main with tests does not stop consumers who reference @main from receiving whatever is on main.
-
2 Question 2 Single choice Author and manage workflows
A data engineering team runs a nightly integration workflow that needs a PostgreSQL database and a Redis instance. The job must not start its test steps until both services accept connections. The workflow runs on ubuntu-latest, and the tests connect to the database on the default port 5432. The team also wants the jobs to stay portable across runners, so they do not want to rely on a preinstalled local database on the runner image. Which configuration BEST meets these requirements?
Correct Answer: DExplanationService containers defined under services: run alongside the job, and their container options can include health checks so the runner waits until the service reports healthy before steps run. Mapping the port exposes it to the job host. Installing packages at runtime works but is slower and is not the portable service-container mechanism the scenario asks for. A fixed sleep is an unreliable guess about startup time. A matrix splits work across jobs but does not provide the database to the test job.
-
3 Question 3 Single choice Consume and troubleshoot workflows
A repository runs a build matrix over os: [ubuntu-22.04, windows-2022, macos-14] and node: [18, 20, 22] with fail-fast left at its default. Last night, run 4471 reported a red status on the check named build (windows-2022, 20). The engineer wants to confirm whether the failure is specific to that combination or a general regression, and then rerun only the failing variant without spending minutes on the other eight jobs. Which sequence BEST accomplishes this?
Correct Answer: DExplanationEach matrix job name includes the axis values in parentheses, so correlating build (windows-2022, 20) with the axes shows whether the failure clusters on one OS or one runtime. Re-run failed jobs reruns only the failed matrix entries and keeps the successful ones, saving time. Editing the matrix and pushing a commit changes the workflow definition and mixes a diagnostic step with a code change. Downloading logs and triggering workflow_dispatch does not isolate the failed matrix job. Re-running the whole workflow wastes time and does not identify which variant caused the failure.
-
4 Question 4 Multiple choice Manage GitHub Actions for the enterprise
A financial services enterprise has 300 repositories and needs to standardise CI on shared reusable workflows owned by a platform team. Security requires that only platform-approved workflows and actions from the organisation's own repositories and a short list of verified creators can run, that workflow templates are distributed only inside the enterprise, and that new repositories do not get broader Actions permissions than the platform team has approved. Which TWO actions together meet these requirements? (Choose two.)
Correct Answer: A, DExplanationThe enterprise Actions policy can restrict which actions may run to enterprise-owned actions plus a named allow list of verified creators and specific actions, and repositories cannot widen that policy beyond it. Keeping workflow templates in a private organisation repository makes them visible only inside the enterprise. Publishing to the public Marketplace exposes the templates externally, which violates the distribution rule. Granting admin rights lets teams override the approved configuration. Allowing all actions depends on manual review and does not enforce the restriction.
-
5 Question 5 Single choice Secure and optimize automation
A deployment workflow in a healthcare company runs on GitHub-hosted runners. It currently stores a long-lived AWS access key in an encrypted repository secret and uses it with aws-actions/configure-aws-credentials@v4. A security review requires that no static cloud credentials exist in GitHub, that each deployment assume a role scoped to a single environment, and that the trust policy only accept tokens from the production environment of this repository. The team must make the change without any code in the deployment steps changing beyond the credential step. Which change is the MOST appropriate?
Correct Answer: DExplanationFederation with OIDC requires the job to hold id-token: write, which lets the runner request a short-lived token from GitHub that AWS exchanges for a role session. A trust policy condition on the environment subject claim restricts the role to the production environment. Removing the stored key meets the no-static-credentials rule. Rotation still leaves long-lived keys in place. Moving a key into a variable is not a security improvement, since variables are not encrypted. The GITHUB_TOKEN contents permission does not produce cloud credentials.
-
6 Question 6 Single choice Author and maintain actions
A team is building a composite action that runs a linter on every pull request. It needs to output the number of violations to later steps in the calling job and emit a warning annotation when the count is above zero. The action will be consumed on hosted runners, where the runner file-command mechanism is available. Which implementation is CORRECT?
Correct Answer: DExplanationComposite action steps set outputs by appending name=value to the file in GITHUB_OUTPUT, and the action's outputs block maps them to the caller. The ::warning:: command creates an annotation. The set-output command has been deprecated in favour of the environment file. Writing to GITHUB_ENV makes a variable visible to later steps, not to the caller's outputs block. Composite actions do support outputs, so writing a workspace file is unnecessary.
-
7 Question 7 Single choice Consume and troubleshoot workflows
A repository's ci.yml includes a reusable workflow via uses: org/shared/.github/workflows/build.yml@v3. The shared workflow was updated and now fails, but the team needs to validate a fix on a feature branch before the platform team releases v3.1. The reusable workflow repository is owned by a different team and the consuming repository must not change its pinned version in main. Which approach BEST supports validation without affecting production consumers?
Correct Answer: AExplanationA reusable workflow reference can point to a branch or commit in the shared repository, so a feature branch in the consumer repository can reference the fixed version while main keeps the stable v3 pin. Editing main or copying the workflow changes what production consumers run or diverges from the shared source. Concurrency controls scheduling and does not change which workflow code runs.
-
8 Question 8 Single choice Secure and optimize automation
A pull request workflow triggered by pull_request_target checks out the PR head branch and runs npm test. A security engineer notices that the run step contains echo ${{ github.event.pull_request.title }}. The repository is public and accepts contributions from outsiders. Which change MOST effectively mitigates the risk while keeping the workflow functional?
Correct Answer: DExplanationInterpolating untrusted event fields directly into run: lets attacker-controlled text become shell syntax. Passing the value through an environment variable and quoting it prevents interpretation as code. Checking out the base branch in pull_request_target avoids running untrusted PR code with secrets. Sed escaping is fragile and misses many cases. Switching to pull_request does not fix the injection and still runs with fork permissions. Write-all permissions widen the attack surface.
-
9 Question 9 Single choice Manage GitHub Actions for the enterprise
A company runs self-hosted runners in a private VPC. Jobs must download packages from an internal registry that is reachable only from the VPC, and one team needs a runner with GPU drivers that the standard image lacks. The security team also requires that repositories from the legal business unit never run on the GPU runners. Runners must be managed at scale and grouped by access level. Which configuration BEST meets these requirements?
Correct Answer: DExplanationRunner groups control which repositories may use a set of runners, so a GPU group scoped to approved repositories enforces the separation, whereas labels only guide job placement and any repository can still target them. Installing drivers on the host supplies the GPU stack. GitHub-hosted runners cannot reach a VPC-only registry without extra networking, and IP allow lists restrict access to enterprise resources rather than placing jobs in the VPC. Grouping all self-hosted runners together removes the isolation.
-
10 Question 10 Multiple choice Author and manage workflows
A platform team needs a deployment workflow that can be started manually with an environment choice, a boolean dry-run flag, and an optional version string, and that also runs nightly. The team wants inputs validated when started manually and reused by a calling workflow that passes its own secrets. Which TWO configurations are correct? (Choose two.)
Correct Answer: C, DExplanationworkflow_dispatch supports typed inputs including choice and boolean, with required and default keys, so manual starts are validated. Reusable workflows declare inputs and secrets under workflow_call, and callers either inherit secrets or map them explicitly. Untyped inputs lose validation. Scheduled triggers belong at the top level of on:, not under workflow_dispatch. Secrets are not declared in the inputs section.
-
11 Question 11 Single choice Secure and optimize automation
A maintainer team publishes container images and wants consumers to verify that each release was built from the expected repository and workflow. The release workflow runs on GitHub-hosted runners and pushes images to a registry. Consumers must be able to check provenance without access to the build logs. Which step BEST provides this, and where should it run?
Correct Answer: BExplanationBuild provenance attestations are generated with actions/attest-build-provenance, which signs a statement tying the artifact digest to the workflow identity. Required permissions include id-token and attestations write, and the attestation should be generated for the pushed digest. Checksums show integrity but not origin. Artifacts from a run are only downloadable with repository access and are removed by retention policies. Signing with a long-lived key moves the trust to a stored secret and does not record the build identity the scenario requires.
These are 11 of the 113 questions in the full GH-200 pack.
Get All 113 QuestionsGet all 113 questions & answers
Full access options for Microsoft GH-200
Self-study
PDF Version
- 113 actual exam questions
- Compatible with all devices
- Printable PDF format
- No download limits
- 90 days free updates
- 24/7 customer support
Best value
Bundle Pack
- Discounted PDF + online access
- 113 actual exam questions
- Both PDF and online practice test
- Free 90 days updates
- No download or practice limits
- 24/7 customer support
Exam simulation
Online Practice Test
- 113 actual exam questions
- Actual exam environment
- 90 days free updates
- Browser-based software
- 24/7 customer support
100% Money Back Guarantee
Your success comes first
At DumpsProvider, we give you a 100% money back guarantee on all of our exam dumps. For us, your success is the #1 priority and we are more than confident that our exam material will help you pass the GH-200 Exam (GitHub Actions Exam) on your very first attempt.
In a rare case, if you fail your exam, we will refund your amount without asking a single question.