Back to skill

Security audit

Antigravity Balance

Security checks for vulnerabilities and agentic risk

Overview

This skill is purpose-built to show Antigravity quota data, but it handles a local CSRF token in ways that could expose it.

Install only if you are comfortable with a script inspecting local Antigravity process arguments and using a CSRF token to query the local language-server API. Avoid verbose mode because it may print sensitive command-line data, and prefer a version that uses an official or better-scoped API and validates the local endpoint before sending credentials.

Vulnerability Patterns
  • Insecure Skill Coding PracticesFinds exploitable flaws such as hardcoded secrets or command injection
  • 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
Findings (2)

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/agquota.js:96
Finding

Verbose Logging Discloses the Antigravity CSRF Token

Content
View full analysis
l.trim()); const antigravityLine = lines.find(l => /--app_data_dir\s+antigravity\b/i.test(l)); if (!antigravityLine) { error('Found language_server but it\'s not an Antigravity instance'); } log(`Antigravity line: ${antigravityLine}`); ``` ### Technical Analysis The script obtains the complete command line of the Antigravity language-server process. According to the subsequent parsing logic, that command line contains sensitive connection information, including the `--csrf_token` argument. When `-v` or `--verbose` is enabled, the `log` function writes both the complete process-list output and the selected Antigravity command line to standard error. Although a later message only logs the first eight token characters, these earlier messages disclose the complete token. Diagnostic output may be captured by terminal history systems, CI/CD logs, agent execution transcripts, support bundles, monitoring tools, or parent processes that collect standard error. The token is therefore exposed beyond the process that legitimately needs it. ### Attack Path 1. A user, automation system, or AI agent invokes the Skill with `-v` or `--verbose`. 2. The script runs `ps` or PowerShell and retrieves the full language-server command line. 3. The command line includes the `--csrf_token` value. 4. The raw command line is written to standard error without redaction. 5. An attacker or lower-trust service with access to captured logs extracts the token. 6. While the token and language-server instance remain valid, the attacker can use it to authenticate requests to the local Antigravity API. ### Impact Assessment Successful exploitati ...[truncated 519 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/agquota.js:123
Finding

Local Port Discovery Sends a Secret Token to Unauthenticated Services

Content
View full analysis
{ const req = https.request({ hostname: '127.0.0.1', port: port, path: '/exa.language_server_pb.LanguageServerService/GetUnleashData', method: 'POST', headers: { 'Content-Type': 'application/json', 'Connect-Protocol-Version': '1', 'X-Codeium-Csrf-Token': token }, rejectUnauthorized: false, timeout: 2000 }, res => { resolve(res.statusCode === 200); }); req.on('error', () => resolve(false)); req.on('timeout', () => { req.destroy(); resolve(false); }); req.write(JSON.stringify({ wrapper_data: {} })); req.end(); }); } ``` ### Technical Analysis The script discovers the API endpoint by probing ports surrounding the extension-server port. Every probe includes the genuine Antigravity ...[truncated 2471 chars]
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • 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
Findings (6)

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 14)May include surrounding context.

md
node scripts/agquota.js

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 17)May include surrounding context.

md
node scripts/agquota.js

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 20)May include surrounding context.

md
node scripts/agquota.js

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The skill explicitly describes extracting a CSRF token from another local process's command-line arguments and then using it to authenticate requests to a localhost HTTPS endpoint. Even though the target is local, process arguments and bearer-like tokens are sensitive metadata; documenting and automating their use without user warning, scope limits, or trust checks can normalize credential scraping and enable unauthorized access to local privileged services.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The script enumerates local processes, extracts a CSRF token from the Antigravity language server command line, and reuses that bearer-like secret to access local privileged API endpoints. Even though the target is localhost, this bypasses normal user awareness and consent boundaries and could expose account details or enable unintended interaction with the local service if the pattern is reused or extended.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
96% confidence
Finding

Line L363 sets locale: 'en' in natural-language request metadata. This forces a specific locale without any visible opt-in, configurability, or justification, which matches the language/locale policy violation criteria.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.