Back to skill

Security audit

Query company customs trade statistics by region dimension — analyze trade volume, amount,monthly trends, and country distribution across global markets. Perfect for regional tradeanalysis, company import-export country distribution, global trade intelligence, supplier marketcoverage assessment and cross-border market trend monitoring.

Security checks for vulnerabilities and agentic risk

Overview

The skill is mostly a disclosed paid UpKuaJing customs-data integration, but it handles API keys and account/payment flows in ways users should review carefully before installing.

Review this skill before installing if you are not comfortable with a paid external API integration storing a reusable API key in ~/.upkuajing/.env. Prefer setting UPKUAJING_API_KEY through a secure secret mechanism, avoid displaying the .env file contents, restrict file permissions on ~/.upkuajing and its .env file, and confirm any billed query or top-up action explicitly.

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

Warning
Location
scripts/auth.py:59
Finding

API Credential File Is Created Without Restrictive Permissions

Content
View full analysis
Remediation
View remediation

T08 · Insecure Dependencies

Note
Location
requirements.txt:1
Finding

Unbounded Third-Party Dependency Reduces Supply-Chain Integrity

Content
View full analysis
=0.23.0 ``` The corresponding installation instruction is: ```bash pip install -r requirements.txt ``` ### Technical Analysis The dependency declaration provides only a minimum version and permits pip to install any future `httpx` release, together with dependency versions selected at installation time. This prevents reproducible builds and means the reviewed Skill may execute with code that did not exist at the time of the audit. No typosquatted package name, custom package index, direct URL dependency, or currently malicious package was identified. The risk arises from unconstrained future package resolution and transitive dependencies rather than evidence that `httpx` itself is malicious. A compromised, incompatible, or unexpectedly changed future release could run code during installation or import under the privileges of the user operating the Skill. ### Attack Path 1. The user or Agent follows the documented command `pip install -r requirements.txt`. 2. pip queries its configured package repository and resolves the latest release satisfying `httpx>=0.23.0`. 3. A future compromised or behaviorally incompatible release—or one of its unconstrained transitive dependencies—is selected. 4. Package installation or later import executes the affected package code under the invoking user’s privileges. 5. That code could access data available to the process, including the dedicated API credential file if filesystem permissions permit it. This path depends on a compromised or unsafe future package artifact, package repository, resolver configuration, or transitive dependency. ### Impact Assessment The potential impact is bounded by the privileges of the user running pip or the Skill. A malicious dependency could theo ...[truncated 389 chars]
Remediation
View remediation
``` 2. Generate and commit a lock file containing exact versions of all transitive dependencies. 3. Record cryptographic hashes and install with hash enforcement: ```bash python -m pip install --require-hashes -r requirements.lock ``` 4. Define a controlled update process that includes dependency review, vulnerability scanning, compatibility tests, and regeneration of hashes. 5. Run installation in an isolated virtual environment without administrator privileges. 6. Where practical, configure pip to use a trusted, controlled package index and prohibit unexpected direct URLs or additional indexes. ]]>
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • 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
Findings (37)

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

If the associated code performs software update checks, local cache writes, and outbound version requests unrelated to trade-statistics functionality, that is a meaningful behavior mismatch from the declared purpose. Such hidden maintenance/network behavior expands the attack surface and can surprise users with extra outbound communication and local persistence beyond the advertised analytics task.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

If the associated code performs software update checks, local cache writes, and outbound version requests unrelated to trade-statistics functionality, that is a meaningful behavior mismatch from the declared purpose. Such hidden maintenance/network behavior expands the attack surface and can surprise users with extra outbound communication and local persistence beyond the advertised analytics task.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

If the associated code performs software update checks, local cache writes, and outbound version requests unrelated to trade-statistics functionality, that is a meaningful behavior mismatch from the declared purpose. Such hidden maintenance/network behavior expands the attack surface and can surprise users with extra outbound communication and local persistence beyond the advertised analytics task.

Content

No source excerpt is available for this finding.

Credential Access

High
Category
Privilege Escalation
Confidence
98% confidence
Finding

