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

GitHub GH-600: Implement tool use and environment interaction Practice Questions

5 free sample questions from the Implement tool use and environment interaction 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 developer configures a Copilot agent with a tool that executes shell commands inside a GitHub Actions runner. During a security review, the reviewer flags this as a high-risk configuration. Which TWO mitigations MOST directly reduce the risk of this tool configuration? (Select TWO.)

  • A. Enable Dependabot on the repository to scan the agent's dependencies for vulnerabilities.
  • B. Store the list of permitted shell commands in a GitHub environment secret so the agent can reference it at runtime.
  • C. Require that the agent's shell command output is reviewed and approved by a human before any subsequent agent action is taken.
  • D. Restrict the shell command tool to a predefined allow list of permitted commands, rejecting any command not on the list.✓ Correct
  • E. Run the agent in a dedicated, ephemeral runner with no access to production credentials or sensitive environment variables.✓ Correct
Explanation

Restricting the tool to a command allow list (Option D) prevents the agent from executing arbitrary or malicious commands, directly limiting the blast radius of any prompt injection or misconfiguration. Using an ephemeral, isolated runner (Option E) ensures that even if a dangerous command executes, it cannot access production secrets or persist state maliciously. Option B is incorrect because storing a command list in a secret doesn't enforce the allow list—it must be enforced in the tool's execution logic, not merely stored as a secret. Option A is incorrect because Dependabot scans dependencies for known CVEs; it does not mitigate the runtime risk of arbitrary shell command execution by an agent. Option C is incorrect because requiring human review of every shell output converts the agent to a human-in-the-loop system, which defeats the purpose of autonomous execution and is not a scalable mitigation.

2.

A developer wants to configure a Copilot agent so that it can create a new branch from main and open a pull request with proposed code changes, all autonomously. The agent will run inside a GitHub Actions workflow. Which TWO GitHub Actions permissions must be granted to the workflow's GITHUB_TOKEN for these autonomous actions to succeed? (Select TWO.)

  • A. issues: write — required to link the pull request to a related issue automatically.
  • B. pull-requests: write — required to open and describe the pull request.✓ Correct
  • C. actions: write — required to trigger subsequent workflow runs from the new branch.
  • D. checks: write — required to post status checks on the new pull request.
  • E. contents: write — required to create and push the new branch.✓ Correct
  • F. packages: write — required to publish any build artifacts associated with the pull request.
Explanation

Creating and pushing a branch requires contents: write (to write to the repository's git content), and opening a pull request requires pull-requests: write. These two permissions are the minimum necessary for the described autonomous actions. Option C is incorrect because actions: write controls workflow management (enabling/disabling, creating workflow dispatch events), not branch or PR creation. Option A is incorrect because issues: write is needed to comment on or create issues, not to open a pull request; PR-issue linking is a UI feature, not a permission requirement. Option F is incorrect because packages: write is for GitHub Packages and is unrelated to branch or PR operations. Option D is incorrect because checks: write enables posting check runs, which is a separate concern from creating a branch or PR.

3.

An agent is configured to autonomously create pull requests as part of a feature development workflow. After a deployment incident, the team decides that the agent must be able to roll back a pull request it created if a downstream check fails. Which THREE capabilities are required to implement this rollback behavior? (Select THREE.)

  • A. The agent must have write access to the branch so it can delete or push a reverting commit.✓ Correct
  • B. The agent must be configured with a rollback trigger condition that maps specific check failure signals to the rollback action.✓ Correct
  • C. The agent must have read access to the CI workflow logs to detect the downstream check failure.
  • D. The agent must have permission to close or revert the pull request it previously opened.✓ Correct
  • E. The agent must be enrolled in GitHub Advanced Security to access the code scanning results needed for rollback decisions.
  • F. The agent must store all previous pull request SHAs in a repository secret so they can be referenced during rollback.
Explanation

Rolling back a PR requires three things: (D) permission to close or revert the PR (the agent needs PR write permissions); (B) a configured trigger that maps a check failure signal to the rollback action (without this logic the agent cannot decide when to roll back); and (A) write access to the branch to push a reverting commit or delete the branch. Option C is incorrect because while log access is useful for diagnostics, the rollback trigger is driven by check status events, not raw log parsing. Option F is incorrect because SHAs for rollback can be retrieved dynamically from the GitHub API; storing them in secrets is unnecessary and a security anti-pattern. Option E is incorrect because GitHub Advanced Security is a code scanning and secret scanning product; it is not required for rollback logic based on CI check failures.

4.

An enterprise team wants every action taken by their Copilot agent—including which tools were called, what parameters were used, and what responses were returned—to be auditable after the fact. Which TWO implementation approaches BEST support this requirement? (Select TWO.)

  • A. Configure the agent to emit structured logs of all tool invocations and responses to a persistent log store (such as a GitHub Actions artifact or an external SIEM).✓ Correct
  • B. Require all agent-initiated pull requests to include a machine-generated comment summarizing the tools invoked and the rationale for each action.
  • C. Enable GitHub audit log streaming for the organization so that agent-triggered API calls and events are captured in the enterprise audit trail.✓ Correct
  • D. Set the agent's maximum token output to a low value so that responses are short and easier to review manually.
  • E. Store the agent's system prompt in a repository secret so that auditors can retrieve the original instructions at any time.
Explanation

Emitting structured tool invocation logs to a persistent store (Option A) provides a detailed, queryable record of every agent action, fulfilling auditability at the tool level. Enabling GitHub audit log streaming (Option C) captures agent-triggered platform events in the organization's audit trail, supporting accountability at the GitHub API level. Together these cover both fine-grained tool use and platform-level events. Option E is incorrect because storing the system prompt in a secret makes it less accessible to auditors, not more, and the system prompt is not a record of actions taken. Option D is incorrect because limiting token output degrades agent effectiveness and does not produce an audit trail. Option B, while a useful transparency practice for PRs, is not a comprehensive audit mechanism—it only covers PR-related actions and is not a reliable, tamper-resistant log.

5.

A developer is configuring a GitHub Copilot agent to use an MCP server that provides access to an internal ticketing system. After adding the server definition, the agent does not appear to recognize any of the tools exposed by the MCP server. Which configuration step is MOST likely missing?

  • A. The developer must create a GitHub Actions workflow that manually imports the MCP tool definitions on each run.
  • B. The MCP server's tools must be individually declared as repository secrets before the agent can access them.
  • C. The MCP server must be listed in the agent's allowed tool set (MCP allow list) so the agent is permitted to invoke its tools.✓ Correct
  • D. The MCP server URL must be added to the repository's CODEOWNERS file so the agent can discover it.
Explanation

When an MCP server is added as a tool source, its tools are not automatically available to the agent—they must also be explicitly permitted via the MCP allow list. This allow list governs which MCP-exposed tools the agent may call at runtime. Option D is incorrect because CODEOWNERS controls code review assignments, not tool discovery. Option A is incorrect because MCP tool definitions are not imported via workflow steps; the allow list is the correct mechanism. Option B is incorrect because MCP tools are not configured through repository secrets; secrets store credentials, not tool permissions.

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 tool use and environment interaction study guide (GH-600) →

Other GH-600 domains

← All GitHub Agentic AI Developer study resources