Back to skill

Security audit

Antigravity CLI

Security checks for vulnerabilities and agentic risk

Overview

This skill provides coherent CLI guidance with user controls, though its installer and updater troubleshooting steps need care.

Keep CLI access limited to the intended project and leave permission bypass off. Headless runs can edit workspace files without prompting. Review downloaded installers before execution and share only appropriate project content with the configured AI provider. Before deleting an updater lock, confirm no update is running; restore automatic updates afterward or maintain manual updates. The scanner's partial reference gaps were investigated, but external CLI and installer behavior remains outside this artifact review.

Vulnerability Patterns
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • Agent Memory PoisoningWrites attacker-controlled rules into memory that affect later sessions
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Output HandlingUnvalidated Output Injection, Cross-Context Output, Unbounded Output
Findings (25)

External Script Fetching

High
Category
Supply Chain
Confidence
90% confidence
Finding

The command fetches mutable remote content and immediately executes it as shell code without artifact verification. HTTPS protects transport but does not protect against a compromised publisher or distribution endpoint; this overlaps the installation-safety finding rather than establishing a separate malicious payload.

Content

Scanner excerpt · references/cli-usage.md (reported line 44)May include surrounding context.

OS setup, auth, and enterprise parameters stay in the official install docs.

bash
curl -fsSL https://antigravity.google/cli/install.sh | bash
powershell

Chaining Abuse

High
Category
Tool Misuse
Confidence
88% confidence
Finding

The pipe sends the downloaded response directly into Bash, crossing from unverified network content into executable code without a review step. This is the same remote-installer weakness identified by SC2, not evidence of an additional tool-chaining attack.

Content

Scanner excerpt · references/cli-usage.md (reported line 44)May include surrounding context.

OS setup, auth, and enterprise parameters stay in the official install docs.

bash
curl -fsSL https://antigravity.google/cli/install.sh | bash
powershell

Memory Manipulation

High
Category
Memory Poisoning
Confidence
80% confidence
Finding

Skill manipulates agent memory, state, or stored context. Memory corruption can alter personality, override safety rules, or cause unpredictable behavior.

Content

Scanner excerpt · references/command-reference.md (reported line 18)May include surrounding context.

md
| `/browser <task>` | | T | Browse, verify UI, debug in browser |
| `/btw <query>` | | U | Side question; main conversation keeps running |
| `/changelog` | | U | Release notes; headless mode prints CLI changes |
| `/clear` | `/new` | U | Clear terminal and reset conversation context |
| `/codesearch <query>` | `/cs`, `/search` | U | Search code across the workspace |
| `/config` | `/settings` | C | Settings editor |
| `/context` | | U | Context usage |

Agent Config Directory Access

High
Category
Agent Snooping
Confidence
90% confidence
Finding

Skill reads from agent configuration directories (.claude/, .codex/, .gemini/). These directories may contain API keys, personal settings, and other credentials that the skill has no legitimate need to access.

Content

Scanner excerpt · references/config-platform.md (reported line 42)May include surrounding context.

md
`agy plugin` (alias `agy plugins`) lists, installs, enables, disables, validates, and uninstalls plugins. Skills become TUI slash commands. `/hooks` shows pre-flight and post-generation checks.

MCP files: global `~/.gemini/antigravity-cli/mcp_config.json`, workspace `.agents/mcp_config.json`. The migration page instead names global `~/.gemini/config/mcp_config.json`. Confirm the file on disk before editing. `/mcp` shows status, reloads config, and shows connection logs. Remote SSE or websocket key rename: `references/gcli-migration.md`.

## Migration and docs

Agent Config Directory Access

High
Category
Agent Snooping
Confidence
90% confidence
Finding

Skill reads from agent configuration directories (.claude/, .codex/, .gemini/). These directories may contain API keys, personal settings, and other credentials that the skill has no legitimate need to access.

Content

Scanner excerpt · references/gcli-migration.md (reported line 40)May include surrounding context.

md
The migration page names:

- Global: `~/.gemini/config/mcp_config.json`
- Workspace: `.agents/mcp_config.json`

`references/config-platform.md` names the global file `~/.gemini/antigravity-cli/mcp_config.json`. Both pages agree on the workspace file. Check the installed machine before editing either global path.

Agent Config Directory Access

High
Category
Agent Snooping
Confidence
90% confidence
Finding

Skill reads from agent configuration directories (.claude/, .codex/, .gemini/). These directories may contain API keys, personal settings, and other credentials that the skill has no legitimate need to access.

Content

Scanner excerpt · references/gcli-migration.md (reported line 36)May include surrounding context.

md
## MCP

Gemini CLI nested servers inside `~/.gemini/settings.json`. Antigravity CLI uses a separate file.

The migration page names:

External Model or Provider Selection

High
Category
Excessive Agency
Confidence
90% confidence
Finding

