Back to skill

Security audit

Google Workspace Cli

Security checks for vulnerabilities and agentic risk

Overview

The skill is a plausible Google Workspace automation helper, but it asks for broad account and command authority without clear enough scope or safeguards.

Install only if you intentionally want an agent to operate a Google Workspace account through a local CLI. Use a dedicated low-privilege Google account or narrowly scoped OAuth client, review every send/delete/clear operation, avoid noninteractive bulk actions until tested, verify the `gog` CLI source, and do not run it as administrator for ordinary permission errors.

Vulnerability Patterns
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
  • 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)

T05 · Unauthorized Access and Privilege Escalation

Warning
Location
SKILL.md:441
Finding

Unsafe Recommendation to Run Workspace CLI Operations with Administrator Privileges

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, line 441
Vulnerability Type: Excessive privilege recommendation
Risk Level: Medium

Complete Source Snippet (English translation):

markdown
| Insufficient permissions | The current user lacks read/write permissions | Check file permissions and run as administrator |

Technical Analysis

The troubleshooting guidance recommends running an operation as an administrator whenever the current user lacks read or write permissions. Routine Google Workspace CLI operations should not require operating-system administrator privileges. This recommendation violates the principle of least privilege because it does not first determine which resource requires access or grant only the narrowly required permission.

Elevating the operation would also elevate the externally installed gog executable, its subprocesses, command-line arguments, configuration processing, and local file operations. If the executable, dependency chain, input path, or processed file were compromised, the elevated context could turn a limited failure into a system-wide security incident.

Attack Path

  1. A gog operation or related file operation reports a permission error.
  2. The Agent follows the troubleshooting instruction at line 441.
  3. The Agent reruns the command or environment with administrator privileges.
  4. A compromised CLI dependency, malicious local executable, unsafe argument, or attacker-controlled file is processed in the elevated context.
  5. The malicious behavior accesses or modifies resources unavailable to the original user.

This exploitation path is conditional on an untrusted or compromised component being involved, but the documented privilege elevation substantially increases its potential impact.

Impact Assessment

Successful exploitation could provide privileges equivalent to the administrator account used to rerun the operation. Depending on the operatin ...[truncated 334 chars]

Remediation
View remediation

Remediation Suggestions

  • Remove the generic instruction to run commands as administrator.
  • Diagnose the exact resource, ownership, and permission responsible for the failure before changing access controls.
  • Run gog under a dedicated, non-privileged user account and use user-owned working and output directories.
  • Grant only the specific file or directory permission required for the operation.
  • Explicitly prohibit privilege elevation for routine Google Workspace operations.
  • Verify the provenance and integrity of the gog executable before use.
  • Restrict access to OAuth credentials and configuration files to the dedicated user account.
  • Require explicit operator approval and a documented justification if an exceptional maintenance action genuinely requires elevation.
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • 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
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
Findings (7)

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 206)May include surrounding context.

md
| Python 3.8+ | 运行时 | 推荐 | python.org 下载 |
| LLM API | API | 必需 | 由 Agent 内置 LLM 提供 |
### API Key 配置
5. 需在 Google Cloud Console 创建 OAuth 2.0 客户端 ID,下载 `client_secret.json`
6. 通过 `gog auth credentials /path/to/client_secret.json` 导入凭据
7. 需启用以下 API:Gmail API、Google Calendar API、Google Drive API、Google Sheets API、Google Docs API、Google People API(Contacts)
8. 首次使用打开浏览器完成 OAuth 授权,凭据本地加密存储

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 207)May include surrounding context.

md
| Python 3.8+ | 运行时 | 推荐 | python.org 下载 |
| LLM API | API | 必需 | 由 Agent 内置 LLM 提供 |
### API Key 配置
5. 需在 Google Cloud Console 创建 OAuth 2.0 客户端 ID,下载 `client_secret.json`
6. 通过 `gog auth credentials /path/to/client_secret.json` 导入凭据
7. 需启用以下 API:Gmail API、Google Calendar API、Google Drive API、Google Sheets API、Google Docs API、Google People API(Contacts)
8. 首次使用打开浏览器完成 OAuth 授权,凭据本地加密存储

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The manifest does not clearly distinguish when the skill should not activate, creating ambiguity around eligibility for common productivity requests. Because the skill has broad Google Workspace and exec-backed automation abilities, ambiguous routing can expose sensitive mail, files, calendars, or contacts when a more limited skill would have sufficed.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The manifest does not clearly distinguish when the skill should not activate, creating ambiguity around eligibility for common productivity requests. Because the skill has broad Google Workspace and exec-backed automation abilities, ambiguous routing can expose sensitive mail, files, calendars, or contacts when a more limited skill would have sufficed.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The description states '支持中文交互' and the document title/display name are Chinese-only, while the file does not offer an opt-in or alternative language behavior. This is a natural-language policy concern because it suggests a fixed language preference rather than adapting to the user's chosen language.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill claims command execution occurs in a 'safe sandbox', but the file only exposes direct exec/subprocess-driven workflows and does not document any actual sandboxing, isolation boundaries, permission restrictions, or command allowlisting. This can mislead operators into granting the skill more trust than warranted, increasing the likelihood of unsafe execution of filesystem or network-capable commands in the host environment.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
86% confidence
Finding

The core feature callout again presents Chinese interaction as part of the skill's default behavior and does not mention that users may choose another language. Repetition of a fixed-language assumption increases the chance that the skill will ignore user locale preferences.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.