A coding agent will run shell commands on a repository you have not reviewed. Where should it run?
- Exam domain
- Using coding agents for application development~17% of the exam
- Difficulty
- Medium
- In this mock
- 10 questions on this domainPractise this domain
Why the exam asks this
Using coding agents effectively.
Objective in the exam guide: Using coding agents in secure sandboxes (e.g., Google Kubernetes Engine [GKE], Cloud Workstations, and Antigravity).
Coding agents run commands, so where they run decides the blast radius.
Why B is the answer
In an isolated sandbox, such as Cloud Workstations or GKE
A sandbox limits what a command can reach, so a bad or malicious command cannot touch credentials, other projects or production.
Remember: Untrusted work runs in a sandbox.
How it works
An isolated environment, such as a Cloud Workstation or a GKE pod, limits what a bad command can touch.
Keep production credentials out of that environment.
Clues in the question
The words that point to the answer, and what each one tells you.
- shell commands
- Real side effects.
- you have not reviewed
- Treat the code as untrusted.
In detail
- The exam guide names GKE, Cloud Workstations and Antigravity as secure sandboxes.
- Isolation matters most when the code or the task is untrusted.
- Pair the sandbox with least-privilege tool access.
Every option, checked
Knowing why each wrong option fails is how you rule it out on exam day.
A. Anywhere, as long as approvals are turned off for speedWrong
Turning off approvals removes the remaining safeguard.
B. In an isolated sandbox, such as Cloud Workstations or GKERight
Untrusted work runs in a sandbox.
C. On a developer laptop with admin rights, to save setup timeWrongMost tempting
An admin laptop holds credentials and personal data.
Why it tempts: A laptop holds personal credentials and files, so a bad command reaches them.
D. On a production VM, so the results match productionWrong
Production is the last place to run unreviewed commands.
Use case
An illustrative scenario, not a real incident.
Illustrative: a team triages external pull requests with a coding agent inside Cloud Workstations, with no production credentials.
See it in different ways
flowchart TD
Q{"Where should the coding agent run commands?"}
Q -->|"Untrusted repo or broad permissions"| A0["Isolated sandbox Cloud Workstations, GKE or the Antigravity terminal sandbox"]
Q -->|"Trusted repo, every command reviewed"| A1["Local workspace with request-review"]How to read this chart
- At "Where should the coding agent run commands?": if "Untrusted repo or broad permissions", go to "Isolated sandbox Cloud Workstations, GKE or the Antigravity terminal sandbox"; if "Trusted repo, every command reviewed", go to "Local workspace with request-review".
stateDiagram-v2 state "Agent proposes command" as s0 state "Sandbox runs it" as s1 state "Result returned" as s2 state "Blocked" as s3 [*] --> s0 s0 --> s1: allowed s1 --> s2 s0 --> s3: denied by policy s2 --> [*] s3 --> [*]
How to read this chart
- It starts at "Agent proposes command".
- From "Agent proposes command", "allowed" moves it to "Sandbox runs it".
- From "Sandbox runs it", it moves to "Result returned".
- From "Agent proposes command", "denied by policy" moves it to "Blocked".
- It ends at "Result returned" or "Blocked".