Back to skill

Security audit

Google Workspace Toolkit Free

Security checks for vulnerabilities and agentic risk

Overview

This skill is not clearly malicious, but it should be reviewed carefully because it grants sensitive Google Workspace access through an unpinned external npm tool and has a mismatched SEO trigger.

Install only if you are comfortable granting this external tool access to Gmail, Calendar, and Drive data. Prefer a pinned, reviewed package version, verify the publisher and OAuth scopes, avoid granting write access unless needed, protect the local token directory, and know how to remove the registered service and revoke Google access.

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:94
Finding

Unpinned Third-Party Package Is Automatically Installed and Executed with Google Workspace Access

Content
View full analysis

Vulnerability Details

File Location: SKILL.md:94-101
Vulnerability Type: Unpinned and automatically executed third-party dependency
Risk Level: High

Vulnerable Code

bash
# Dependency installation
npm install -g @presto-ai/google-workspace-toolkit

# Register the tool service
gwtool config add google-workspace \
    --command "npx" \
    --arg "-y" \
    --arg "@presto-ai/google-workspace-toolkit" \
    --scope home

The same unpinned package registration pattern is repeated at SKILL.md:160-167 and SKILL.md:197-204.

Technical Analysis

The Skill directs users to globally install @presto-ai/google-workspace-toolkit without an exact version or integrity constraint. It then configures npx -y to execute that package automatically. Because no version is specified, future installations or invocations can resolve to a newer, materially different package release than the one originally reviewed.

The -y option suppresses the interactive installation confirmation normally presented by npx. The global installation also exposes the package installation lifecycle to the user's broader Node.js environment. No lockfile, package integrity hash, verified source revision, registry provenance requirement, or auditable implementation is included in the project.

This dependency operates in a security-sensitive context. According to the Skill documentation, it authenticates through Google OAuth, stores credentials under ~/.config/google-workspace-toolkit/, and can read or send Gmail messages, access calendars, and search or download Google Drive files. Consequently, compromise of the package publisher, npm account, release process, or resolved package version could place both OAuth credentials and Workspace data at risk.

Attack Path

  1. An attacker compromises the npm publisher account, release pipeline, or another component used to publish @presto-ai/google-workspace-toolkit.
  2. The ...[truncated 1935 chars]
Remediation
View remediation

Remediation Suggestions

  1. Pin the dependency to a reviewed, immutable version, for example:

    bash
    npm install -g @presto-ai/google-workspace-toolkit@1.2.3
    

    The selected version must be independently reviewed before publication of the Skill.

  2. Include and enforce a lockfile where the deployment model permits it. Record and verify the package tarball integrity hash rather than relying only on a mutable version tag.

  3. Remove npx -y from persistent tool registration. Install the reviewed package explicitly and configure the tool to execute the pinned local binary without allowing automatic downloads.

  4. Avoid global installation. Run the dependency from a dedicated project directory, isolated environment, container, or restricted operating-system account.

  5. Publish or reference auditable source code and a specific source revision corresponding to the distributed npm package. Enable npm provenance and verify package signatures or attestations in the installation workflow.

  6. Request only the minimum OAuth scopes required for each operation. Separate read-only capabilities from write capabilities such as sending email or creating events, and clearly display requested scopes before authorization.

  7. Protect stored credentials with restrictive filesystem permissions and operating-system credential storage where available. Do not keep refresh tokens in broadly readable plaintext files.

  8. Add dependency monitoring, publisher account multi-factor authentication, release approval controls, and automated alerts for ownership, version, integrity, or provenance changes.

  9. Document a response procedure for dependency compromise, including revoking Google OAuth grants, deleting local credentials, invalidating refresh tokens, removing the registered service, and reinstalling only a verified release.

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 (9)

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

md
- 无需创建 Google Cloud 项目
- 无需逐个启用 API
- 无需创建 OAuth 凭据
- 无需下载 client_secret.json
- 无需配置回调地址
- 只需 Google 账号登录授权

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

md
- 无需创建 Google Cloud 项目
- 无需逐个启用 API
- 无需创建 OAuth 凭据
- 无需下载 client_secret.json
- 无需配置回调地址
- 只需 Google 账号登录授权

Intent-Code Divergence

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

The trigger condition directs the skill toward SEO, ranking, and traffic-optimization tasks that are unrelated to its stated Google Workspace purpose. In an agent ecosystem, mismatched triggers can cause this skill to activate in unintended contexts, potentially leading an agent to request Gmail, Calendar, or Drive access when the user asked about something else.

Content

No source excerpt is available for this finding.

Vague Triggers

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

An overly broad and unrelated trigger condition increases the chance of unsafe skill routing. Because this skill can access sensitive Google Workspace data, accidental invocation outside its intended office-productivity domain could expose private mail, calendars, or files to workflows that do not require them.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The skill promotes 'OAuth login and immediate use' for Gmail, Calendar, and Drive without clearly warning that these permissions expose highly sensitive personal or business data. In this context, the lack of privacy and consent warnings is more dangerous because the skill is specifically designed to obtain broad access to communications, schedules, and documents.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The manifest description says the skill supports core Gmail, Calendar, and Drive tool calls, which suggests a bounded set of workspace operations. However, the documentation also exposes separate auth.refreshToken and auth.clear tool operations, extending behavior into credential lifecycle management beyond the stated service/tool scope.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The file states that OAuth credentials are stored locally but does not warn users to protect those token files or restrict filesystem permissions. If those tokens are readable by other local users, backup systems, malware, or copied across machines, an attacker may gain persistent access to the user's Google Workspace data without re-consent.

Content

No source excerpt is available for this finding.

File System Enumeration

Medium
Category
Data Exfiltration
Confidence
60% confidence
Finding

Code scans file system directories looking for sensitive files. This could be reconnaissance for credential theft.

Content

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

~/.config/google-workspace-toolkit/

查看凭据文件

ls -la ~/.config/google-workspace-toolkit/

text

### 脚本化调用示例

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The FAQ states the free version supports 10 tools across Gmail, Calendar, and Drive only. Elsewhere, the file explicitly documents auth.refreshToken and auth.clear, indicating more callable operations than the claimed free-version tool set.

Content

No source excerpt is available for this finding.