Back to skill

Security audit

cs-gog

Security checks for vulnerabilities and agentic risk

Overview

This skill is a coherent Google Workspace CLI helper, but it asks users to install an unpinned third-party tool and grant broad Google account access that can read and change sensitive data.

Review before installing. Use the least Google services needed instead of authorizing all six by default, prefer a dedicated low-privilege account where possible, verify the gog CLI source and release provenance, and require explicit confirmation before sending email, creating events, or changing or clearing cloud data.

Vulnerability Patterns
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • 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 (1)

T08 · Insecure Dependencies

Warning
Location
SKILL.md:5
Finding
Unpinned Third-Party CLI Receives Broad Google Workspace OAuth Access## Vulnerability Details **File Location**: `SKILL.md`, lines 5–14 **Vulnerability Type**: Unpinned third-party dependency with access to sensitive OAuth credentials **Risk Level**: Medium ```yaml metadata: {"clawdbot":{"emoji":"🎮","requires":{"bins":["gog"]},"install":[{"id":"brew","kind":"brew","formula":"steipete/tap/gogcli","bins":["gog"],"label":"Install gog (brew)"}]}} --- # gog Use `gog` for Gmail/Calendar/Drive/Contacts/Sheets/Docs. Requires OAuth setup. Setup (once) - `gog auth credentials /path/to/client_secret.json` - `gog auth add you@gmail.com --services gmail,calendar,drive,contacts,sheets,docs` ``` ### Technical Analysis The skill installs `gog` from the third-party Homebrew tap `steipete/tap/gogcli` without specifying an immutable version, source commit, cryptographic digest, or signature-verification requirement. Consequently, the executable installed later may differ from the version that was originally reviewed. The same executable is instructed to process a Google OAuth client-secret file and obtain authorization for Gmail, Calendar, Drive, Contacts, Sheets, and Docs. This coupling increases the supply-chain impact: a compromised tap, formula, upstream release artifact, or maintainer account could deliver a modified executable that receives valuable credentials and cloud-service permissions. No evidence establishes that the current package is malicious. The vulnerability is the absence of dependency pinning and integrity controls around an externally maintained executable that is granted broad access. The project contains no bundled implementation of `gog`, so its runtime behavior cannot be verified from the audited files. ### Attack Path 1. An attacker compromises the Homebrew tap, its maintainer account, the referenced upstream release location, or another component of the package-distribution path. 2. The attacker publishes a modified `gogcli` formula or substitutes a malicious release artif ...[truncated 1251 chars]
Remediation
## Remediation Suggestions 1. Pin the dependency to a reviewed, immutable release rather than relying on a mutable formula reference. 2. Verify the downloaded artifact with a publisher-provided signature or a trusted SHA-256 digest before installation. 3. Record the authoritative source repository, reviewed release version, expected digest, and verification procedure in the skill metadata or installation documentation. 4. Prefer an installation mechanism that fails closed when the expected version or digest does not match. 5. Request only the Google service scopes required for the immediate task instead of authorizing all six services by default. 6. Use a dedicated, least-privileged Google account where practical, and apply Workspace administrative restrictions to third-party OAuth applications. 7. Protect client-secret files and OAuth tokens with restrictive filesystem permissions, and document secure revocation and rotation procedures. 8. Require explicit user confirmation for every externally visible or destructive operation, including sending email, creating events, updating sheets, clearing ranges, and modifying cloud content. 9. Periodically review the external CLI's source, release provenance, OAuth scope behavior, and dependency chain before updating the approved version.
Vulnerability Patterns
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
Findings (1)

Credential Access

High
Category
Privilege Escalation
Content
Use `gog` for Gmail/Calendar/Drive/Contacts/Sheets/Docs. Requires OAuth setup.

Setup (once)
- `gog auth credentials /path/to/client_secret.json`
- `gog auth add you@gmail.com --services gmail,calendar,drive,contacts,sheets,docs`
- `gog auth list`
Confidence
70% confidence
Finding
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Static analysis

No suspicious patterns detected.