Back to skill

Security audit

腾讯出行服务打车skills

Security checks for vulnerabilities and agentic risk

Overview

The skill is a coherent ride-hailing assistant, but it needs review because broad triggers, credential handling, and persistent location/order authority could cause privacy or transaction risk.

Review this before installing if you use ride-hailing on a shared or managed machine. The skill can store your Tencent ride token and saved places locally, send precise trip data to Tencent endpoints, and place or cancel rides. Avoid putting real tokens in visible command history or logs, and treat generated map URLs as sensitive because they may contain the token.

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

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/tms_takecar.py:132
Finding

Authentication token stored without enforced restrictive file permissions

Content
View full analysis
str: env_file = _resolve_env_file_path(env_file) _ensure_env_parent_dir(env_file) normalized = _normalize_env_config(env_config) with open(env_file, "w", encoding="utf-8") as handle: json.dump(normalized, handle, ensure_ascii=False, indent=2) handle.write("\n") return env_file ``` ```python def persist_token(token: str, config_file: Optional[str] = None) -> dict: env_file = _resolve_env_file_path(config_file) env_config = load_env_config(env_file=env_file) env_config["token"] = token.strip() written_file = save_env_config(env_config, env_file=env_file) return {"saved": True, "config_file": written_file} ``` ### Technical Analysis The authentication token is stored directly in `~/.config/tms-takecar/env.json` as plaintext JSON. The code creates the parent directory and opens the file using ordinary process defaults, but it does not explicitly enforce owner-only permissions on either the directory or the file. Consequently, the effective permissions depend on the user's `umask`, existing directory permissions, and pre-existing file permissions. In a permissive or shared environment, another local user or process may be able to read the token. Rewriting an existing file does not automatically correct unsafe permissions already assigned to it. Plaintext storage is sometimes necessary when an operating-system credential service is unavailable, but explicit access-control hardening is required because this token authorizes ride-hailing API operations. ### Attack Path 1. A user runs `save-token`, causing the token to be stored in `~/.config/tms-takecar/env.json`. 2. The configuration directory or file is creat ...[truncated 951 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/tms_takecar.py:1773
Finding

Authentication token exposed through command-line arguments

Content
View full analysis
int: del environ, stderr write_json(stdout, persist_token(args.token, config_file=args.config_file)) return 0 ``` The documented invocation is: ```bash python3 ./scripts/tms_takecar.py save-token xxxxxx ``` ### Technical Analysis The token is accepted as a positional command-line argument. Command-line secrets can be exposed through process listings, process-inspection interfaces, shell history, terminal recording, command telemetry, agent execution logs, and diagnostic tooling. Although the process may be short-lived, exposure exists for the duration of execution and may persist indefinitely in histories or logs. This is not the minimum-exposure mechanism necessary to configure the Skill; protected standard input or an operating-system credential prompt can provide the same functionality without placing the token in the process argument vector. ### Attack Path 1. The user follows the documented workflow and runs `python3 ./scripts/tms_takecar.py save-token `. 2. The token becomes part of the process argument vector and command text. 3. A local observer, monitoring process, shell-history reader, terminal recorder, or agent-log consumer captures the command. 4. The attacker extracts the token from ...[truncated 607 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/tms_takecar.py:527
Finding

Authentication token embedded in generated static-map URLs

