Here are all the actual test exam dumps for IT exams. Most people prepare for the actual exams with our test dumps to pass their exams. So it's critical to choose and actual test pdf to succeed.

Exam GH-600 Topic 1 Question 28 Discussion

Actual exam question for Microsoft's GH-600 exam
Question #: 28
Topic #: 1
You have a GitHub repository.
Developers use the GitHub Copilot CLI and repository-scoped hooks under .github/hooks/*.json.
You need to allow the Copilot CLI to automatically run low-risk Bash commands. The solution must prevent the autonomous execution of high-risk commands, such as sudo, rm -rf /, and curl ... | bash.
What should you do?

Suggested Answer: D Vote an answer

To safely restrict high-risk commands while allowing low-risk execution, you must configure a preToolUse hook that returns permissionDecision: "deny" when a restricted pattern is detected.
The preToolUse lifecycle hook executes immediately before GitHub Copilot CLI attempts to invoke any tool or execute a command. It evaluates the tool arguments and can programmatically intercept execution by writing a specific JSON payload to stdout. Returning
{"permissionDecision": "deny"} explicitly instructs Copilot CLI to block the autonomous execution of that command.
Reference:
https://code.visualstudio.com/docs/agent-customization/hooks

by Adelaide at Aug 13, 2026, 10:22 PM

Comments

Chosen Answer:
This is a voting comment (?) , you can switch to a simple comment.
Switch to a voting comment New
Nick name: Submit Cancel
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.