GH-300 sample questions with answers

10 free practice questions for the GitHub Copilot exam. Try each one, then open the answer to see why the right option wins and every other option loses.

Question 1Use GitHub Copilot responsibly

Copilot Chat asserts that a dependency's client retries failed calls automatically. The project pins an older release of that dependency. How should the developer validate the claim?

  1. A.

    Search the dependency's current documentation, since a client library's retry behaviour is settled early and rarely changes between releases, so the latest description will apply to the pinned release too.

  2. B.

    Check the documentation for the pinned release, and confirm the behaviour with a small test against the version the project actually resolves.

  3. C.

    Ask Copilot Chat to cite the source of its claim and accept the answer if a plausible link is produced.

  4. D.

    Raise an issue with the dependency's maintainers asking them to confirm the behaviour before the change is merged.

Show answer

Answer: B

Validate against the pinned version, and prove it with a test rather than a document.

  • A. It assumes stability across releases, which is the assumption under test and the usual cause of this class of defect.
  • B. Version-specific documentation plus a probe test settles both the release question and any conditional behaviour.
  • C. A requested citation is generated too, and a plausible link is not evidence that it supports the claim.
  • D. Maintainers are a slow channel for a question the developer can answer in minutes against the resolved version.
Question 2Use GitHub Copilot responsibly

Six months after a Copilot rollout, a platform team finds pull requests are larger and reviewers are approving them faster than before. Which response addresses the underlying harm?

  1. A.

    Disable Copilot for the repositories with the largest pull requests until review throughput recovers to the level it was at before the rollout.

  2. B.

    Constrain the size of changes so review stays meaningful, because the harm is review capacity being outpaced rather than the tool itself.

  3. C.

    Add more reviewers to each pull request so that the increased volume of generated code is spread across a larger group and no single reviewer is overwhelmed by it.

  4. D.

    Set a target for review turnaround time so the team can show that quality has not fallen.

Show answer

Answer: B

Production outran review; the fix is smaller changes, not more reviewers or less tooling.

  • A. Disabling the tool discards the benefit to fix a review-process problem that would remain for large hand-written changes.
  • B. Smaller changes restore the ratio of attention to code, which is the mechanism that has broken.
  • C. More reviewers per change diffuses responsibility and typically reduces how carefully each one reads.
  • D. A turnaround target incentivises the fast approvals that are the symptom, and measures speed rather than quality.
Question 3Use GitHub Copilot responsibly

Copilot suggests a validation routine that rejects surnames containing spaces, apostrophes or non-Latin characters. Which harm does this illustrate, and what addresses it?

  1. A.

    A defect in the model, which should be reported so the vendor can retrain it before the code is used.

  2. B.

    Bias present in the material the model learned from can be reproduced in generated logic, so rules that classify people's data need deliberate review against the organisation's own requirements.

  3. C.

    A context problem, fixed by opening the project's validation tests before asking again.

  4. D.

    A filtering problem, fixed by enabling the public code matching filter for the repository.

Show answer

Answer: B

Bias in training material surfaces as an assumption in generated logic, and only review against the requirement catches it.

  • A. The suggestion reflects a widespread pattern rather than a fault to be reported, and waiting for a retrained model is not a control.
  • B. Bias in training material reappearing in generated logic is a documented harm, and targeted review is the mitigation that acts on it.
  • C. More context might change the suggestion, but tests written from the same assumption would reinforce the bias rather than expose it.
  • D. The public code matching filter addresses provenance and licensing, and has nothing to do with whether a rule is exclusionary.
Question 4Use GitHub Copilot responsibly

A generated change introduced a defect that reached production. Leadership asks whether Copilot should be withdrawn. What does operating the tool responsibly suggest?

  1. A.

    Record the incident against the tool's vendor so a pattern can be established across future reports.

  2. B.

    Keep Copilot but require that every suggestion longer than five lines is rewritten by hand before it is committed.

  3. C.

    Handle it as an ordinary engineering incident: establish which control failed to catch the defect, and fix that control.

  4. D.

    Withdraw Copilot from the team involved until the incident review has finished and a written assurance has been given that the same class of defect cannot occur again in their repositories.

Show answer

Answer: C

A defect reaching production is a control failure, and the origin of the code does not change the analysis.

  • A. Logging against the vendor postpones the organisation's own analysis of which of its controls failed.
  • B. A line-count threshold has no relationship to risk, and short suggestions cause plenty of production defects.
  • C. A defect reaching production is a control failure, and the same investigation applies whoever or whatever wrote the code.
  • D. Withdrawal repairs nothing, and an assurance that a class of defect cannot recur is not obtainable.
Question 5Use GitHub Copilot responsibly

A compliance team asks developers to regenerate and attach the exact suggestion that produced a disputed line of code, months after that line was accepted. Why is this request unsound?

  1. A.

    The disputed line will have been reformatted by the repository's linter, so the original no longer exists.

  2. B.

    Generation is probabilistic, so the same request need not produce the same suggestion again, and no regeneration can evidence what was originally offered.

  3. C.

    Regeneration would work, but only a repository administrator holds the permission needed to replay another developer's suggestion, so the request has to be routed through them instead.

  4. D.

    Copilot never produces the same suggestion twice by design, so regeneration always returns something different.

Show answer

Answer: B

A suggestion is not a reproducible artefact, so regenerating it evidences nothing about the original.

  • A. Formatting by a linter changes the committed text, but the objection to regeneration holds even for unformatted code.
  • B. Probabilistic generation plus an unrecoverable prompt means a regenerated suggestion is new evidence, not the original.
  • C. There is no administrative replay capability for another developer's suggestions; the obstacle is not permissions.
  • D. Right conclusion, wrong reason: nothing guarantees a different result, so this overstates the behaviour and would mislead the team.
