Back to skill

Security audit

Gmail Bridge

Security checks for vulnerabilities and agentic risk

Overview

This skill is mostly transparent about connecting to Google Workspace, but it exposes sensitive account data and write actions through a loosely scoped local bridge.

Review this before installing if your Google Workspace account contains sensitive mail, files, sheets, or calendar data. Only use it with a trusted local bridge, avoid setting GMAIL_BRIDGE_URL to non-local destinations, rotate BRIDGE_SECRET if it may have been exposed, and require explicit user approval before running write or create operations.

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

T09 · Insecure Skill Coding Practices

Warning
Location
run.sh:4
Finding

Bridge secret and Workspace data can be transmitted to an arbitrary endpoint

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
run.sh:91
Finding

Unescaped arguments permit JSON structure injection in Sheets write requests

Content
View full analysis
Remediation
View remediation
/dev/null; then echo "values_json must be a valid JSON array" >&2 exit 2 fi request_body="$( jq -nc \ --arg spreadsheetId "${spreadsheetId}" \ --arg range "${range}" \ --argjson values "${values_json}" \ '{ spreadsheetId: $spreadsheetId, range: $range, values: $values, valueInputOption: "USER_ENTERED" }' )" curl -sS "${hdrs[@]}" -X POST "${BASE_URL}/sheets/set" \ -H "Content-Type: application/json" \ --data-binary "${request_body}" | jq -C . ``` Additionally: 1. Validate spreadsheet identifiers against the expected identifier syntax. 2. Validate range expressions against an accepted A1-notation format or allowlist. 3. Require `values_json` to be an array of arrays and enforce reasonable row, column, and payload-size limits. 4. Enforce an equivalent strict schema on the bridge server; client-side validation must not be the only security boundary. 5. Consider whether `RAW` should be used instead of `USER_ENTERED` when formula interpretation is not explicitly required. ]]>
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (6)

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
93% confidence
Finding

The skill exposes shell-based access to a local API that can read emails, search Drive, read/write Sheets, create calendar events, and forward email, but it declares no explicit tool scope or permission boundary. Without an allowlist or permission declaration, an agent may invoke these commands more broadly than intended, increasing the risk of unauthorized access, data exfiltration, or state-changing actions on the user's Google Workspace data.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The skill documents state-changing operations like forwarding email, writing spreadsheet ranges, and creating calendar events without any explicit warning or confirmation requirement. In an agent setting, this can lead to accidental data modification or exfiltration if a user request is ambiguous or if the agent over-executes a task using the provided shell commands.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The sheets-set command performs a write operation to a Google Sheet via POST, which can modify user data, but the script provides no confirmation prompt, warning message, or user-facing disclosure at the point of execution. In this file, the usage text describes the command syntactically but does not warn that it changes remote data.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
86% confidence
Finding

The script transmits spreadsheet modification data to a local HTTP service and constructs the JSON body by directly interpolating unescaped shell variables such as spreadsheetId and range. If those values contain quotes or crafted content, the request body can be malformed or manipulated, potentially causing unintended writes or parameter injection into the bridge API; additionally, the bridge uses plaintext HTTP and an optional secret, so any local compromise or rogue local service could abuse these high-privilege operations.

Content

Scanner excerpt · run.sh (reported line 90)May include surrounding context.

sh
range="${2:-}"
    values_json="${3:-}"
    if [[ -z "${spreadsheetId}" || -z "${range}" || -z "${values_json}" ]]; then usage; exit 2; fi
    curl -sS "${hdrs[@]}" -X POST "${BASE_URL}/sheets/set" \
      -H "Content-Type: application/json" \
      -d "{\"spreadsheetId\":\"${spreadsheetId}\",\"range\":\"${range}\",\"values\":${values_json},\"valueInputOption\":\"USER_ENTERED\"}" \
      | eval "${jq_pretty}"

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The cal-create command issues a POST request that creates a calendar event, which changes user data in an external system, but the script contains no confirmation prompt or explicit warning before performing the action. The operation is not accompanied by a visible disclosure in this file that it will create a persistent calendar entry.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
72% confidence
Finding

This command sends calendar event creation data to a local bridge that can modify a user's Google Workspace data, which is sensitive capability exposure. Although the JSON body is safely assembled with jq, the operation still relies on a local HTTP endpoint with optional authentication, so a misconfigured or spoofed local service could receive or perform unintended privileged actions.

Content

Scanner excerpt · run.sh (reported line 117)May include surrounding context.

sh
if [[ -z "${summary}" || -z "${startISO}" || -z "${endISO}" ]]; then usage; exit 2; fi

    curl -sS "${hdrs[@]}" -X POST "${BASE_URL}/calendar/create" \
      -H "Content-Type: application/json" \
      -d "$(jq -nc \
        --arg summary "${summary}" \