The skill explicitly instructs reading ~/.upkuajing/.env to obtain an API key, which is direct access to local credentials. Exposing or retrieving secrets from a plaintext file in the user's home directory is dangerous because it can leak reusable authentication material and normalize unsafe secret-handling practices.

Content

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

This skill requires an API key. The API key is stored in the ~/.upkuajing/.env file:

bash
cat ~/.upkuajing/.env

Example file content:

text

Credential Access

High
Category
Privilege Escalation
Confidence
97% confidence
Finding

This section directs the workflow around checking for a local API key and, if missing, obtaining a new one that will be automatically saved to a local .env file. Automatically creating and persisting credentials in a user-home plaintext file increases exposure of sensitive tokens and couples a data-query skill with credential lifecycle operations that should be more tightly controlled.

Content

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

md
### **API Key Not Set**
First check if the `~/.upkuajing/.env` file has UPKUAJING_API_KEY;
If UPKUAJING_API_KEY is not set, prompt the user to choose:
1. User has one: User provides it (manually add to ~/.upkuajing/.env file)
2. User doesn't have one: You can apply using the interface (`auth.py --new_key`), the new key will be automatically saved to ~/.upkuajing/.env
Wait for user selection;

Credential Access

High
Category
Privilege Escalation
Confidence
97% confidence
Finding

The workflow normalizes checking and populating ~/.upkuajing/.env for secret management, again creating a direct credential-access path in the skill instructions. In context, this is especially risky because the same skill can make network requests and paid API calls, so credential exposure could enable unauthorized data access and charges.

Content

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

md
First check if the `~/.upkuajing/.env` file has UPKUAJING_API_KEY;
If UPKUAJING_API_KEY is not set, prompt the user to choose:
1. User has one: User provides it (manually add to ~/.upkuajing/.env file)
2. User doesn't have one: You can apply using the interface (`auth.py --new_key`), the new key will be automatically saved to ~/.upkuajing/.env
Wait for user selection;

### **Account Top-up**

Description-Behavior Mismatch

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The file implements API key issuance, account lookup, pricing, and recharge-order creation, which are materially broader than the declared purpose of a read-oriented customs regional analytics skill. In an agent-skill ecosystem, hidden billing/auth-management logic increases the attack surface and can enable unexpected credential provisioning or monetization flows that users would not reasonably expect from this skill.

Content

No source excerpt is available for this finding.

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · scripts/auth.py (reported line 18)May include surrounding context.

python
"""
    申请新的 API 密钥。
    """
    # 检查是否已存在 .env 文件和 API key
    env_file = UPKUAJING_ENV_FILE

    if env_file.exists():

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · scripts/auth.py (reported line 22)May include surrounding context.

python
"""
    申请新的 API 密钥。
    """
    # 检查是否已存在 .env 文件和 API key
    env_file = UPKUAJING_ENV_FILE

    if env_file.exists():

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · scripts/auth.py (reported line 78)May include surrounding context.

python
"""
    申请新的 API 密钥。
    """
    # 检查是否已存在 .env 文件和 API key
    env_file = UPKUAJING_ENV_FILE

    if env_file.exists():

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · scripts/common.py (reported line 63)May include surrounding context.

python
"""
    申请新的 API 密钥。
    """
    # 检查是否已存在 .env 文件和 API key
    env_file = UPKUAJING_ENV_FILE

    if env_file.exists():

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · scripts/common.py (reported line 85)May include surrounding context.

python
"""
    申请新的 API 密钥。
    """
    # 检查是否已存在 .env 文件和 API key
    env_file = UPKUAJING_ENV_FILE

    if env_file.exists():

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · scripts/common.py (reported line 90)May include surrounding context.

python
"""
    申请新的 API 密钥。
    """
    # 检查是否已存在 .env 文件和 API key
    env_file = UPKUAJING_ENV_FILE

    if env_file.exists():

Credential Access

High
Category
Privilege Escalation
Confidence
84% confidence
Finding

