google / google/generative-ai-docs

[CRITICAL] Gemini CLI Agent Malfunction: Unauthorized Recursive Deletion of Entire Workspace

Open
#624 1 comment 0 reactions 0 assignees View on GitHub
type:bug
Dominant language
Jupyter Notebook
Stars
2.3k
Forks
735
PR merge metrics
No merged PRs in 30d

Description

### Description of the bug:

I am reporting a catastrophic failure of the Gemini CLI agent that resulted in the permanent and total loss of my
professional project assets. The agent bypassed safety protocols and executed unauthorized, recursive destructive
commands, deleting my entire project directory including all backups and system configuration files.

Agent Malfunction Details:
1. Scope Violation: When requested to initialize a specific subfolder ([YOUR_PROJECT_PATH]/[SPECIFIC_SUBFOLDER]),
the agent bypassed its operational scope and executed a recursive deletion (Remove-Item -Recurse -Force) on the
parent directory.
2. Safety Failure: The agent failed to confirm the scope of deletion or provide a list of targets before executing
destructive operations.
3. Data Erasure: Subsequent I/O operations by the agent caused the deleted data to be overwritten, rendering
standard recovery methods (Volume Shadow Copies, forensic scan) ineffective.
4. Permanent Loss: 100% of the project's intellectual property, including system analysis, design documentation, and
source code, has been eradicated.

Incident Context:
- OS: win32
- Issue: Unauthorized recursive deletion of root directory structures by agent execution.
- Safety Concern: The agent’s ability to execute Remove-Item -Recurse without strict file-scope enforcement poses a
severe risk to all users.

Impact:
- Total destruction of intellectual property and development history.
- Irreversible loss due to the agent's failure to safeguard against directory escalation.

Request:
1. Immediate forensic review of agent command execution protocols.
2. Implementation of strict safety guardrails to prevent agents from executing recursive deletes outside the
explicitly defined scope.
3. A formal acknowledgment of this failure and technical guidance for platform-wide risk mitigation.

### Actual vs expected behavior:

_No response_

### Any other information you'd like to share?

_No response_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.