Back to skill

Security audit

快递查询

Security checks for vulnerabilities and agentic risk

Overview

The parcel-tracking feature is mostly coherent, but the package also ships plaintext credentials and an unrelated publisher script that can use a home-directory EvoMap secret.

Review before installing. Remove publish_evomap.py from the distributed skill unless you intentionally want EvoMap publication tooling, rotate the exposed Kuaidi100 credentials, replace config.json with a non-secret template or environment-based configuration, and add a clear notice before sending shipment numbers or phone suffixes to Kuaidi100.

Vulnerability Patterns
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
  • 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 (2)

T09 · Insecure Skill Coding Practices

Error
Location
config.json:2
Finding
Hardcoded Kuaidi100 API Credentials and Phone Suffix in Version-Controlled Configuration<![CDATA[ ## Vulnerability Details **File Location**: `config.json:2-4` **Vulnerability Type**: Hardcoded credentials and plaintext sensitive data **Risk Level**: High ### Vulnerable Code ```json { "key": "UwIElcfk8572", "customer": "9BA56EAFFAA38573F89722993EA5875C", "default_phone": "1112" } ``` ### Technical Analysis The project stores an active-looking Kuaidi100 API key, customer identifier, and default phone-number suffix directly in a version-controlled plaintext file. `scripts/track.py` loads these values from `config.json`, uses the API key and customer identifier to generate request signatures, and sends the resulting authenticated request to Kuaidi100. Any party able to download or inspect the project can recover these values without authentication. Moving or deleting the file in a later revision would not be sufficient if it remains in repository history, release archives, caches, or previously distributed copies. The phone suffix is also personal linkage data used for certain courier queries. Although it is only four digits, storing it alongside authenticated API credentials increases the likelihood that it can be associated with a specific customer or shipment account. ### Attack Path 1. An attacker downloads the Skill package or obtains access to its source history. 2. The attacker opens `config.json` and extracts the `key`, `customer`, and `default_phone` values. 3. The attacker reproduces the signing process implemented in `scripts/track.py`: - Serialize the Kuaidi100 request parameters. - Concatenate the serialized parameters, API key, and customer identifier. - Calculate the MD5 signature expected by the API. 4. The attacker submits authenticated tracking requests to the Kuaidi100 endpoint using the exposed account identity. 5. The attacker may consume the account's API quota and query shipment information where valid tracking details and any required phone suffix are available. No evidence establishes that the credent ...[truncated 804 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Immediately revoke and rotate the exposed Kuaidi100 API key and customer credentials. 2. Determine whether the values have appeared in repository history, build artifacts, logs, release archives, or external mirrors. Remove them where possible, while still treating them as permanently compromised. 3. Replace `config.json` with a non-sensitive template such as: ```json { "key": "YOUR_API_KEY", "customer": "YOUR_CUSTOMER_ID", "default_phone": "" } ``` 4. Load real credentials from environment variables or a dedicated secret manager rather than a tracked file. 5. Add the local secret-bearing configuration file to `.gitignore` and ensure restrictive filesystem permissions. 6. Do not store the phone suffix by default. Request it only when needed or retrieve it from an appropriately protected secret source. 7. Add automated secret scanning to commits and release pipelines. 8. Review Kuaidi100 account usage for unexpected requests or quota consumption and rotate any related credentials if suspicious activity is identified. ]]>

T05 · Unauthorized Access and Privilege Escalation

Warning
Location
publish_evomap.py:14
Finding
Undocumented Home-Directory Credential Access and Authenticated EvoMap Publication<![CDATA[ ## Vulnerability Details **File Location**: `publish_evomap.py:14-22, 45-54, 153-155` **Vulnerability Type**: Undocumented cross-scope credential access **Risk Level**: Medium ### Vulnerable Code ```python # 使用已保存的 node_id NODE_ID = "node_fad26bb50328c245" HUB_URL = "https://evomap.ai" # 加载 node_secret def load_node_secret(): secret_path = os.path.expanduser("~/.evomap/node_secret") if os.path.exists(secret_path): with open(secret_path, "r") as f: return f.read().strip() return None NODE_SECRET = load_node_secret() ``` ```python def post(endpoint, data, use_auth=False): """发送 POST 请求""" url = f"{HUB_URL}{endpoint}" headers = {"Content-Type": "application/json"} if use_auth: secret = load_node_secret() if secret: headers["Authorization"] = f"Bearer {secret}" ``` ```python publish_resp = post( "/a2a/publish", make_envelope("publish", publish_payload), use_auth=True ) ``` ### Technical Analysis The publishing utility accesses `~/.evomap/node_secret`, reads its contents, places the value in an HTTP Bearer authorization header, and performs an authenticated publication to `https://evomap.ai`. This behavior is outside the parcel-tracking workflow described in `SKILL.md`. The documentation only describes calling `scripts/track.py` and configuring Kuaidi100; it does not disclose that another bundled script accesses a credential in the user's home directory or performs authenticated publication to a separate service. The credential is read once at module import through `NODE_SECRET = load_node_secret()` and then read again when an authenticated request is prepared. The global value is not used, so the first read unnecessarily expands the period during which the secret exists in process memory. The script does not automatically execute merely because the Skill is loaded, and the audit found no automatic trigger, persistence mechanism, or direct exfiltration to a ...[truncated 1778 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Remove `publish_evomap.py` from the runtime Skill package if publication is only a developer or release-maintenance function. 2. Place release tooling in a separately distributed, access-controlled development directory. 3. Clearly document: - The path of the credential being accessed. - The destination service and endpoint. - The assets that will be published. - The account privileges that may be exercised. 4. Require explicit user confirmation immediately before reading the credential and performing publication. 5. Accept the credential through a dedicated secret provider or environment variable rather than silently reading a fixed home-directory path. 6. Remove the unused module-level statement: ```python NODE_SECRET = load_node_secret() ``` This avoids reading the secret during module import. 7. Validate restrictive permissions on the secret file and reject symlinks or files owned by an unexpected user where supported. 8. Use a narrowly scoped, short-lived token that permits only the required publication operation. 9. Avoid hardcoding a node identity unless the package is intended solely for that specific node. Validate that the credential and node identifier belong together. 10. Log publication metadata and outcome without logging authorization headers or secret values. ]]>
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
Findings (12)

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding
This is a serious description-behavior mismatch: the skill claims to perform package tracking, but the detected code behavior includes reading a local secret from `~/.evomap/node_secret`, constructing metadata, and performing authenticated remote publishing. Those actions are unrelated to shipment lookup and strongly suggest hidden credential access and exfiltration or unauthorized remote operations.

Description-Behavior Mismatch

High
Confidence
98% confidence
Finding
The manifest describes a skill that queries package logistics status for users, but this file does not implement any tracking lookup logic. Instead, it constructs Gene/Capsule/EvolutionEvent metadata and publishes them to EvoMap over the network, which is a different operational purpose than express tracking itself.

Lp3

Medium
Category
MCP Least Privilege
Confidence
74% confidence
Finding
The skill declares no explicit tool scope even though its documented behavior clearly requires reading local configuration and making outbound network requests. Missing scope declarations weaken reviewability and sandbox enforcement, increasing the chance that the skill accesses capabilities users and operators did not knowingly approve.

Vague Triggers

Medium
Confidence
88% confidence
Finding
The manifest says the skill triggers when the user asks about delivery status, logistics information, or package location, but it does not define specific trigger phrases or exclusion conditions. Phrases like asking about a package's location are common in general conversation and could cause unintended activation without clearer scope.

Missing User Warnings

Medium
Confidence
93% confidence
Finding
The skill does not clearly warn users that tracking numbers and possibly phone suffixes will be sent to an external API provider. Shipment identifiers can be sensitive personal data, so undisclosed transmission creates a privacy risk and undermines informed consent.

Intent-Code Divergence

Medium
Confidence
77% confidence
Finding
The file-level documentation says this module publishes the express tracking skill to EvoMap, while the embedded Capsule content and summaries describe a skill that receives tracking numbers, calls the 快递100 API, and formats logistics results. This file never performs those documented runtime actions, creating intent confusion between deployment metadata and actual code behavior.

Natural-Language Policy Violations

Medium
Confidence
90% confidence
Finding
This Python file contains multiple natural-language strings in Chinese, including the module docstring, comments, summaries, and capsule content. Under the policy, forcing a specific language without user opt-in is a natural-language policy violation unless the locale restriction is explicitly justified, which is not present here.

Context-Inappropriate Capability

Medium
Confidence
92% confidence
Finding
The script reads a long-lived local node secret from disk and uses it to perform authenticated publication to a remote service, which is unrelated to end-user parcel queries. In a skill package context, embedding publisher behavior increases the blast radius: anyone running the skill may unknowingly trigger privileged outbound actions using local credentials.

Unsafe Defaults

Medium
Category
Tool Misuse
Content
"payload": payload
    }

def post(endpoint, data, use_auth=False):
    """发送 POST 请求"""
    url = f"{HUB_URL}{endpoint}"
    headers = {"Content-Type": "application/json"}
Confidence
75% confidence
Finding
Tool defaults are unsafe or overly permissive (e.g. disabled TLS verification, no authentication, world-writable permissions). Unsafe defaults widen the attack surface.

Missing User Warnings

Medium
Confidence
93% confidence
Finding
The script sends tracking numbers and, in some cases, a recipient phone number to the external kuaidi100 API without any explicit disclosure, consent flow, or minimization controls. In this skill context, shipment identifiers and phone data are user-linked logistics information, so silent transmission to a third party creates a real privacy and data-handling risk even though it is necessary for the feature to function.

Natural-Language Policy Violations

Low
Confidence
71% confidence
Finding
The natural-language description and usage guidance are entirely in Chinese, and there is no indication that the user can choose another language or that the skill is intentionally restricted to a Chinese-language audience. This can conflict with language or locale policies when skills are expected to avoid forcing a specific language without opt-in.

Natural-Language Policy Violations

Low
Confidence
95% confidence
Finding
User-facing strings such as the description, errors, and usage output are all fixed in Chinese, with no option for users to select another language. This can violate language/locale policy when a skill forces a specific language without opt-in or explicit justification.

Static analysis

No suspicious patterns detected.