Content
View full analysis
str: size = DEFAULT_STATIC_MAP_SIZE scale = DEFAULT_STATIC_MAP_SCALE maptype = DEFAULT_STATIC_MAP_MAPTYPE if scale not in (1, 2): raise ValueError("scale must be 1 or 2") if maptype not in ("roadmap", "satellite", "hybrid"): raise ValueError("maptype must be one of: roadmap, satellite, hybrid") normalized_markers = normalize_static_map_markers(markers) width, height = _parse_static_map_size(size) center_lat, center_lng = calculate_static_map_center(normalized_markers) zoom = calculate_static_map_zoom(normalized_markers, width=width, height=height, scale=scale) timestamp_ms = generate_timestamp_ms() seq_id = generate_seq_id(timestamp_ms) query_params = [ ("seqId", seq_id), ("wxAppId", DEFAULT_WX_APP_ID), ("token", token), ("timestamp", str(timestamp_ms)), ("size", f"{width}*{height}"), ("center", f"{center_lat:.6f},{center_lng:.6f}"), ("zoom", str(zoom)), ("scale", str(scale)), ("maptype", maptype), ] for marker_param in build_static_map_marker_params(normalized_markers): query_params.append(("markers", marker_param)) url = "%s%s?%s" % ( DEFAULT_API_BASE.rstrip("/"), DEFAULT_STATIC_MAP_PATH, urllib.parse.urlencode(query_params, doseq=True), ) return url ``` ```python def handle_build_static_map_url(args: argparse.Namespace, environ: dict, stdout, stderr) -> int: try: markers = _parse_static_map_markers_json(args.markers_json) token = load_token(environ) if not token: stderr.write("Token is not configured. Run: save-token \n") return 1 url = build_static_map_url( markers=markers, token=token, ) except ValueError as exc: stderr.write(f"{exc}\n") return 2 write_json(st ...[truncated 2062 chars]
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Rogue AgentSelf-Modification, Session Persistence
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
Findings (32)

Vague Triggers

High
Category
Not specified by scanner
Confidence
96% confidence
Finding

The description says the skill should trigger even when the user does not explicitly mention ride-hailing, including generic A-to-B travel, commuting, or transportation-choice discussions. That broad activation surface can hijack normal conversation and route users into a transactional skill unexpectedly, increasing the chance of unintended tool use, data handling, or order operations.

Content

No source excerpt is available for this finding.

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
- [接口契约](./references/api-contract.md)

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
- `python3 ./scripts/tms_takecar.py preflight` 返回 `0` 才允许进入后续业务流程

Intent-Code Divergence

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

The document contains contradictory instructions: one section says memory.md no longer stores address and shortcut content, while an earlier step still requires updating memory.md. This inconsistency is dangerous because an agent may follow the wrong branch and persist sensitive location data in deprecated storage, causing policy bypass, stale data reuse, and privacy-impacting divergence between files.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
94% confidence
Finding

The skill requires executing a local Python script and reading multiple referenced workflow documents, but it does not declare any explicit tool scope or allowed-tools boundary. This creates an over-privileged, opaque execution surface where an agent may access environment data, local files, or networked resources beyond what users would reasonably expect for a ride-hailing skill.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
87% confidence
Finding

Examples like “帮我叫车” and especially broad destination phrasing such as “从亚洲金融大厦去腾讯总部” reinforce activation on short, ambiguous travel utterances without clarifying that the user wants this specific service to act. While not directly malicious, such examples train the agent toward aggressive triggering and can cause unintended invocation in ordinary routing conversations.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
84% confidence
Finding

The contract states that every HTTP request automatically includes a persisted token plus ride-related metadata such as timestamps and, elsewhere in the workflow, location and order data, but it does not explicitly warn about network transmission of this sensitive information. For a transportation skill that processes precise travel and order details, lack of disclosure increases privacy risk and can undermine informed user consent.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The skill exposes save-token and delete-token commands that persist authentication material to ~/.config/tms-takecar/env.json, but this sensitive credential handling is not reflected in the manifest description. Hidden credential persistence increases the risk of users or higher-level agents invoking the skill without understanding that a long-lived token will be written to disk and reused for subsequent authenticated requests.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The documentation describes persisting and deleting authentication tokens and local state files without an explicit warning that sensitive credentials are being written to local storage. In a skill that may be invoked by an agent on behalf of a user, insufficient disclosure can lead to inadvertent credential persistence, broader local exposure, and unsafe handling on shared systems.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
87% confidence
Finding

The manifest frames this skill as a ride-hailing assistant for handling requests like calling a car, commuting, and querying orders. This API contract documents additional CRUD-style capabilities for local address books and shortcut scenarios (addr-*, short-cut-*) that store and modify user-defined data in local files, which is broader than the user-facing description of simply arranging rides.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The file is written entirely in Chinese and includes prescriptive user-facing response text, but it does not offer any language choice or explain a required locale constraint. Under the policy rule, forcing a specific language in natural-language instructions without opt-in is a locale-policy violation.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The workflow directs the agent to help install Python on the user's machine, which expands the skill from ride-hailing into system administration. That broader action increases risk because it can lead to unnecessary software changes on the endpoint and creates an avenue for unsafe installation guidance unrelated to the declared purpose of the skill.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The instructions provide a Chinese reply template and explicitly state '禁止回复模版以外的内容', which forces a single language and phrasing regardless of user preference. This is a natural-language policy concern because it removes language choice without documenting opt-in or a justified locale restriction.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The token rotation and deletion flow instructs credential removal without any explicit warning that this will immediately disable the service until a valid replacement token is stored. In a credentialed transportation workflow, this can cause avoidable account disruption and may lead users to perform sensitive token operations without understanding the consequence.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
85% confidence
Finding

The schema defines trigger keyword examples exclusively in Chinese for mapping user preferences, which imposes a specific language expectation. There is no indication that other languages/locales are supported or that the Chinese-only behavior is an explicit user opt-in or justified locale restriction.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The workflow says to immediately save the destination address after user confirmation, but does not require warning the user that this creates persistent location memory. In a ride-hailing context, destination addresses frequently reveal home, workplace, school, or child-related locations, so automatic storage materially increases privacy sensitivity.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The workflow instructs updating memory.md during an address/shortcut persistence flow, even though the skill’s declared scope is structured ride-hailing state in addr.json, short-cut.json, and state.json. Introducing an extra memory sink expands where sensitive location data may be stored, increases inconsistency risk, and can cause unauthorized retention or reuse of user travel history outside the documented data model.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The workflow directs writes to ~/.config/tms-takecar/addr.json, short-cut.json, and related state without requiring an explicit user-facing disclosure that persistent local files and ride preferences will be modified. Because these files contain sensitive location and behavioral data, silent persistence can violate user expectations and enable privacy harm if the host environment is shared or later inspected.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The activation scope includes '其他可映射为固定场景终点的快捷叫车表达', which is open-ended and does not clearly define what utterances should or should not invoke this skill. This creates ambiguity beyond the explicit examples and could cause unintended invocation for common travel-related phrases.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The workflow mandates unconditional deletion of the persistent state file at the start of a ride flow, without any user-visible warning, confirmation, or safeguards about in-progress context. This can destroy active session state, interfere with existing orders or recovery flows, and create integrity issues if an attacker or accidental trigger repeatedly causes state resets.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

L068 states that for address-related requests, poi-search must be called first and that the skill must not directly ask the user to provide a more specific address before doing so. However, L307 later instructs that when the address is not a clear POI name such as '家' or '公司', the skill should first ask the user to confirm a specific address before proceeding to the address search step. These instructions conflict and could drive opposite runtime behavior.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The skill persists sensitive user context, including the ride-service token and resident city, to predictable files under ~/.config without any access-control hardening, encryption, or user warning. On a shared workstation, compromised user account, or via other local processes running as the same user, this data can be harvested and reused to access ride-order capabilities or expose location-related personal information.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The static map URL embeds the authentication token directly in the query string, which is dangerous because URLs are commonly logged by shells, proxies, browser history, analytics, and server access logs. Anyone who obtains that URL may recover the token and potentially impersonate the user against the ride-service backend or related APIs.

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 · scripts/tms_takecar.py (reported line 1806)May include surrounding context.

python
addr_get_value_parser.add_argument("--addr-file", default=None, help="Explicit addr file path (default: ~/.config/tms-takecar/addr.json)")
	addr_get_value_parser.set_defaults(handler=handle_addr_get_value)

	addr_upsert_value_parser = subparsers.add_parser("addr-upsert-value", help="Create or update one value in addr.json by key")
	addr_upsert_value_parser.add_argument("key", help="Address alias key")
	addr_upsert_value_parser.add_argument("value_json", help="JSON object to store for the given key")
	addr_upsert_value_parser.add_argument("--addr-file", default=None, help="Explicit addr file path (default: ~/.config/tms-takecar/addr.json)")

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

This code builds a request payload containing the authentication token and then sends it over the network, but the file provides no confirmation prompt, user-facing notice, or explanatory comment warning that user/system data will be transmitted to a remote API. Under the code-file criteria, network calls that transmit data should have some visible disclosure unless clearly documented elsewhere in the skill description, which is not present in this file.

Content

No source excerpt is available for this finding.