Back to skill

Security audit

caocao-chuxing-skill

Security checks for vulnerabilities and agentic risk

Overview

The skill is a coherent CaoCao ride-hailing helper, but it can place or cancel real rides without a required final confirmation and stores the API key in plaintext.

Review this carefully before installing. Use it only if you are comfortable giving the skill a CaoCao API key and allowing it to perform real ride actions. Prefer estimating or generating links first, and require your agent to ask for explicit confirmation before creating or canceling any order. Protect or rotate the API key if it has been stored in the generated config file.

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/caocao_mcp.py:11
Finding
API Key Stored in Plaintext as a URL Query Parameter<![CDATA[ ## Vulnerability Details **File Location**: `scripts/caocao_mcp.py`, lines 11 and 20–29 **Vulnerability Type**: Plaintext credential storage and credential exposure through URL query parameters **Risk Level**: Medium ### Vulnerable Code ```python BASE_TEMPLATE = 'https://mcp.caocaokeji.cn/mcp/api?key={api_key}' def save_config(path: Path, data: dict) -> None: path.parent.mkdir(parents=True, exist_ok=True) path.write_text(json.dumps(data, ensure_ascii=False, indent=2) + '\n', encoding='utf-8') def configure(api_key: str, config_path: Path, server_name: str) -> None: data = load_config(config_path) data.setdefault('mcpServers', {})[server_name] = { 'baseUrl': BASE_TEMPLATE.format(api_key=api_key), 'description': '曹操出行 MCP', } save_config(config_path, data) ``` ### Technical Analysis The `configure` command interpolates the user's API key directly into an endpoint URL and persists that URL in `config/mcporter.json`. The configuration file is written as ordinary plaintext, and the implementation does not explicitly enforce owner-only permissions. Embedding credentials in a URL also increases their exposure surface. Full URLs can be captured by application diagnostics, exception reports, HTTP infrastructure, proxy logs, or configuration backups. HTTPS protects the request while it is in transit, but it does not prevent credential disclosure through endpoint logging or local plaintext storage. The outbound transmission itself is consistent with the declared CaoCao ride-hailing functionality. The application legitimately sends location coordinates, place names, estimate identifiers, order numbers, and cancellation reasons to `https://mcp.caocaokeji.cn`. The security issue is specifically the credential transport and storage mechanism, not the existence of the network communication. ### Attack Path 1. A user runs the documented configuration command with a valid CaoCao API key. 2. The Skill writes the key int ...[truncated 1311 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. **Do not place the API key in the endpoint URL.** - Use a fixed endpoint such as `https://mcp.caocaokeji.cn/mcp/api`. - Send the credential through an authorization header, for example: ```http Authorization: Bearer <API_KEY> ``` - If the service only accepts query-string credentials, request support for header-based authentication and ensure all infrastructure redacts the `key` parameter. 2. **Avoid persistent plaintext storage where possible.** - Store the key in an operating-system credential manager or dedicated secret store. - Alternatively, read it from a protected environment variable at runtime. - Keep only non-secret endpoint and server metadata in `mcporter.json`. 3. **Enforce restrictive permissions if file storage is unavoidable.** - Create the configuration file with owner-only permissions, such as mode `0600`. - Ensure the parent directory is not writable or readable by unrelated users. - Validate existing file permissions before loading credentials. 4. **Prevent secondary disclosure.** - Redact query parameters and authorization headers from logs, exceptions, telemetry, and diagnostic output. - Do not include the complete credential-bearing URL in error messages. - Exclude secret-bearing configuration files from source control and routine support bundles. 5. **Limit credential authority and lifetime.** - Use narrowly scoped keys restricted to only the necessary CaoCao operations. - Support key expiration, revocation, and rotation. - Rotate any keys that may already have been stored in logs, backups, or broadly readable configuration files. ]]>
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (8)

Missing User Warnings

High
Confidence
98% confidence
Finding
The dialogue policy explicitly permits direct order placement from natural-language requests and says the agent can execute immediately when the user clearly asks to place an order. Removing a mandatory confirmation gate for an external purchase/service action is dangerous because misinterpretation, prompt injection via conversation context, or user error can trigger irreversible real-world transactions.

Missing User Warnings

High
Confidence
97% confidence
Finding
The trip_create_order command directly invokes ride ordering with the supplied estimateId and service type, without any confirmation gate, review step, or safety prompt. In this skill’s context, that means a caller or upstream agent can trigger a real-world, billable ride on the user's behalf, causing financial cost and unintended dispatch to a physical location.

Missing User Warnings

High
Confidence
98% confidence
Finding
The high-level ride_flow path can automatically progress from location search to fare estimate to order creation, defaulting to the cheapest model if no service type is specified, and it does so without an explicit confirmation boundary. This increases risk because a higher-level automation or prompt-influenced workflow can place a real ride order with minimal friction, amplifying accidental or unauthorized actions.

Lp3

Medium
Category
MCP Least Privilege
Confidence
95% confidence
Finding
The skill invokes local scripts that read and write configuration and make network calls, but the manifest does not declare any explicit tool scope or permission boundaries. That creates an authorization gap: an agent or platform may execute capabilities beyond what is transparently documented, increasing the chance of unintended file or network access.

Missing User Warnings

Medium
Confidence
92% confidence
Finding
The skill documentation authorizes real-world state-changing actions like order creation and cancellation without requiring a clear warning or explicit confirmation immediately before execution. In a ride-hailing context, this can cause unauthorized charges, unwanted bookings, or cancellation of active transportation based on ambiguous or stale user intent.

Missing User Warnings

Medium
Confidence
91% confidence
Finding
The configure command persists the API key directly inside a local JSON config file as part of the baseUrl, with no warning, masking, or safer secret-storage mechanism. In a skill that handles transportation orders, this credential can be reused by anyone who gains access to the file, enabling unauthorized ride-related API actions and account abuse.

Missing User Warnings

Medium
Confidence
93% confidence
Finding
The trip_cancel_order command performs cancellation immediately once an order number is provided, without any confirmation or contextual verification. In a ride-hailing skill, unauthorized or accidental cancellation can disrupt active travel, strand users, and potentially incur cancellation penalties or service issues.

Natural-Language Policy Violations

Low
Confidence
82% confidence
Finding
The natural-language instructions, trigger examples, and dialogue policy are entirely in Chinese, and the file does not state that the skill is region-specific or that users may choose another language. Under the policy, forcing a specific language without opt-in can be a locale-policy issue unless clearly justified.

Static analysis

No suspicious patterns detected.