Back to skill

Security audit

google-sheets-connect

Security checks for vulnerabilities and agentic risk

Overview

ClawScan rates this skill suspicious because its formatting command can bypass deletion safeguards and perform destructive spreadsheet changes beyond the described formatting task.

Consider the destructive spreadsheet and Drive capabilities before installing. The scanner analysis is partial: it inspected all listed components, but some local references were unresolved, so the evidence is incomplete. The verdict is suspicious, which means the scanners found meaningful risks; it does not establish malicious intent.

Vulnerability Patterns
  • Insecure Skill Coding PracticesFinds exploitable flaws such as hardcoded secrets or command injection
  • 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)

T09 · Insecure Skill Coding Practices

Warning
Location
.
Finding

Formatting command bypasses the explicit tab-deletion gate

Content
View full analysis

Impact

An existing tab and its contents can be deleted through a nominal formatting operation without the required deletion authorization flag.

Vulnerability Patterns
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Rogue AgentSelf-Modification, Session Persistence
  • Taint TrackingDirect Taint Flow, Variable-Mediated Taint Flow, Credential Exfiltration Chain
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
Findings (10)

Tainted flow: 'req' from os.environ.get (line 71, credential/environment) → urllib.request.urlopen (network output)

Critical
Category
Data Flow
Confidence
90% confidence
Finding

Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.

Content

Scanner excerpt · scripts/gdrive_connect.py (reported line 75)May include surrounding context.

python
url, data=body, headers={"Content-Type": "application/x-www-form-urlencoded"}
    )
    try:
        with urllib.request.urlopen(req, timeout=timeout) as r:
            return json.loads(r.read().decode() or "{}"), None
    except urllib.error.HTTPError as e:
        raw = e.read().decode(errors="replace")

Tainted flow: 'req' from os.environ.get (line 88, credential/environment) → urllib.request.urlopen (network output)

Critical
Category
Data Flow
Confidence
90% confidence
Finding

Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.

Content

Scanner excerpt · scripts/gdrive_connect.py (reported line 90)May include surrounding context.

python
def http_get_json(url, token, timeout=30):
    req = urllib.request.Request(url, headers={"Authorization": "Bearer " + token})
    try:
        with urllib.request.urlopen(req, timeout=timeout) as r:
            return json.loads(r.read().decode() or "{}"), None
    except urllib.error.HTTPError as e:
        raw = e.read().decode(errors="replace")

Tainted flow: 'req' from os.environ.get (line 65, credential/environment) → urllib.request.urlopen (network output)

Critical
Category
Data Flow
Confidence
90% confidence
Finding

Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.

Content

Scanner excerpt · scripts/gdrive_ops.py (reported line 70)May include surrounding context.

python
headers={"Content-Type": "application/x-www-form-urlencoded"},
    )
    try:
        with urllib.request.urlopen(req, timeout=30) as r:
            res = json.loads(r.read().decode())
    except urllib.error.HTTPError as e:
        out(f"❌ Refresh token thất bại (HTTP {e.code}): {e.read().decode(errors='replace')[:300]}")

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The substantive issue is that the advertised formatting command accepts unrestricted Sheets batchUpdate requests, allowing destructive operations such as deleteSheet without the promised deletion confirmation. Listing, reading, and explicit deletion are otherwise documented in the skill, and OAuth connection is implemented separately, so those portions of the mismatch finding are not independently suspicious.

Content

No source excerpt is available for this finding.

The format command bypasses the documented deletion-confirmation requirement.

High
Category
Excessive Agency
Confidence
100% confidence
Finding

cmd_format forwards arbitrary JSON requests directly to Sheets batchUpdate without calling the deletion guard or restricting operation types. A caller can submit deleteSheet, deleteDimension, or content-changing requests under the guise of formatting, destroying spreadsheet data without the documented confirmation.

Content

No source excerpt is available for this finding.

Skill declares no tool scope ('permissions' or 'allowed-tools') but code capabilities were detected: env, file_write, network, shell.

Medium
Category
MCP Least Privilege
Confidence
70% confidence
Finding

Without declared permissions the skill's intent is opaque and cannot be validated.

Content

No source excerpt is available for this finding.

Session Persistence

Medium
Category
Rogue Agent
Confidence
60% confidence
Finding

Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.

Content

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

  1. APIs & Services → Credentials → Create credentials → OAuth client ID → Desktop app → copy về 2 mã: Client ID và Client Secret (ô thứ hai).
  2. Lưu 2 mã đó vào tệp ngoài repo, quyền 600:
bash
mkdir -p ~/.config/gdrive-connect && chmod 700 ~/.config/gdrive-connect
printf '{"client_id":"<CLIENT_ID>","client_sec":"<MA_THU_HAI>"}' > ~/.config/gdrive-connect/app.json
chmod 600 ~/.config/gdrive-connect/app.json

The advertised create/write/format Sheets test is never performed.

Medium
Category
Excessive Agency
Confidence
99% confidence
Finding

The manifest promises that authorization is followed by testing creation, writing, and formatting of a real Google Sheet. At L188–L207, the completion flow only saves credentials, retrieves Drive account metadata, and returns success; no command in this file performs the promised Sheets operations. Consequently, successful completion does not establish that the advertised editing capabilities actually work.

Content

No source excerpt is available for this finding.

The skill can permanently delete arbitrary Drive files, beyond its stated connection and Sheet-testing purpose.

Medium
Category
Excessive Agency
Confidence
91% confidence
Finding

The manifest describes connecting a Google account and testing Sheet creation, writing, and formatting. At L282-L290, the delete command instead accepts an arbitrary file ID and invokes Drive's permanent-delete endpoint, without restricting deletion to Sheets or resources created by the connection test; the confirmation requirement does not limit this capability's scope.

Content

No source excerpt is available for this finding.

Self-test deletes resources without the confirmation required by the module's safety rules.

Medium
Category
Excessive Agency
Confidence
100% confidence
Finding

The safety rule at L020-L021 says deletion runs only with --yes or GDRIVE_ALLOW_DELETE=1. Self-test unconditionally issues two DELETE requests at L360-L362 without calling _need_delete_ok, and its parser at L423-L424 does not offer --yes; although the resources are test-created, this still directly contradicts the stated universal deletion safeguard.

Content

No source excerpt is available for this finding.