T01 · Skill Instruction Hijacking
- Location
references/agent-notes.md:55- Finding
Mandatory Unrequested Guide Creation and Promotional QR Output
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
The skill is a real Tencent Maps assistant, but it automatically creates/persists shareable map guides, handles phone-based key enrollment, and stores usable keys in ways users should review before installing.
Install only if you are comfortable with Tencent Maps receiving location, POI, route, guide, phone-verification, and key-enrollment data for the requested workflows. Before using it, prefer providing your own scoped Tencent Maps key, avoid public HTML containing keys, and treat ~/.tencentmap/tempkey.json as a sensitive file because it can contain full API keys and phone-linked records. For routine searches or route answers, ask the agent not to generate or save a mini-program guide unless you explicitly want a QR/shareable map.
references/agent-notes.md:55Mandatory Unrequested Guide Creation and Promotional QR Output
scripts/tmap_client.py:35Reusable Guide-Gateway Signing Secret Embedded in Distributed Client Code
scripts/save_config.py:36Plaintext Storage of API Keys and Phone-Linked Enrollment Records Without Explicit Permission Hardening
Backend creation or reuse of API/temp keys, along with supplement tokens and mkeys, goes beyond end-user mapping features and enters credential lifecycle management. When this is not clearly disclosed, the skill can become a covert credential broker, enabling unauthorized provisioning, misuse of API quotas, or transfer of control over service credentials.
Backend creation or reuse of API/temp keys, along with supplement tokens and mkeys, goes beyond end-user mapping features and enters credential lifecycle management. When this is not clearly disclosed, the skill can become a covert credential broker, enabling unauthorized provisioning, misuse of API quotas, or transfer of control over service credentials.
Backend creation or reuse of API/temp keys, along with supplement tokens and mkeys, goes beyond end-user mapping features and enters credential lifecycle management. When this is not clearly disclosed, the skill can become a covert credential broker, enabling unauthorized provisioning, misuse of API quotas, or transfer of control over service credentials.
Backend creation or reuse of API/temp keys, along with supplement tokens and mkeys, goes beyond end-user mapping features and enters credential lifecycle management. When this is not clearly disclosed, the skill can become a covert credential broker, enabling unauthorized provisioning, misuse of API quotas, or transfer of control over service credentials.
The reference file documents SMS-based verification, session tokens, supplement tokens, and temporary API key issuance flows that are unrelated to a normal end-user map assistant. In the context of a skill advertised for route planning and map assistance, exposing account-linked key provisioning capabilities expands the skill into credential and quota management, creating a pathway for unauthorized key acquisition or abuse if the skill invokes these flows on behalf of users.
Including account verification and API key provisioning in a map-assistant skill creates an unjustified privilege boundary crossing: a conversational mapping tool should not normally collect phone numbers, process SMS codes, and mint or reuse API keys. This mismatch makes the skill more dangerous because an LLM-driven assistant could be used to social-engineer users into providing verification data or trigger key lifecycle operations outside the expected travel-assistance scope.
Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.
<div id="container"></div>
<script src="https://mapapi.qq.com/web/jsapi/jsapi-gl/js/dom-to-image.min.js"></script>
<!-- dom-to-image 官方地址:https://github.com/tsayen/dom-to-image -->
<script src="https://map.qq.com/api/gljs?v=1.exp&key={TMAP_JSAPI_KEY}"></script>
<script>
var map = new TMap.Map('container', {
Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.
<div id="container"></div>
<script src="https://mapapi.qq.com/web/jsapi/jsapi-gl/js/dom-to-image.min.js"></script>
<!-- dom-to-image 官方地址:https://github.com/tsayen/dom-to-image -->
<script src="https://map.qq.com/api/gljs?v=1.exp&key={TMAP_JSAPI_KEY}"></script>
<script>
var map = new TMap.Map('container', {
Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.
<br><br>
## MVTLayer{#MVTLayer}
-------
用于创建符合mapbox-vector-tile标准的图层对象,叠加在地图上进行显示;**注意,添加MVTLayer后不支持地图设置中心点偏移**。
| 构造函数 |
Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.
<br><br>
## MVTLayer{#MVTLayer}
-------
用于创建符合mapbox-vector-tile标准的图层对象,叠加在地图上进行显示;**注意,添加MVTLayer后不支持地图设置中心点偏移**。
| 构造函数 |
The manifest describes map, routing, POI, weather, geocoding, and itinerary-related Tencent Map capabilities. This script implements phone-based authentication by sending SMS verification codes and returning a session token, which is an account/auth workflow rather than a user-facing map assistant capability described in the manifest.
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
def _read_legacy_dotenv_key() -> Optional[str]:
"""向后兼容:读取旧版 skill 包内 .env 的 TMAP_KEY,仅用于一次性迁移。
"""
skill_root = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
def _read_legacy_dotenv_key() -> Optional[str]:
"""向后兼容:读取旧版 skill 包内 .env 的 TMAP_KEY,仅用于一次性迁移。
"""
skill_root = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
def _read_legacy_dotenv_key() -> Optional[str]:
"""向后兼容:读取旧版 skill 包内 .env 的 TMAP_KEY,仅用于一次性迁移。
"""
skill_root = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
"""
skill_root = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
env_path = os.path.join(skill_root, ".env")
if not os.path.exists(env_path):
return None
try:
The README claims the skill can be invoked with broad natural language for many map-related tasks, but it does not define clear trigger boundaries, constraints, or disambiguation rules. In an agent ecosystem, this can cause overbroad activation, unintended tool use, and unnecessary transmission of user queries or location-related data to external services.
The skill documentation describes capabilities that rely on network access, filesystem reads/writes, and environment-backed key persistence, but it does not declare any explicit tool scope or permission boundaries. In an agent environment, missing scope declarations can cause over-broad invocation and make sensitive operations like reading reference files, writing output artifacts, and persisting API keys occur without clear least-privilege constraints.
The description uses broad natural-language trigger conditions for many common travel and location requests, which increases the chance of over-invocation. In a skill that also appears to manage keys and possibly sensitive auth flows, loose trigger boundaries raise the risk that the agent activates this skill in contexts where the user did not intend to authorize its broader behavior.
Claiming the skill can be used with 'one sentence of natural language' without defining boundaries encourages indiscriminate activation across a wide range of user requests. Because the skill includes file, network, and persistence-related operations, this ambiguity can lead to unintended handling of user data or credentials during otherwise ordinary conversation.
The notes instruct the agent to run pip install requests when a dependency is missing. Allowing a skill to trigger package installation expands its authority from using an existing map client to modifying the runtime environment and executing package-manager side effects, which can introduce supply-chain risk or unexpected code execution paths. In this context, the map-assistant purpose does not require autonomous dependency installation, so the instruction is overly permissive.
The file states that all WebService capabilities default to returning semantic text in Chinese (中文) and instructs the agent not to reformat it. This imposes a specific language on outputs without indicating user opt-in or a justified region-specific language policy.
The skill directs the agent to execute OS-level file copy commands (cp/copy) to place QR PNGs into the workspace. This is a real security concern because it authorizes shell/file-system mutation beyond answering mapping queries, and it normalizes command execution on paths derived from tool output without clear confinement guarantees. The travel-guide context partially explains why a file might be preserved, but it does not justify requiring shell commands instead of safer platform file APIs and explicit user consent.
The notes instruct the agent to write a QR PNG into the current workspace but provide no requirement to notify the user or obtain consent. Silent file creation is risky because it changes persistent state and may surprise users, clutter workspaces, or be abused as a precedent for broader unauthorized writes. The map-assistant context makes the write somewhat related to functionality, but persistence should still be disclosed and optional.
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
curl -s -X POST 'https://lbsconsole.map.qq.com/nosession/http/skill/auth/send-code' \
-H 'Content-Type: application/json' \
-H 'X-Skill-Nonce: abc123def456' \
-H 'X-Skill-Timestamp: 1752662400' \
The document shows example session tokens and API key values without any accompanying handling guidance, which normalizes exposing secrets in plaintext within skill materials. In an LLM skill context, examples that resemble live credentials can lead developers or users to paste real tokens or keys into prompts, logs, chat transcripts, or generated code, increasing leakage risk.
Detected: suspicious.exposed_secret_literal