gemini-cli icon indicating copy to clipboard operation
gemini-cli copied to clipboard

Gemini CLI v0.63.0 - breaks yolo mode

Open nkolmykov-debug opened this issue 1 month ago • 13 comments

What happened?

⚠ ⚠️ CRITICAL SECURITY WARNING: Untrusted Command Flags Detected The following flags/arguments were sourced from external untrusted input (e.g., Buganizer ticket, external document): ...
Executing commands with flags sourced from untrusted input can execute arbitrary code on your machine. Carefully verify these flags before approving.

What did you expect to happen?

I expect that in yolo mode, no confirmations will be required to continue operation. Or, at the very least, there will be a startup parameter to disable additional confirmations.

Client information

Client Information

Run gemini to enter the interactive CLI, then run the /about command.

> /about

About Gemini CLI

CLI Version 0.63.0 Git Commit 573846625 Model gemini-pro-latest Sandbox no sandbox OS win32 Auth Method gemini-api-key

Login information

No response

Anything else we need to know?

No response

nkolmykov-debug avatar Oct 08 '26 14:10 nkolmykov-debug

Hi! I’m interested in investigating this regression.

I noticed that ShellToolInvocation.shouldConfirmExecute() checks hasTaintedOrBuildFileRisk() before applying the YOLO-mode shortcut. There is also an existing test that explicitly expects confirmation when untrusted flags are detected in YOLO mode.

That makes me think the key question is whether v0.63.0 introduced an over-broad detection regression, rather than whether YOLO should bypass the security check entirely.

Could you share a complete example command that triggers this warning, along with the task or external text from which the flagged arguments originated? Please redact secrets and any sensitive content.

I’d like to reproduce the behavior and trace extractUntrustedContext() / findUntrustedFlags() to determine whether a trusted command is being incorrectly classified. Any fix should preserve confirmation for genuinely untrusted command arguments while avoiding unnecessary prompts for safe commands.

I’ll avoid proposing a blanket bypass until the intended security behavior is clear.

swapnil1222589 avatar Oct 09 '26 03:10 swapnil1222589

I hit this same issue today after updating to v0.63.0 from v0.60.0 which was working well.

As a temporary fix i did

/settings

Search update and turn that to false

then rolled back to v0.62.0 via npm install -g @google/[email protected] which works.

The bug is annoying because any command going to the cli like say vitest or java --version, npm/pnpm, gradlew etc would pause and wait for you to hit allow everytime there was no allow always just allow or deny

crypt0g30rgy avatar Oct 09 '26 04:10 crypt0g30rgy

Thanks for confirming this and sharing the workaround. The fact that normal commands like java --version, npm, vitest, and gradlew trigger repeated confirmations on v0.63.0 helps narrow down the regression. I’ll investigate why these commands are being flagged rather than bypassing the security check entirely. Could you share one exact command and whether the warning still appears when you type it directly yourself, without the command coming from external text or a file? That would help distinguish an overly broad detection issue from the intended security behavior.

swapnil1222589 avatar Oct 09 '26 04:10 swapnil1222589

its seems to be triggered by the model tool call, i tested thrice and i didnt get the error

Image

but when i requested the model to run some tests i got the pause

Image Image Image Image

crypt0g30rgy avatar Oct 09 '26 04:10 crypt0g30rgy

Same issue. 0.63.0 YOLO almost every request triggers a manual confirmation prompt: CRITICAL SECURITY WARNING: Untrusted Command Flags Detected.

My temporary solution is to change hasTaintedOrBuildFileRisk() to hasTaintedOrBuildFileRisk() { return false;.

log2cn avatar Oct 13 '26 03:10 log2cn

Image

Given your poor ability to analyze problems based on known information, I will not provide further information

log2cn avatar Oct 13 '26 06:10 log2cn

I can also confirm that this bug is bugging me for days. The CLI is popping " Allow execution of [Shell]" for every command, even the simple as checking the git version, which renders the use of CLI useless

IanByun avatar Oct 15 '26 05:10 IanByun

Image

IanByun avatar Oct 15 '26 05:10 IanByun

This continues to generate the same error for me in EVERY shell command request under WSL for Windows. It's fully broken and now Gemini CLI is effectively unusable. This continues in v0.65.0.

Image

My workaround was to roll back to v0.62.00. Gemini itself could not find the fault and Claude did not find the solution here . I don't prefer that method in any case as it's riskier as it's editing the default controls and I won't remember to go back and change it. I don't need yet another thing to come back to later.

vtjballeng avatar Oct 22 '26 09:10 vtjballeng

We run Gemini CLI as a headless sub-agent with -y (YOLO), and since the untrusted-flag check landed (#29250) YOLO no longer works for us. Sessions keep stopping on "CRITICAL SECURITY WARNING: Untrusted Command Flags Detected" even on 0.67.0-preview.0, after #29672 and #29833.

A typical case is git -C <workspace path> -c core.sshCommand="ssh" fetch origin. The path showed up in an earlier shell output, so -c gets flagged. Nobody is at the terminal, so the run just hangs until someone approves it by hand. tools.allowed, allow hooks and --skip-trust don't help, and there is no setting to turn the check off (same gap as #30004).

Could YOLO mean "no prompts" again? An opt-out such as security.untrustedFlagCheck: false, or skipping the check when --yolo is passed, would fix it. Users who opt into YOLO have already accepted that risk. Right now we have to patch the installed bundle after every update.

seungyongshim avatar Nov 03 '26 00:11 seungyongshim

Opened #30268 to fix this (and #29680 / #30004) so active, trusted --yolo / -y sessions (both interactive and headless -p) are no longer blocked on untrusted-flag or build-file prompts, while preserving all checks in default/auto_edit modes, untrusted folders, and disableYoloMode. Feedback welcome!

zhoulujue avatar Nov 17 '26 06:11 zhoulujue

│ ? Shell  git log -n 1
│ │ git log -n 1
│ ⚠  ⚠️  CRITICAL SECURITY WARNING: Untrusted Command Flags Detected 
│
│    The following flags/arguments were sourced from external untrusted input (e.g., Buganizer ticket, external document):
│      • -n
│      • 1
│
│    Executing commands with flags sourced from untrusted input can execute arbitrary code on your machine.
│    Carefully verify these flags before approving.

What can I say ....

> gemini --version
0.71.1

Since introduction of this momentous feature, it continues to be just as useful, training people to press YES YES YES every 10 seconds, completely negating agentic work.

A critical process foobar like this along "status/needs-triage" for 2 months seems a little broken process. But maybe this is one way of moving people off of gemini-cli to other platforms. 🤷

AdamMajer avatar Nov 27 '26 18:11 AdamMajer

Opened PR #30552 (superseding #30268, which was auto-closed by the 14-day lifecycle bot over Thanksgiving) to respect active, trusted YOLO mode (--approval-mode=yolo / -y, both interactive and headless -y -p) in shell taint and build-file protection checks, while keeping all protections enforced in non-YOLO modes, untrusted folders, disableYoloMode / secureModeEnabled, and explicit higher-tier user/admin policy rules or hooks.

If you're still hitting this regression, feedback or 👍 on #30552 would help signal priority for triage.

zhoulujue avatar Nov 30 '26 05:11 zhoulujue