Back to skill

Security audit

Google Workspace Cli Free

Security checks for vulnerabilities and agentic risk

Overview

This Google Workspace skill is mostly coherent, but it asks users to grant Gmail, Calendar, and Drive access to an unspecified `gog` command-line tool before the tool’s provenance is established.

Install only if you can independently verify the exact `gog` CLI source, publisher, and version. Use least-privilege Google OAuth scopes where possible, avoid granting send access unless needed, review every email before sending, and confirm how tokens are stored and revoked before importing credentials.

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

Error
Location
SKILL.md:123
Finding

Unverified Security-Sensitive CLI Dependency

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, line 123; dependency and credential-handling documentation at lines 283–290
Vulnerability Type: Unverified third-party executable with access to OAuth credentials and Google Workspace services
Risk Level: High

Vulnerable command at line 123:

bash
gog auth credentials /path/to/client_secret.json

Technical Analysis

The Skill requires the external gog executable but does not identify an official repository, verified publisher, exact package identifier, pinned version, checksum, or digital-signature verification procedure. Lines 283–290 only direct users to obtain the CLI through an unspecified package manager and then use it to import a Google OAuth client-secret file.

This creates a supply-chain trust gap. Multiple unrelated or malicious packages can use the same executable or package name, and an attacker-controlled executable earlier in the system PATH could also impersonate the expected tool. Because the CLI participates in OAuth authorization and requests Gmail, Calendar, and Drive access, substituting the executable could expose credentials and authorized Workspace data.

The documentation states that credentials are stored locally in encrypted form, but it does not identify the storage implementation, encryption mechanism, key management, file permissions, or token revocation procedure. Therefore, this assertion cannot compensate for the missing dependency provenance and verification controls.

Attack Path

  1. An attacker publishes a malicious or typo-squatted package that installs an executable named gog, or places a spoofed gog executable earlier in the victim's PATH.
  2. The user or Agent follows the Skill's unspecified package-manager installation guidance without verifying the package publisher, source, version, signature, or checksum.
  3. The user executes:
    bash
    gog auth credentials /path/to/client_secret.json
    

...[truncated 1632 chars]

Remediation
View remediation

Remediation Suggestions

  1. Identify the dependency unambiguously:

    • Provide the official project name, repository URL, publisher, and package-registry namespace.
    • Document the exact package identifier separately for every supported package manager.
    • Avoid relying only on a short executable name such as gog.
  2. Pin and verify the dependency:

    • Pin an audited version rather than installing the latest mutable release.
    • Publish expected cryptographic checksums for downloadable artifacts.
    • Require package or artifact signature verification when supported.
    • Document how users can verify the publisher and release provenance.
  3. Defend against executable spoofing:

    • Resolve the executable path before the first credential operation.
    • Verify that the resolved path belongs to the expected installed package.
    • Reject execution from untrusted or user-writable directories.
    • Where practical, invoke a verified absolute executable path rather than relying on PATH.
  4. Minimize OAuth exposure:

    • Request only the scopes required for the specific operation.
    • Separate read-only authorization from email-send authorization.
    • Display the requested scopes and require explicit user approval before authorization.
    • Document how users can inspect and revoke granted access.
  5. Harden credential storage:

    • Specify the token-storage location, encryption implementation, key-management mechanism, and required file permissions.
    • Prefer an operating-system credential vault or keychain over application-managed plaintext files.
    • Never print client secrets, access tokens, or refresh tokens in command output or Agent logs.
    • Provide a secure credential-removal and token-revocation command.
  6. Add a preflight verification step before gog auth credentials that confirms the executable version, publisher, installation source, resolved path, and artifact integrity. Abort credenti ...[truncated 38 chars]

Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (8)

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 · SKILL.md (reported line 123)May include surrounding context.

bash
# 配置OAuth凭据(一次性操作)
gog auth credentials /path/to/client_secret.json

# 添加账户并授权所需服务
gog auth add you@gmail.com --services gmail,calendar,drive

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 · SKILL.md (reported line 288)May include surrounding context.

bash
# 配置OAuth凭据(一次性操作)
gog auth credentials /path/to/client_secret.json

# 添加账户并授权所需服务
gog auth add you@gmail.com --services gmail,calendar,drive

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 · SKILL.md (reported line 289)May include surrounding context.

bash
# 配置OAuth凭据(一次性操作)
gog auth credentials /path/to/client_secret.json

# 添加账户并授权所需服务
gog auth add you@gmail.com --services gmail,calendar,drive

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The skill documents sensitive operations such as sending email and importing OAuth credentials without prominent warnings about external side effects, account access, or data exposure. In an agent environment, users may not realize these actions can modify external systems or ingest secrets, which raises the risk of unintended account compromise, privacy loss, or unauthorized outbound communication.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill claims to be a lightweight Google Workspace tool, but its capability scope is expanded with unrelated SEO and keyword-ranking scenarios. That mismatch can cause the agent to invoke the skill in unintended contexts, increasing the chance of unauthorized command execution or misuse of granted Gmail/Drive/Calendar access outside the user's expected purpose.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The trigger scope is overly broad and includes vague scenario keywords rather than precise activation conditions. In an agent setting with exec permission, broad matching can lead to accidental or adversarial invocation in contexts unrelated to Google Workspace, causing sensitive actions like email sending, credential handling, or data retrieval to occur unexpectedly.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
82% confidence
Finding

文件的名称、描述、示例和操作说明均固定为中文,没有说明这是面向特定中文区域的限定技能,也未向用户提供语言/locale 选择。根据语言/locale 政策,若无明确地区性理由或用户 opt-in,这种单一语言强制可能构成自然语言策略问题。

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Low
Category
Not specified by scanner
Confidence
86% confidence
Finding

Earlier Calendar sections only describe read-oriented functionality such as event queries and listing events. Line L208 advises extra caution for '事件创建' operations, which contradicts the documented free-version scope by implying calendar creation features that were not declared elsewhere.

Content

No source excerpt is available for this finding.