You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
⚠ ⚠️ 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 5738466
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
Reacted by Fernando Costa, lyfo-timon, Patrick Carvalho, Jung-Hyun Ian Byun, James Ballenger and Janne Schyffert
Reacted by George Maina {{@crypt0g30rgy}}, e-roux and James Ballenger
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.
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
Reacted by Patrick Carvalho and Jung-Hyun Ian Byun
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.
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
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.
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.
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.
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!
│ ? 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. 🤷
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.
Activity
swapnil1222589 commentedon Oct 9, 2026
Hi! I’m interested in investigating this regression.
I noticed that
ShellToolInvocation.shouldConfirmExecute()checkshasTaintedOrBuildFileRisk()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.
crypt0g30rgy commentedon Oct 9, 2026
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
swapnil1222589 commentedon Oct 9, 2026
Thanks for confirming this and sharing the workaround. The fact that normal commands like
java --version,npm,vitest, andgradlewtrigger 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.crypt0g30rgy commentedon Oct 9, 2026
its seems to be triggered by the model tool call, i tested thrice and i didnt get the error
but when i requested the model to run some tests i got the pause
log2cn commentedon Oct 13, 2026
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()tohasTaintedOrBuildFileRisk() { return false;.log2cn commentedon Oct 13, 2026
Given your poor ability to analyze problems based on known information, I will not provide further information
IanByun commentedon Oct 15, 2026
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 commentedon Oct 15, 2026
fix(core): scope untrusted flag checks to external output and remembe…
fix(core): scope untrusted flag checks to external output and remembe…
fix(core): scope untrusted flag checks to external output and remembe…
fix(core): scope untrusted flag checks to external output and remembe…
fix(core): scope untrusted flag checks to external output and remembe…
vtjballeng commentedon Oct 22, 2026
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.
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.
seungyongshim commentedon Nov 3, 2026
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-cgets flagged. Nobody is at the terminal, so the run just hangs until someone approves it by hand.tools.allowed, allow hooks and--skip-trustdon'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--yolois 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.zhoulujue commentedon Nov 17, 2026
Opened #30268 to fix this (and #29680 / #30004) so active, trusted
--yolo/-ysessions (both interactive and headless-p) are no longer blocked on untrusted-flag or build-file prompts, while preserving all checks indefault/auto_editmodes, untrusted folders, anddisableYoloMode. Feedback welcome!AdamMajer commentedon Nov 27, 2026
What can I say ....
> gemini --version 0.71.1Since 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. 🤷
zhoulujue commentedon Nov 30, 2026
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.