Back to skill

Security audit

Express Tracker

Security checks for vulnerabilities and agentic risk

Overview

The skill is a coherent courier-link generator, but its scripts can import executable code from an unreviewed developer-specific path before using the bundled files.

Review this skill before installing. Its normal function is low-impact link generation, but the publisher should remove the hardcoded external Python import path before users run it. Only open generated Kuaidi100 links when you are comfortable sharing the tracking number with that site, and keep input/output paths limited to files you intentionally choose.

Vulnerability Patterns
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • 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 (2)

T08 · Insecure Dependencies

Error
Location
scripts/track_express.py:15
Finding
External Import Path Allows Hijacking of express_codes Module<![CDATA[ ## Vulnerability Details **File Location**: `scripts/track_express.py`, lines 15–16 **Vulnerability Type**: Python module import hijacking through an externally controlled search path **Risk Level**: High ### Vulnerable Code ```python sys.path.insert(0, '/Users/junjian/.openclaw/workspace/skills/express-tracker/scripts') from express_codes import detect_express, get_express_name ``` ### Technical Analysis The script inserts a hardcoded directory outside the audited project into index zero of `sys.path`. Python searches this directory before normal module locations when resolving `express_codes`. If an attacker can create or modify `/Users/junjian/.openclaw/workspace/skills/express-tracker/scripts/express_codes.py`, Python will import that file instead of the reviewed local `scripts/express_codes.py`. Any top-level code in the substituted module executes immediately during import. This violates the integrity boundary of the audited package: the behavior of the Skill can be changed by an external, mutable component that is not included in the reviewed artifact. ### Attack Path 1. The attacker obtains write access to the hardcoded external directory, directly or through another compromised process running as the same user. 2. The attacker creates or replaces: ```text /Users/junjian/.openclaw/workspace/skills/express-tracker/scripts/express_codes.py ``` 3. A user invokes the documented command: ```bash python3 scripts/track_express.py --nu YT2538259220416 ``` 4. The script places the attacker-controlled directory first in `sys.path`. 5. Python imports the attacker's `express_codes.py`. 6. Malicious top-level code executes before normal tracking-number processing begins. ### Impact Assessment Successful exploitation provides arbitrary Python code execution with the privileges of the user running the Skill. The attacker could access files and environment variables available to that user, modify user-owned data, falsify tracking ...[truncated 280 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Remove the hardcoded `sys.path.insert` statement. 2. Package the scripts as a proper Python package and use an explicit relative import: ```python from .express_codes import detect_express, get_express_name ``` 3. If direct script execution must remain supported, import from a path derived from the reviewed script location rather than a user-specific external directory: ```python from pathlib import Path import sys script_dir = Path(__file__).resolve().parent sys.path.insert(0, str(script_dir)) from express_codes import detect_express, get_express_name ``` 4. Prefer installation through a locked, reproducible package configuration so module resolution does not depend on mutable external directories. 5. Add an automated test that verifies `express_codes.__file__` resolves inside the installed Skill package. ]]>

T08 · Insecure Dependencies

Error
Location
scripts/batch_track.py:13
Finding
External Import Path Allows Hijacking of track_express Module<![CDATA[ ## Vulnerability Details **File Location**: `scripts/batch_track.py`, lines 13–14 **Vulnerability Type**: Python module import hijacking through an externally controlled search path **Risk Level**: High ### Vulnerable Code ```python sys.path.insert(0, '/Users/junjian/.openclaw/workspace/skills/express-tracker/scripts') from track_express import get_query_info ``` ### Technical Analysis The batch-processing script places a hardcoded directory outside the audited artifact at the highest priority in Python's module search path. Consequently, the imported `track_express` module is not guaranteed to be the reviewed local file. An attacker who can write a same-named module into the external directory can replace the expected implementation. Importing that module executes its top-level statements, so exploitation does not require the malicious `get_query_info` function to be called successfully. This is an unsafe dependency-resolution practice because executable behavior is loaded from an external, mutable path without integrity or origin validation. ### Attack Path 1. The attacker gains write access to the hardcoded directory. 2. The attacker creates or modifies: ```text /Users/junjian/.openclaw/workspace/skills/express-tracker/scripts/track_express.py ``` 3. A user runs a documented batch operation, for example: ```bash python3 scripts/batch_track.py --nus YT2538259220416,SF1234567890 ``` 4. `batch_track.py` inserts the external directory at the beginning of `sys.path`. 5. Python resolves `track_express` to the attacker-controlled file. 6. The malicious module's top-level code executes during import and can optionally provide a counterfeit `get_query_info` function to avoid visible errors. ### Impact Assessment The attacker can execute arbitrary Python code under the invoking user's account. Potential consequences include reading accessible files and environment variables, modifying generated reports, falsifying query links, ch ...[truncated 270 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Delete the hardcoded `sys.path.insert` call. 2. Convert the scripts directory into a package and use a package-relative import: ```python from .track_express import get_query_info ``` 3. Provide a package entry point for command-line execution rather than relying on ad hoc path manipulation. 4. If compatibility requires local path setup, derive the directory from `Path(__file__).resolve().parent` and verify that the imported module resides beneath the trusted project root. 5. Add a regression test that checks `track_express.__file__` and fails if it resolves outside the installed Skill package. 6. Distribute the package through a reproducible build with pinned dependencies and integrity verification. ]]>
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
Findings (13)

Tp4

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding
The documented behavior materially overstates what the skill appears to implement, claiming logistics querying, query-link generation, and batch tracking that static analysis says are not actually present. Security-wise, description/behavior mismatches undermine informed consent and review, making it easier to hide missing features today or slip in unrelated functionality later under a trusted label.

Lp3

Medium
Category
MCP Least Privilege
Confidence
84% confidence
Finding
The skill documents scripts that read input files and write output files, but it does not declare any tool scope or permissions boundary. This creates an integrity and transparency problem: a host agent or reviewer cannot easily constrain file access, and users are not clearly informed that local file I/O is part of the skill's behavior.

Vague Triggers

Medium
Confidence
92% confidence
Finding
The example trigger "我的快递到哪了" is a natural conversational phrase rather than a narrowly scoped invocation, which can increase the chance of unintended activation in ordinary chat. The description also presents usage scenarios as broad examples without clarifying activation boundaries or exclusions.

Missing User Warnings

Medium
Confidence
92% confidence
Finding
The skill sends or encourages sending tracking numbers to an external courier-tracking website without an explicit warning. Tracking numbers can be sensitive personal or business data because they may reveal purchase activity, addresses, senders, timing, or customer relationships when submitted to a third-party service.

Context-Inappropriate Capability

Medium
Confidence
93% confidence
Finding
The script prepends a developer-specific absolute path to sys.path and imports code from there, which breaks package isolation and can cause the skill to load unintended local code if that path exists on the host. In environments where an attacker can place or influence files at that location, this becomes a code-loading risk; even without an attacker, it is unsafe and unreliable because behavior depends on a private filesystem layout.

Missing User Warnings

Medium
Confidence
90% confidence
Finding
This code iterates over user-supplied tracking numbers and calls `get_query_info`, which by the script's purpose and output links is an external express-query operation. While the module docstring says it performs batch tracking queries, there is no visible warning in this file that tracking numbers will be sent to an external service, which is a privacy-relevant network action.

Natural-Language Policy Violations

Medium
Confidence
95% confidence
Finding
This code file contains natural-language strings that present the tool exclusively in Chinese, including the module docstring and argument/help text. Under the policy, forcing a specific language without user opt-in or a documented regional justification is a natural-language policy violation.

Description-Behavior Mismatch

Medium
Confidence
95% confidence
Finding
The manifest and module docstring describe this as a 快递物流查询/快递查询 skill, which implies retrieving shipment status information. However, get_query_info only packages the tracking number, optionally infers a carrier, and constructs a kuaidi100 URL; no network request or logistics data retrieval occurs anywhere in the file.

Natural-Language Policy Violations

Medium
Confidence
97% confidence
Finding
Argument descriptions, prompts, and status messages are all hardcoded in Chinese and there is no mechanism for selecting another language. This creates a locale/language restriction without explicit opt-in, which matches the policy-violation category.

Natural-Language Policy Violations

Low
Confidence
88% confidence
Finding
The instructional comments in this example file are written entirely in Chinese, which can impose a language requirement on users without offering any alternative or opt-in. The policy explicitly calls for flagging language or locale constraints when they are forced rather than optional or justified.

Natural-Language Policy Violations

Low
Confidence
93% confidence
Finding
This code file contains natural-language content that assumes a Chinese-speaking user, including the module description and later printed test output. The policy requires avoiding forced language/locale behavior unless the skill offers user choice or clearly documents that it is intentionally region-specific.

Context-Inappropriate Capability

Low
Confidence
79% confidence
Finding
The script can launch a local browser via the --open flag, which causes a side effect beyond simple data formatting and link generation. While the URL is constrained to an HTTPS kuaidi100 link template, opening applications automatically can be risky in agent contexts because it may trigger unintended user-environment actions or leak tracking numbers into browser history/session state.

Description-Behavior Mismatch

Low
Confidence
92% confidence
Finding
The manifest says the skill supports '批量查询几个快递单号', but the CLI accepts only a single required --nu value and processes one tracking number per invocation. There is no loop, list input, or bulk-processing interface in the implementation.

Static analysis

No suspicious patterns detected.