Back to skill

Security audit

Express Tracker

Security checks for vulnerabilities and agentic risk

Overview

This package-tracking skill is mostly coherent, but it sends tracking numbers and an API key over unencrypted HTTP and uses fixed local credential/data paths.

Review this skill before installing. It is not a backdoor, but you should not use a valuable Juhe API key with it unless the endpoint is changed to HTTPS and the key storage is moved to a safer documented configuration location. Expect package numbers, courier status, and SMS-derived tracking data to be stored locally in the documented packages.json path.

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

Error
Location
scripts/track.py:20
Finding

API Credential and Tracking Data Transmitted over Plaintext HTTP

Content
View full analysis

Vulnerability Details

File Location: scripts/track.py, lines 20-22 and 37-40
Vulnerability Type: Cleartext transmission of sensitive information
Risk Level: High

Vulnerable Code

python
try:
    with open(_key_file, "r") as f:
        JUHE_KEY = f.read().strip()
except:
    JUHE_KEY = ""
JUHE_URL = "http://v.juhe.cn/exp/index"
python
def query_juhe(tn):
    """聚合数据查询 —— 主力"""
    params = urllib.parse.urlencode({"key": JUHE_KEY, "com": "auto", "no": tn.strip()})
    req = urllib.request.Request(f"{JUHE_URL}?{params}", headers={"User-Agent": "Mozilla/5.0"})
    try:
        with urllib.request.urlopen(req, timeout=8) as resp:
            data = json.loads(resp.read().decode("utf-8"))

Technical Analysis

The primary Juhe API endpoint uses unencrypted HTTP. The request places both the API credential (JUHE_KEY) and the user's package tracking number in the URL query string.

Because HTTP provides neither transport confidentiality nor endpoint integrity, an attacker capable of observing or modifying network traffic can read these values or alter the API response. URL query parameters may additionally be retained in intermediary proxy, gateway, or diagnostic logs.

No certificate validation or response authenticity mechanism can protect this request while the endpoint remains HTTP. The HTTPS-based fallback does not mitigate the issue because the plaintext Juhe request is attempted first for every query.

Attack Path

  1. A user invokes shipment tracking with a tracking number.
  2. The script reads the Juhe API key from Desktop/999.txt.
  3. query_juhe() constructs an HTTP URL containing the API key and tracking number as query parameters.
  4. The request traverses the network without encryption.
  5. A network-positioned attacker, compromised gateway, or untrusted hotspot captures the URL and obtains both values.
  6. The attacker may reuse the exposed key to consume the victim's API quota or submit unauthorized API requests ...[truncated 742 chars]
Remediation
View remediation

Remediation Suggestions

  1. Replace the plaintext endpoint with the provider's official HTTPS endpoint:

    python
    JUHE_URL = "https://v.juhe.cn/exp/index"
    
  2. Verify that the provider officially supports HTTPS and fail closed if a secure endpoint is unavailable. Do not silently downgrade to HTTP.

  3. Prevent redirects from HTTPS to HTTP, or validate the final response URL before processing the response.

  4. Avoid transmitting credentials in URL query strings when the provider supports authorization headers or POST request bodies. This reduces exposure through URL logging.

  5. Store the API key in an operating-system credential manager or a permission-restricted configuration source rather than a general Desktop text file.

  6. Rotate the existing Juhe API key because it may already have traversed untrusted networks in plaintext.

  7. Treat tracking numbers as sensitive personal metadata and document the external services to which they are transmitted.

  8. Add a regression test that rejects any API endpoint whose parsed scheme is not https.

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

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

This variant includes undeclared hardcoded filesystem access to a package data file and a desktop key file, which is a real security concern beyond mere feature mismatch. Hidden or underdocumented local resource access can expose sensitive tracking records, SMS-derived data, or API credentials, especially when users are not warned that personal shipment data and keys are stored in predictable locations.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding

This variant includes undeclared hardcoded filesystem access to a package data file and a desktop key file, which is a real security concern beyond mere feature mismatch. Hidden or underdocumented local resource access can expose sensitive tracking records, SMS-derived data, or API credentials, especially when users are not warned that personal shipment data and keys are stored in predictable locations.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
94% confidence
Finding

This variant includes undeclared hardcoded filesystem access to a package data file and a desktop key file, which is a real security concern beyond mere feature mismatch. Hidden or underdocumented local resource access can expose sensitive tracking records, SMS-derived data, or API credentials, especially when users are not warned that personal shipment data and keys are stored in predictable locations.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
94% confidence
Finding