Question 6Use GitHub Copilot responsibly

A consultancy works on a client repository under a contract forbidding the client's source code from being sent to any third-party service. Copilot is enabled organisation-wide. What is the responsible course?

  1. A.

    Stop Copilot operating on that repository through an administrator-configured control, rather than relying on each consultant to remember.

  2. B.

    Allow the consultants to continue, provided each of them reviews every suggestion carefully and records in their timesheet which client files they had open while Copilot was active.

  3. C.

    Allow it, because a contract restricting third-party processing does not cover a coding assistant that only returns suggestions.

  4. D.

    Ask each consultant to close client files before invoking Copilot and to reopen them afterwards.

Show answer

Answer: A

An obligation this specific needs an administered control, not individual discipline.

  • A. An administrator-configured exclusion removes the possibility rather than relying on the person it constrains.
  • B. Careful review governs what is accepted, not what was sent, and a timesheet record does not prevent the transmission.
  • C. Requesting a suggestion sends context to a third-party service, which is precisely what the contract forbids.
  • D. A procedure that depends on remembering to close files fails silently and cannot be evidenced afterwards.
Question 7Use GitHub Copilot responsibly

A developer reports that Copilot repeatedly proposed an insecure pattern for handling uploaded files. What should an organisation operating the tool responsibly have in place for this?

  1. A.

    An automatic block on the file type the suggestion related to.

  2. B.

    A monthly survey asking developers how satisfied they are with suggestion quality.

  3. C.

    A rule that the developer stops using Copilot until the vendor confirms a fix.

  4. D.

    A route for reporting a bad suggestion, a record of what was reported, and a decision about whether guidance or configuration should change as a result.

Show answer

Answer: D

A report needs somewhere to go, a record, and a decision — otherwise it is a complaint.

  • A. Blocking a file type is disproportionate and misses the pattern wherever else it is suggested.
  • B. A periodic satisfaction survey gathers sentiment, not actionable reports of specific recurring defects.
  • C. Suspension waits on an external party and discards the benefit while the report goes nowhere.
  • D. A route, a record and a decision are what turn one developer's observation into an organisational response.
Question 8Use GitHub Copilot responsibly

An organisation wants to reduce the chance that an insecure Copilot suggestion reaches production. Which TWO measures actually do that?

Choose 2.

  1. A.

    Require a human reviewer to read the generated change with the same care as hand-written code.

  2. B.

    Ask Copilot Chat to confirm that the suggestion it has just produced contains no vulnerabilities.

  3. C.

    Enable the public code matching filter, which withholds suggestions matching publicly available code.

  4. D.

    Run the organisation's existing security scanning over the branch before it can be merged.

  5. E.

    Rely on Copilot's content filtering, which is described as blocking insecure code before display.

Show answer

Answer: A, D

Scanning and human review act on the merged result; filters and self-checks do not close the gap.

  • A. Human review with unchanged standards is the documented safeguard and catches what a scanner cannot express as a rule.
  • B. Asking the model to check its own output produces another generated answer, not verification.
  • C. The public code matching policy addresses provenance, and original code can be just as insecure as matched code.
  • D. Scanning the branch before merge acts on the actual change and is operated by the organisation.
  • E. Filtering is a vendor mitigation, not a guarantee, and treating it as the control leaves the organisation with nothing it can evidence.
Question 9Use GitHub Copilot responsibly

An organisation assessed Copilot's usefulness in a pilot eight months ago and now treats that assessment as settled. What is the weakness in that position?

  1. A.

    The tool's behaviour is not fixed, so an assessment of its output needs repeating rather than being treated as a permanent finding.

  2. B.

    Nothing is wrong with it, provided the organisation recorded which developers took part and how long the pilot ran.

  3. C.

    The assessment is invalid because a pilot measures acceptance rate, which is the only meaningful measure of a coding assistant.

  4. D.

    A pilot cannot produce a valid assessment at all, because the developers who volunteer for one are more capable than the organisation's average and their results never generalise to anyone else.

Show answer

Answer: A

Copilot's behaviour changes over time, so a one-off assessment expires rather than settling the question.

  • A. The tool changes over time, so a point-in-time assessment of its output stops describing it.
  • B. Recording who took part improves the record of the pilot; it does not stop the finding ageing.
  • C. Acceptance rate is one weak signal among several, and calling it the only meaningful measure is wrong on its own terms.
  • D. Self-selection weakens generalisation but does not invalidate a pilot, and it is not why an old finding expires.
Question 10Use GitHub Copilot responsibly

A team asks for a Copilot feature that the organisation has disabled by policy. What is the responsible way to handle the request?

  1. A.

    Let the team enable the feature for its own repositories, since the team understands its own risk better than a central function does and can reverse the change if it causes a problem.

  2. B.

    Decide it through the documented exception route, so the reason and the decision are recorded centrally.

  3. C.

    Enable it organisation-wide, since a feature one team needs is likely to be useful to the others.

  4. D.

    Decline it, because a policy that admits exceptions cannot be enforced consistently across an organisation.

Show answer

Answer: B

Route it through the exception process so the decision exists somewhere other than in a conversation.

  • A. A policy set above the team cannot be overridden locally, and local enablement would leave no record.
  • B. The exception route puts the decision with the policy owner and leaves a record of the reason.
  • C. Generalising one team's request organisation-wide changes the policy without anyone assessing whether the reason applies.
  • D. A policy with no exception route invites circumvention, which is worse than a granted and recorded exception.

Keep going with 582 more GH-300 questions

Free papers every day, in the real exam formats, with progress by exam domain. Unlock every paper and timed mock exam when you are ready.

GH-300 sample questions with answers (10 free) · CertifyAIx