GitHub Agentic AI Developer (GH-600) · 10% practice allocation

GitHub GH-600: Implement guardrails and accountability Practice Questions

5 free sample questions from the Implement guardrails and accountability domain, with answers and explanations. The full GH-600 bank has 61 questions across 6 domains. Questions are scenario-based and written from the official GitHub exam guide.

1.

A GitHub Copilot agent autonomously generates and merges infrastructure-as-code pull requests for a cloud environment. A compliance officer requires a full audit trail for every change. Which TWO platform capabilities should you implement to satisfy this requirement while preserving as much agent autonomy as possible? (Choose TWO.)

  • A. Configure the agent to write a structured YAML manifest of every action it takes to a dedicated append-only audit log repository using a separate write token.
  • B. Use GitHub's audit log streaming to capture all API events made under the agent's token to an external SIEM or storage target.✓ Correct
  • C. Set the agent workflow to run only on a fixed schedule (e.g., once per day) to reduce the volume of changes requiring audit.
  • D. Enable required status checks and branch protection rules so every merge is recorded in the repository's protected branch log.✓ Correct
  • E. Disable the agent's ability to merge pull requests and require a human reviewer to approve and merge every PR before it is processed.
Explanation

Branch protection rules with required status checks create a tamper-evident record of every merge event in GitHub's native logs (Option D), and audit log streaming (Option B) captures every API call the agent makes to an immutable external destination—together these satisfy an auditor's need for a comprehensive, trustworthy trail without removing any agent autonomy. Option A (custom YAML manifest) is a plausible but fragile pattern: if the agent or its token is compromised the manifest can be tampered with, and it duplicates what GitHub's built-in audit log already provides. Option E eliminates agent autonomy entirely, which violates the goal of preserving delivery velocity. Option C (scheduling) reduces throughput and does not itself produce an audit trail—it is an operational constraint, not an accountability mechanism.

2.

Your team is building a multi-agent system on GitHub that automates parts of a SOC 2-audited software delivery pipeline. You are assigning autonomy levels to the following four agent actions. Which action should be assigned the LOWEST autonomy level (i.e., must always require explicit human authorization)?

  • A. Creating a new feature branch from the default branch when a linked issue is assigned.
  • B. Merging a pull request into the main branch of a repository that gates production deployments.✓ Correct
  • C. Posting a summary comment on a pull request with AI-generated code review feedback.
  • D. Automatically updating dependency versions in a non-production branch after all CI checks pass.
Explanation

Merging into the main branch of a production-gating repository is the highest-risk action among the four: it directly affects what ships to production, is subject to SOC 2 change-management controls, and is difficult to reverse quickly if a bad merge causes an incident. It therefore requires the lowest autonomy (most human oversight). Option D is low-risk because it targets a non-production branch and CI validation has already passed—high autonomy is appropriate. Option C is purely informational and non-destructive; it can safely be fully automated. Option A is a lightweight, reversible repository operation with no direct compliance impact, suitable for full automation.

3.

Your organization operates a Copilot agent that can autonomously provision GitHub repository resources (create repos, configure branch protection, add webhooks) via the GitHub REST API. During a red-team exercise, testers demonstrate that a specially crafted issue comment can cause the agent to invoke the webhook-creation endpoint with an attacker-controlled URL, potentially exfiltrating repository data. You must harden the agent against this class of attack without disabling webhook management entirely. Which THREE controls most directly mitigate this risk? (Choose THREE.)

  • A. Increase the agent's GITHUB_TOKEN expiry interval from the default to 24 hours so that compromised tokens have a longer useful lifespan for forensic analysis.
  • B. Archive all repositories where the agent detects suspicious issue comments to prevent further API calls until a human reviews the repository.
  • C. Require a human operator to approve all webhook creation and modification requests that originate from user-supplied input, classifying them as compliance-sensitive actions.✓ Correct
  • D. Restrict the agent's GitHub App installation permissions so that webhook administration is scoped only to the specific repositories that legitimately require it, not organization-wide.
  • E. Validate and allowlist webhook target URLs against an organization-approved domain list before any webhook creation API call is executed.✓ Correct
  • F. Implement an input sanitization and prompt-injection guard layer that detects and blocks attempts to override the agent's system instructions from issue comment content.✓ Correct
