T09 · Insecure Skill Coding Practices
- 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
