Back to skill

Security audit

Amap Lbs Skill

Security checks for vulnerabilities and agentic risk

Overview

The skill is mostly a Gaode Maps helper, but it ships a plaintext API key and has several under-scoped data-handling risks users should review before installing.

Review this skill before installing. Treat the bundled Amap key as compromised, remove or revoke it, and prefer using your own AMAP_WEBSERVICE_KEY from the environment. Avoid feeding private or signed dataset URLs into the heatmap feature unless the generated link uses HTTPS and you are comfortable with URL logging. Use the Python Electron bridge only on a trusted local machine where other users cannot spoof the /tmp socket.

Vulnerability Patterns
  • Tool Hijacking and SpoofingModifies or replaces tools so legitimate-looking calls execute attacker logic
  • 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
Findings (3)

T09 · Insecure Skill Coding Practices

Error
Location
config.json:1
Finding

Committed Amap API Credential

Content
View full analysis
Remediation
View remediation

T07 · Tool Hijacking and Spoofing

Warning
Location
gaode_skill.py:20
Finding

Predictable and Unauthenticated Unix Socket Permits Local Service Spoofing

Content
View full analysis
dict: """ Connect to the Electron application's Unix Domain Socket, send a command, and wait for the result. """ if not os.path.exists(SOCKET_PATH): raise FileNotFoundError( f"Socket file does not exist: {SOCKET_PATH}\n" "Start the Amap Electron application first." ) client_socket = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM) client_socket.settimeout(SOCKET_TIMEOUT_SECONDS) try: client_socket.connect(SOCKET_PATH) message = json.dumps(command_payload, ensure_ascii=False) + "\n" client_socket.sendall(message.encode("utf-8")) response_buffer = "" while True: chunk = client_socket.recv(4096) if not chunk: break response_buffer += chunk.decode("utf-8") if "\n" in response_buffer: break response_line = response_buffer.split("\n")[0].strip() if not response_line: raise ConnectionError("Received an empty response") return json.loads(response_line) ``` The English comments and messages above describe the original logic without changing the relevant executable statements. ### Technical Analysis The client connects to a fixed socket path under the shared `/tmp` directory and treats whichever process owns that path as the legitimate Electron application. The existence check verifies only that an object is present; it does not verify that the object is a Unix socket, that it is owned by the expected user, that its permissions are restrictive, or ...[truncated 2173 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
SKILL.md:241
Finding

Heatmap Workflow Places User-Supplied Data URLs in Plaintext HTTP Requests

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
Findings (20)

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

声明描述的是“综合服务”,涵盖 POI 搜索、路径规划、旅游规划、周边搜索和热力图可视化等多项能力;但代码只实现了 direction 和 search 两个命令,并通过 /tmp/jsapi-electron.sock 与本地 Electron 应用通信。虽然路径规划与 POI 搜索基本匹配,且“周边搜索”可部分通过自由关键词搜索间接实现,但代码中没有专门的旅游规划或热力图数据可视化逻辑,因此声明明显夸大了实际能力范围。此外,代码的实际运行形态是本地 CLI 到 Electron 地图应用的 socket 桥接器,这一关键行为和资源依赖也未在声明中体现。综合判断为描述与实际行为不完全一致,属于能力过度声明型 mismatch。

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding

整体上,这段代码确实与高德地图服务相关,并实现了 POI 搜索与多种路径规划,主用途大体一致;但声明中列出的关键能力有明显缺失。首先,没有看到周边搜索常见的按中心点/半径调用专门周边检索接口的实现。其次,所谓“热力图数据可视化”没有对应逻辑,只有一个生成 travel_plan 页面链接的函数,且旅游规划函数甚至没有把相关地图任务数据或链接返回出来。另有未声明但较常见的支持性行为:本地读取/保存 API Key 配置文件,这属于实现细节,不构成主要不匹配。综合判断,描述高估了实际能力,因此应判定为存在不匹配。

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
93% confidence
Finding

该代码片段实际只体现“旅游规划”相关功能:接收城市、兴趣点和路线类型参数,校验后调用 travelPlanner,并输出兴趣点与路线数量。它没有展示周边搜索、热力图数据可视化,也没有直接体现独立的通用POI搜索或更广义的“高德地图综合服务”能力。虽然旅游规划和路径规划与声明部分重合,但声明描述的能力范围明显大于该代码实际行为,因此存在描述与代码行为不完全一致的情况。

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
95% confidence
Finding

The skill documents capabilities requiring environment access and outbound network calls, but it does not declare an explicit tool scope such as permissions or allowed-tools. This weakens sandboxing and user/operator visibility, creating a gap where the runtime may permit broader access than the manifest makes clear.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The manifest/description omits that the skill may prompt for, manage, and persist API credentials locally. Hidden credential-handling behavior is security-relevant because users and reviewers may not realize secrets are stored on disk, which affects trust boundaries and incident response.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The trigger phrases are overly broad, causing the skill to activate on common words like '搜', '找', '查', '附近', and '规划'. Over-broad activation can route unrelated requests into a networked skill that may request credentials, send telemetry, or generate external links unexpectedly.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

Persisting API keys to a local config file is broader than necessary for a map lookup skill and increases secret exposure on shared or compromised hosts. Even with 0600 permissions, local plaintext storage expands the attack surface compared with ephemeral environment-based use.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

This code file contains user-facing natural-language instructions and examples only in Chinese, which effectively forces a specific language for users interacting with the skill. The policy allows locale constraints only when they are explicitly justified or when users are given a choice, neither of which appears here.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The code's natural-language comments, prompts, warnings, and status messages are all written in Chinese, including user-facing output such as key setup guidance and search/travel-planning messages. For a generally applicable skill file, this imposes a specific language/locale on users without any opt-in or documented region-specific justification.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

This code sends user-supplied location coordinates to an external routing API via the walkingRoute call, and similar transmissions occur for other route types. Although the script documents usage, it does not warn users that their precise location data will be transmitted to a third-party service.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

This code file contains natural-language instructions that force a specific language/locale for usage and interaction. The policy scope allows flagging language or locale constraints when the skill does not offer a user choice or clearly justify the restriction.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The script's operational messages, errors, and success output are all presented only in Chinese, with no opt-in or fallback language. That creates a natural-language policy issue because the skill forces one locale during execution rather than offering user choice.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
88% confidence
Finding

The manifest display name, description, trigger instructions, and response templates are entirely Chinese, which effectively fixes the skill’s interaction language without documenting user opt-in or language selection. This may violate language/locale policy where skills should not force a specific language by default.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Low
Category
Not specified by scanner
Confidence
92% confidence
Finding

The skill instructs the agent to send telemetry requests before performing user actions, even when the telemetry is not necessary to fulfill the mapping task. Unnecessary outbound requests expand data exposure and create a privacy and governance risk, especially because they happen automatically and repeatedly.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Low
Category
Not specified by scanner
Confidence
97% confidence
Finding

The manifest describes a comprehensive Amap service supporting POI search, route planning, travel planning, nearby search, and heatmap visualization. In this file, the exposed commands are limited to only direction and search, with no implementation for travel planning, dedicated nearby search, or heatmap data visualization.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Low
Category
Not specified by scanner
Confidence
97% confidence
Finding

L286-L291 的注释明确说明旅游规划助手会返回“pois、mapTaskData、mapLink 和 htmlLink”。但实际实现虽然在 L298-L355 构建了 mapTaskData,最终在 L366-L368 只返回了 pois,这与注释描述直接不一致。

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
87% confidence
Finding

The natural-language description is entirely in Chinese and does not indicate that the package is region-specific or that alternative language/localization options are available. Under the stated policy, forcing a specific language without user opt-in can be a locale-policy violation.

Content

No source excerpt is available for this finding.

Unpinned Dependencies

Low
Category
Supply Chain
Confidence
94% confidence
Finding

The dependency on axios uses a caret range (^1.13.6), which allows automatic installation of future compatible releases. This increases supply-chain risk because a newly published upstream version could introduce a vulnerability or malicious code without any change to this repository.

Content

Scanner excerpt · package.json (reported line 18)May include surrounding context.

json
"author": "",
  "license": "MIT",
  "dependencies": {
    "axios": "^1.13.6"
  }
}

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
96% confidence
Finding

The file’s comments, usage instructions, and console output are all written in Chinese, which imposes a specific language on users without any visible option to select another locale. This matches the policy category for language/locale constraints that are not opt-in.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
93% confidence
Finding

The script's natural-language documentation and console output are written exclusively in Chinese, which imposes a specific language on users without any opt-in or alternative. This matches the language/locale policy concern for forced language selection in user-facing text.

Content

No source excerpt is available for this finding.