Explanation

Option E (URL allowlisting) is a direct output guardrail: even if the agent is tricked into calling the webhook API, only pre-approved domains can be registered, neutralizing data exfiltration. Option C (human approval for user-input-triggered webhook changes) applies the human-in-the-loop control precisely to the high-risk, compliance-sensitive action class, blocking the attack path before it reaches the API. Option F (prompt-injection guard) addresses the root cause—the attacker's ability to hijack the agent's decision-making via crafted input—by intercepting malicious instructions before the agent acts on them. Option D (narrowing installation scope) is a good least-privilege practice but does not prevent the attack within the permitted repositories; it only limits blast radius. Option A is wrong and counterproductive: a longer-lived token increases risk, not security, and is unrelated to the webhook injection vector. Option B (archiving repositories) is a disproportionate, disruptive response that harms legitimate users and does not systematically prevent the attack class.

4.

A Copilot agent pipeline has been granted the 'contents: write' and 'pull-requests: write' GitHub Actions permissions so it can open pull requests with automated fixes. During a routine review, a security engineer notes that the agent also has implicit access to read all repository secrets exposed as environment variables in the workflow. Which remediation best aligns with the least-privilege principle without unnecessarily reducing the agent's delivery velocity?

  • A. Isolate the agent's workflow job so that secrets required only by other jobs are scoped to those jobs and not exposed to the agent's job environment.✓ Correct
  • B. Rotate all repository secrets immediately and regenerate them after every agent run to limit the exposure window.
  • C. Replace GitHub Actions permissions with a personal access token (PAT) owned by a service account and store it as a single omnibus secret.
  • D. Remove the 'contents: write' permission and require a human developer to manually push any changes the agent suggests.
Explanation

Scoping secrets to the specific jobs that need them—using job-level environment definitions or separate workflows—removes the agent's implicit access to unrelated secrets without touching the permissions it legitimately needs ('contents: write', 'pull-requests: write'). This preserves delivery velocity while enforcing least privilege. Option D unnecessarily eliminates core agent functionality and kills velocity. Option B (secret rotation after every run) is operationally expensive, does not prevent the agent from reading secrets during the run, and does not address the root scoping problem. Option C replaces fine-grained GITHUB_TOKEN permissions with a broad PAT, which actually increases risk by granting access beyond what the GitHub Actions permission model would allow and centralizes a high-value credential.

5.

A GitHub Copilot agent is configured to autonomously triage incoming issues, apply labels, and post clarifying comments. A new capability is proposed: the agent will also close issues it classifies as duplicates. A security reviewer flags this change. Which characteristic of the 'close issue' action most justifies requiring human approval before the agent performs it?

  • A. Closing an issue consumes additional GitHub Actions minutes, increasing operational cost.
  • B. Label application and commenting already require elevated permissions, so adding closure creates a permission conflict.
  • C. The GitHub API rate limit for issue closure is lower than for other issue operations, creating a bottleneck risk.
  • D. The action is irreversible by default and may suppress valid user-reported defects if the model misclassifies the issue.✓ Correct
Explanation

Closing an issue is a consequential, difficult-to-reverse action: a misclassified closure silences a legitimate bug report and erodes user trust, making it compliance-sensitive and a candidate for human-in-the-loop review. This directly maps to the guardrail principle of requiring explicit authorization for irreversible or high-impact changes. Option A is wrong—API cost and Actions minutes are not the basis for authorization requirements in Responsible AI guardrail design. Option B is wrong—closing issues uses the same 'issues: write' permission scope as commenting and labeling; there is no inherent permission conflict. Option C is wrong—rate limits are an operational concern, not a risk classification or compliance justification for human approval.

Test yourself across every GH-600 domain

The free GH-600 practice test mixes about 20 questions weighted like the exam. The full 61-question bank adds instant grading, flashcards and a timed mock exam.

Study this domain

Implement guardrails and accountability study guide (GH-600) →

Other GH-600 domains

← All GitHub Agentic AI Developer study resources