Skill selects an external model or provider that may use a different account or billing plan than the operator expects. Undisclosed model switches can cause unexpected cost or quota consumption.

Content

Scanner excerpt · references/headless.md (reported line 95)May include surrounding context.

bash
agy models
agy -p "Reverse the string antigravity." --model gemini-3.8-flash-medium
agy -p "Outline a caching plan." --effort high
agy -p "Review this function for edge cases." --agent <agent-name>

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · references/troubleshooting.md (reported line 37)May include surrounding context.

Tokens use Apple Keychain, Linux secret-service over D-Bus, or Windows Credential Manager. Locked or headless failure:

text
Error: failed to retrieve token: secret keyring is locked

macOS: in Keychain Access, open the Antigravity CLI item and confirm Access Control allows agy. For headless SSH, set a 300-second auto-lock, unlock, then re-lock when finished:

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · references/troubleshooting.md (reported line 40)May include surrounding context.

Error: failed to retrieve token: secret keyring is locked

text

macOS: in Keychain Access, open the Antigravity CLI item and confirm Access Control allows `agy`. For headless SSH, set a 300-second auto-lock, unlock, then re-lock when finished:

```bash
security set-keychain-settings -l -u -t 300 ~/Library/Keychains/login.keychain-db

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · references/troubleshooting.md (reported line 43)May include surrounding context.

macOS: in Keychain Access, open the Antigravity CLI item and confirm Access Control allows agy. For headless SSH, set a 300-second auto-lock, unlock, then re-lock when finished:

bash
security set-keychain-settings -l -u -t 300 ~/Library/Keychains/login.keychain-db
security unlock-keychain ~/Library/Keychains/login.keychain-db
security lock-keychain ~/Library/Keychains/login.keychain-db

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · references/troubleshooting.md (reported line 43)May include surrounding context.

macOS: in Keychain Access, open the Antigravity CLI item and confirm Access Control allows agy. For headless SSH, set a 300-second auto-lock, unlock, then re-lock when finished:

bash
security set-keychain-settings -l -u -t 300 ~/Library/Keychains/login.keychain-db
security unlock-keychain ~/Library/Keychains/login.keychain-db
security lock-keychain ~/Library/Keychains/login.keychain-db

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · references/troubleshooting.md (reported line 43)May include surrounding context.

macOS: in Keychain Access, open the Antigravity CLI item and confirm Access Control allows agy. For headless SSH, set a 300-second auto-lock, unlock, then re-lock when finished:

bash
security set-keychain-settings -l -u -t 300 ~/Library/Keychains/login.keychain-db
security unlock-keychain ~/Library/Keychains/login.keychain-db
security lock-keychain ~/Library/Keychains/login.keychain-db

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · references/troubleshooting.md (reported line 44)May include surrounding context.

bash
security set-keychain-settings -l -u -t 300 ~/Library/Keychains/login.keychain-db
security unlock-keychain ~/Library/Keychains/login.keychain-db
security lock-keychain ~/Library/Keychains/login.keychain-db

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · references/troubleshooting.md (reported line 44)May include surrounding context.

bash
security set-keychain-settings -l -u -t 300 ~/Library/Keychains/login.keychain-db
security unlock-keychain ~/Library/Keychains/login.keychain-db
security lock-keychain ~/Library/Keychains/login.keychain-db

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · references/troubleshooting.md (reported line 44)May include surrounding context.

bash
security set-keychain-settings -l -u -t 300 ~/Library/Keychains/login.keychain-db
security unlock-keychain ~/Library/Keychains/login.keychain-db
security lock-keychain ~/Library/Keychains/login.keychain-db

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · references/troubleshooting.md (reported line 45)May include surrounding context.

bash
security set-keychain-settings -l -u -t 300 ~/Library/Keychains/login.keychain-db
security unlock-keychain ~/Library/Keychains/login.keychain-db
security lock-keychain ~/Library/Keychains/login.keychain-db

Linux: unlock GNOME Keyring or KWallet. Over SSH, start D-Bus and confirm the keyring daemon is running:

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · references/troubleshooting.md (reported line 45)May include surrounding context.

bash
security set-keychain-settings -l -u -t 300 ~/Library/Keychains/login.keychain-db
security unlock-keychain ~/Library/Keychains/login.keychain-db
security lock-keychain ~/Library/Keychains/login.keychain-db

Linux: unlock GNOME Keyring or KWallet. Over SSH, start D-Bus and confirm the keyring daemon is running:

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · references/troubleshooting.md (reported line 45)May include surrounding context.

bash
security set-keychain-settings -l -u -t 300 ~/Library/Keychains/login.keychain-db
security unlock-keychain ~/Library/Keychains/login.keychain-db
security lock-keychain ~/Library/Keychains/login.keychain-db

Linux: unlock GNOME Keyring or KWallet. Over SSH, start D-Bus and confirm the keyring daemon is running:

Self-Modification

High
Category
Rogue Agent
Confidence
90% confidence
Finding

Skill modifies its own code, configuration, or behavior at runtime. Self-modification enables an agent to escalate privileges, disable safety constraints, or install persistent backdoors.

Content

Scanner excerpt · references/troubleshooting.md (reported line 60)May include surrounding context.

md
`Ctrl+V` of a screenshot fails when the graphical clipboard is not forwarded. Use iTerm2 or Ghostty. In iTerm2: Preferences, General, Selection, allow terminal applications to access the clipboard (OSC 52 write). Inside tmux: `set -s set-clipboard on`.

## Self-updater

The updater is static and background. Under `~/.gemini/antigravity-cli/updater/`: `last_check.timestamp` is a 15-minute TTL, and `update.lock` is the advisory lock. A hung updater, a lock left after a crash, or a non-writable install dir blocks the next update.

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
89% confidence
Finding

The deletion is narrowly scoped, but the procedure does not establish that the updater lock is stale before removing it. Removing an active lock can undermine coordination and permit concurrent updater operations depending on the implementation, risking installation corruption; this overlaps with SQP-2 rather than representing a separate attack chain.

Content

Scanner excerpt · references/troubleshooting.md (reported line 70)May include surrounding context.

md
For this symptom, in order:

1. `rm -f ~/.gemini/antigravity-cli/updater/update.lock`
2. Set `AGY_CLI_DISABLE_AUTO_UPDATE=true` in the shell profile.
3. Confirm the user can write `~/.local/bin/` (Unix) or `%LOCALAPPDATA%\agy\bin` (Windows).

Installation instructions execute downloaded scripts without warning about remote code execution or system changes.

Medium
Category
Output Handling
Confidence
94% confidence
Finding

The installation examples execute remotely downloaded scripts without review, integrity verification, or an explicit warning about execution privileges and system changes. Installation is relevant to this skill, but a compromised distribution endpoint could cause arbitrary code execution with the user's privileges; this is an unsafe installation practice, not evidence of malicious intent.

Content

No source excerpt is available for this finding.

Autonomous Decision Making

Medium
Category
Excessive Agency
Confidence
85% confidence
Finding

Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.

Content

Scanner excerpt · references/command-reference.md (reported line 123)May include surrounding context.

md
| `--print-timeout` | `0s` | `0` waits for the turn. Local 1.4.12 default is `0s` |
| `--disable-slash-commands` | `false` | Print mode: leave slash commands and skills unexpanded |
| `--sandbox` | `false` | Terminal sandbox. v1.4.4+: no effect when sandbox is unavailable |
| `--dangerously-skip-permissions` | `false` | Auto-approve every tool. Skill workflow leaves this off unless the user accepts the risk |
| `--remote-control` | `false` | Remote Control on startup |
| `--project` | | Project ID or name |
| `--new-project` | `false` | Create a project for this session |

Autonomous Decision Making

Medium
Category
Excessive Agency
Confidence
75% confidence
Finding

Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.

Content

Scanner excerpt · references/headless.md (reported line 104)May include surrounding context.

md
An unknown `--model` does not fall back. The process exits non-zero with `status` `ERROR`.

Headless has no approval prompt. The settings permission mode applies. A tool that needs approval and cannot get it is soft-denied: the run continues, exits 0, and names the tool on stderr. Workspace file reads and writes are auto-allowed. Shell commands default to Ask and are soft-denied unless a rule allows them.

Grant a tool before the run with `permissions.allow` in `~/.gemini/antigravity-cli/settings.json`, using `action(target)` rules. Ask the user before adding a rule. Ask again before passing `--dangerously-skip-permissions`: it approves every tool call, including file writes and commands.

Updater recovery steps omit warnings about removing an active lock and persistently disabling automatic updates.

Medium
Category
Output Handling
Confidence
96% confidence
Finding

The recovery sequence deletes an updater lock without verifying that its owning process has exited, potentially allowing concurrent updates depending on the locking implementation. It also persistently disables automatic updates without a restoration step or alternative patching plan, which can leave the CLI missing security fixes. Limiting these actions to user-requested troubleshooting reduces unauthorized changes but does not address these risks.

Content

No source excerpt is available for this finding.

Session Persistence

Medium
Category
Rogue Agent
Confidence
60% confidence
Finding

Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.

Content

Scanner excerpt · references/troubleshooting.md (reported line 72)May include surrounding context.

md
1. `rm -f ~/.gemini/antigravity-cli/updater/update.lock`
2. Set `AGY_CLI_DISABLE_AUTO_UPDATE=true` in the shell profile.
3. Confirm the user can write `~/.local/bin/` (Unix) or `%LOCALAPPDATA%\agy\bin` (Windows).

Local `agy update` 1.4.12 accepts neither `-h` nor `--help`. It prints `Usage of update:` and exits.