Back to skill

Security audit

Google Maps Skill

Security checks for vulnerabilities and agentic risk

Overview

The skill is a coherent Google Maps command-line integration, but it can expose the configured Google Maps API key in error output under some failure conditions.

Review before installing. Use only a restricted Google Maps API key with tight API, quota, billing, and application restrictions, avoid sensitive personal location queries unless you intend to send them to Google, and treat terminal or agent logs from failed runs as potentially containing the key until the URL-redaction issue is fixed.

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
scripts/lib/http.ts:75
Finding

Google Maps API Key Disclosure Through JSON Parsing Error Output

Content
View full analysis
= {}; let requestParams: Record | undefined = params; if (command.auth === "query") { requestParams = { ...params, key: apiKey }; } else { headers["X-Goog-Api-Key"] = apiKey; } ``` `scripts/lib/http.ts:38-42`: ```ts const timeoutMs = request.timeoutMs ?? DEFAULT_TIMEOUT_MS; const retries = request.retries ?? DEFAULT_RETRY_COUNT; const fullUrl = request.method === "GET" ? buildUrlWithParams(request.url, request.params) : request.url; ``` `scripts/lib/http.ts:68-79`: ```ts const response = await fetch(fullUrl, fetchOptions); clearTimeout(timer); let payload: unknown; try { payload = await response.json(); } catch (jsonError) { throw new CliError( `Failed to parse JSON response from ${fullUrl}: ${toErrorMessage(jsonError)}`, ExitCode.NETWORK, { cause: jsonError }, ); } ``` `scripts/gmaps.ts:125-132`: ```ts void main().catch((error: unknown) => { if (error instanceof CliError) { if (error.rawResponse !== undefined) { printJson(error.rawResponse); } else { process.stderr.write(`${error.message}\n`); } process.exit(error.exitCode); ``` ### Technical Analysis Legacy GET-based commands, including geocoding, reverse geocoding, elevation, and timezone operations, authenticate by adding `GOOGLE_MAPS_API_KEY` to the request query parameters. The HTTP layer then constructs `fullUrl`, which consequently contains the plaintext API key in a `key` query parameter. If the server response cannot be parsed as JSON, the exception message includes the entire `fullUrl`. The top-level CLI error handler writes this message directly to st ...[truncated 2159 chars]
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Behavioral ASTexec() Call, eval() Call, Dynamic Import
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (7)

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
2. Run `bun scripts/gmaps.ts --help` in this skill directory.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
93% confidence
Finding

The skill declares no explicit tool scope or permissions even though its documented operation requires environment access for GOOGLE_MAPS_API_KEY and outbound network access to Google Maps APIs. This creates an authorization and review gap: the skill can use sensitive capabilities without clear upfront constraints, making misuse or accidental overreach harder to detect.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The description uses broad trigger phrases such as "Google Maps 查询", "国际路线规划", and "地点搜索" without clear boundaries, which can cause the agent to invoke the skill in overly broad situations. Over-triggering can unnecessarily expose API credentials and send user-provided location queries to an external service when a less-privileged or offline response would suffice.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The quick start instructs operators to set GOOGLE_MAPS_API_KEY and run a script, but gives no warning about secure credential handling, key scoping, or the fact that user queries and coordinates will be transmitted to an external API. This increases the risk of accidental secret exposure, overprivileged API keys, and privacy issues involving sensitive location data.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

This command posts user-supplied textQuery and optional latitude/longitude data to the Google Places API, which is a network transmission of potentially sensitive user data. The file contains no confirmation prompt, logging, comment, or other user-facing disclosure warning about that external transmission.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
83% confidence
Finding

This command sends user-supplied location data to the Google Routes API via a POST request, which is a network operation involving potentially sensitive travel information. In this file, there is no confirmation prompt, user-facing log/print, or comment/docstring warning that the entered addresses will be transmitted to an external service.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
83% confidence
Finding

This code copies all of process.env into a child process and then launches the CLI with Bun.spawn. Although this is test code, it still propagates potentially sensitive environment variables and performs subprocess execution without any nearby comment or disclosure describing that behavior.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.