The code writes a newly issued API key to a local .env file in plaintext, which can expose credentials to other local users, backup systems, logs, or accidental inclusion in tooling. In an analytics skill, this secret-persistence behavior is especially risky because users may not expect credential storage side effects.

Content

Scanner excerpt · scripts/auth.py (reported line 71)May include surrounding context.

python
"envFilePath": str(env_file)
        }

    # 保存到 .env 文件
    try:
        with open(env_file, 'w', encoding='utf-8') as f:
            f.write(f"{API_KEY_ENV}={api_key}\n")

Context-Inappropriate Capability

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

Creating recharge/payment orders is not justified by the stated analytics-only functionality and introduces an unnecessary financial action into the skill. If exposed through an agent workflow, this could trigger or facilitate unintended payment flows, phishing-style redirection, or abuse of a user's billing relationship.

Content

No source excerpt is available for this finding.

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · scripts/common.py (reported line 19)May include surrounding context.

python
API_BASE_URL = "https://openapi.upkuajing.com"
API_KEY_ENV = "UPKUAJING_API_KEY"
UPKUAJING_DIR = Path.home() / '.upkuajing'
UPKUAJING_ENV_FILE = UPKUAJING_DIR / '.env'
UPKUAJING_LOGS_DIR = UPKUAJING_DIR / 'logs'

# 日志开关

Description-Behavior Mismatch

High
Category
Not specified by scanner
Confidence
97% confidence
Finding

The manifest describes a skill for querying and analyzing company customs trade statistics by region, monthly trends, and country distribution. This file instead implements exception reporting to a platform endpoint, including collecting request metadata and sending it to '/agent/skill/error/report', which is operational telemetry rather than trade-statistics functionality.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
95% confidence
Finding

The skill declares capabilities that involve environment access, local file reads/writes, and network activity, but it does not explicitly scope or constrain those powers via permissions or allowed-tools metadata. In a skill that handles credentials and can contact remote services, missing tool-scope declarations increases the chance of overbroad execution and makes it harder for a host to enforce least privilege.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The trigger phrases are broad and overlap with general trade-analysis requests, which can cause unintended invocation of a skill that performs paid queries and credential/account operations. While not an exploit by itself, ambiguous triggering raises the likelihood of accidental execution and unexpected cost or data access.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The module docstring and user-facing descriptions are presented exclusively in Chinese, which can impose a specific language on users without opt-in. The policy explicitly flags language or locale constraints when the skill does not offer a user choice or justify the restriction.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

Automatic API key application and local credential-file persistence are context-inappropriate for a trade analytics skill and may surprise users by creating or storing credentials outside the stated purpose. While not inherently malicious, bundling credential lifecycle actions with analytics increases the risk of accidental credential exposure and unauthorized account enrollment.

Content

No source excerpt is available for this finding.

Unsafe Defaults

Medium
Category
Tool Misuse
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.

Content

Scanner excerpt · scripts/auth.py (reported line 41)May include surrounding context.

python
pass  # 如果读取失败,继续执行

    # 不需要认证申请新密钥
    response = make_request('/agent/auth/create', {}, require_auth=False)

    # 检查是否申请成功
    if response.get('code') != 0:

Unsafe Defaults

Medium
Category
Tool Misuse
Confidence
80% 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.

Content

Scanner excerpt · scripts/auth.py (reported line 41)May include surrounding context.

python
pass  # 如果读取失败,继续执行

    # 不需要认证申请新密钥
    response = make_request('/agent/auth/create', {}, require_auth=False)

    # 检查是否申请成功
    if response.get('code') != 0:

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The code sends params to an external API via client.post(...), which may include user or system data. Although the function has an internal docstring, there is no user-facing confirmation, print/log disclosure, or other warning near execution to inform users that their data is being transmitted off-host.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The module docstring and all user-facing messages are written exclusively in Chinese, and the file does not indicate that language selection is configurable or that the skill is intentionally limited to a Chinese-speaking or region-specific context. Under the policy, hard-coding a specific language without opt-in can be a natural-language locale violation.

Content

No source excerpt is available for this finding.