This variant includes undeclared hardcoded filesystem access to a package data file and a desktop key file, which is a real security concern beyond mere feature mismatch. Hidden or underdocumented local resource access can expose sensitive tracking records, SMS-derived data, or API credentials, especially when users are not warned that personal shipment data and keys are stored in predictable locations.

Content

No source excerpt is available for this finding.

Missing User Warnings

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

The primary API endpoint uses plain HTTP, so the tracking number and API key are sent without transport encryption and can be intercepted or modified by a network attacker. This exposes both user shipment data and the credential, enabling privacy loss, account abuse, or tampering with returned tracking information.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
93% confidence
Finding

The skill advertises and documents file, network, and local key usage, but declares no explicit tool scope or permission boundaries. That creates an overbroad execution surface where an agent may access local files and external services without clear user consent or sandbox constraints, increasing the risk of unintended data exposure.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The description says users can '输入任意单号自动识别' and describes broad capabilities like SMS forwarding and continuous tracking, but it does not clearly define when the skill should activate versus when it should not. For a markdown skill file, this kind of open-ended invocation language can overlap with ordinary conversation and lacks negative examples or scoped trigger constraints.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill describes storing tracking data and parsing forwarded SMS but does not warn users that potentially sensitive personal information will be persisted locally. Shipping records, phone-message contents, names, addresses, and courier metadata can reveal behavioral and location patterns, so silent local storage materially increases privacy and security risk.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The clean command permanently removes delivered records older than 7 days via save_packages(data). Although the command name and docstring indicate cleanup, there is no confirmation prompt or stronger user-facing warning that invoking it will delete stored tracking history, which can affect user data.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The module docstring is entirely in Chinese and presents the script's usage and scheduled behavior only in that language. Under the policy, forcing a specific language without user opt-in is a natural-language policy violation unless the locale constraint is explicitly documented and justified, which is not present here.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The printed status messages, greetings, headings, and call-to-action text are all hardcoded in Chinese, so users receive output only in that language. The file does not offer a language selection mechanism or state a justified region-specific limitation, so this conflicts with the language/locale policy.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
83% confidence
Finding

The code stores package history in a fixed local directory, which introduces persistent collection of shipment metadata beyond a one-off query. While this may support the advertised tracking features, it still creates privacy and data retention risk because tracking numbers, courier names, status, and traces are written locally without consent or retention controls.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The script reads an API key from a hard-coded Desktop file under the user's profile, which is an unexpected local file access pattern for a tracking utility and is not disclosed to the user. This creates unnecessary credential exposure risk and couples the skill to sensitive local filesystem contents that could be repurposed to access other files in similar ways.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The script silently reads a credential-like value from a Desktop file with no user prompt or documentation. Hidden credential collection is risky because users may not realize the skill accesses local files for secrets, and the pattern normalizes unauthorized local data access.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The script persistently writes package-tracking records and updates them over time without any user-facing disclosure or consent flow. Because shipment traces can reveal locations, timing, and delivery status, silent storage creates a privacy issue and increases the impact if the local machine or files are accessed by others.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
76% confidence
Finding

All user-facing instructions and descriptions are presented only in Chinese, with no indication that the user can choose another language or that the skill is intentionally limited to a Chinese-speaking audience. Under the policy, forcing a specific language without user opt-in is a natural-language policy concern.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
87% confidence
Finding

Automatic scheduled reports create an ongoing data disclosure channel, and users should be warned if shipment status will be pushed proactively on a schedule. Even if impact is lower than credential exposure, unexpected periodic reporting can leak private logistics activity to shared devices, accounts, or unintended recipients.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
95% confidence
Finding

All user-facing strings, usage text, and command feedback are hardcoded in Chinese, with no option for the user to select another language. This is a natural-language policy concern because the skill imposes a specific locale without opt-in or documented region-specific justification.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
94% confidence
Finding

The module docstring presents the skill name and usage only in Chinese, and the script also emits Chinese user-facing strings such as courier labels and route formatting. This imposes a fixed language/locale without any opt-in or documented justification, which matches the language policy violation category.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
84% confidence
Finding

User-visible strings throughout the script, including usage, statuses, and output formatting, are hard-coded in Chinese. The policy requires avoiding a forced language or locale unless the tool offers user choice or clearly documents a justified locale restriction.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.