Back to skill

Security audit

Query paginated trade-area data for a company — retrieve country/region breakdowns withtrade counts, amounts, and percentages for market-analysis. Designed for customs dataresearch, paginated region queries, company trade country breakdowns, import-export marketanalysis and trade region drill-down across 220+ countries and territories.

Security checks for vulnerabilities and agentic risk

Overview

The skill mostly supports paid UpKuaJing trade queries, but its API-key handling and hidden version-check state create avoidable credential and privacy risks.

Install only if you are comfortable with a paid API skill that reads/writes `~/.upkuajing` and contacts UpKuaJing services. Do not print or paste the contents of `~/.upkuajing/.env`; use an environment variable or a tightly permissioned secret file, confirm any paid query or top-up action separately, and review error reports before sending them.

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

T09 · Insecure Skill Coding Practices

Warning
Location
SKILL.md:37
Finding

Credential Disclosure Through API Key Setup Instructions

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/auth.py:62
Finding

API Key Stored Without Enforced Restrictive File Permissions

Content
View full analysis
Remediation
View remediation

T08 · Insecure Dependencies

Note
Location
requirements.txt:1
Finding

Unbounded Third-Party Dependency Version

Content
View full analysis
=0.23.0 ``` The dependency is installed through the following documented command: ```bash pip install -r requirements.txt ``` ### Technical Analysis The dependency constraint accepts every `httpx` release from version 0.23.0 onward. Consequently, installation behavior can change over time without any change to the reviewed Skill package. No malicious or typosquatted dependency was identified in the audited project: `httpx` is a legitimate package. The weakness is that there is no upper bound, exact audited version, lock file, or package hash. This prevents reproducible installation and allows future incompatible or compromised releases to be selected automatically. Python packages execute installation and runtime code with the privileges of the invoking user. Dependency integrity is therefore part of the Skill’s security boundary. ### Attack Path 1. A future release satisfying `httpx>=0.23.0` becomes vulnerable, compromised, or incompatible. 2. A user follows the documented installation command. 3. Pip resolves the newest matching package rather than a specifically reviewed artifact. 4. The package is installed into the selected Python environment. 5. Package code executes at installation or when the Skill imports `httpx`. 6. A compromised package would obtain the same local privileges as the user running the Skill, including access to environment variables and files readable by that user. This is a conditional supply-chain path; the audit found no evidence that the currently named package is malicious. ### Impact Assessment A compromised dependency could theoretically execute arbitrary code with the invoking user’s privileges, read the API key, alter query results, access user- ...[truncated 165 chars]
Remediation
View remediation
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
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
Findings (37)

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

Remote version checking, local metadata reads, cache-file writes, and upgrade notifications are outside the core trade-area query function and are not disclosed by the skill's purpose statement. This broadens network and file-write behavior in ways that can surprise users and may expose the environment to unnecessary remote contact and local state changes.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
92% confidence
Finding

Remote version checking, local metadata reads, cache-file writes, and upgrade notifications are outside the core trade-area query function and are not disclosed by the skill's purpose statement. This broadens network and file-write behavior in ways that can surprise users and may expose the environment to unnecessary remote contact and local state changes.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

Remote version checking, local metadata reads, cache-file writes, and upgrade notifications are outside the core trade-area query function and are not disclosed by the skill's purpose statement. This broadens network and file-write behavior in ways that can surprise users and may expose the environment to unnecessary remote contact and local state changes.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

Remote version checking, local metadata reads, cache-file writes, and upgrade notifications are outside the core trade-area query function and are not disclosed by the skill's purpose statement. This broadens network and file-write behavior in ways that can surprise users and may expose the environment to unnecessary remote contact and local state changes.

Content

No source excerpt is available for this finding.

Credential Access

High
Category
Privilege Escalation
Confidence
97% confidence
Finding

The skill instructs reading ~/.upkuajing/.env directly and even shows cat ~/.upkuajing/.env, which encourages exposing raw secrets in plaintext. Any workflow that reads or prints the entire env file risks credential disclosure to the model, logs, transcripts, or other tools.

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
96% confidence
Finding

The workflow directs the agent to inspect a local .env file for an API key and potentially participate in credential setup. Accessing and handling local secret files expands the skill beyond data retrieval into secret management, increasing the risk of accidental disclosure, overwrite, or misuse of credentials.

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
95% confidence
Finding

The skill states that obtaining a new key will automatically save it to ~/.upkuajing/.env, normalizing persistent plaintext secret storage on disk. Automatic credential writing to user home directories is risky because file permissions, backups, logs, or other local processes may expose the key, and users may not realize the persistence implications.

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 authentication, account lookup, pricing, and recharge-order creation for a skill whose declared purpose is only paginated trade-area market analysis. This expands the capability surface beyond user expectations and introduces sensitive financial/account operations that could be invoked through the skill package.

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 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 script reads an existing .env file to inspect stored API keys, which is sensitive credential handling inside a skill that is not primarily an auth-management tool. Storing and processing secrets in plaintext local files increases exposure risk from local compromise, backups, logs, or accidental disclosure.

Content

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

python
env_file = UPKUAJING_ENV_FILE

    if env_file.exists():
        # 读取现有的 .env 文件
        try:
            with open(env_file, 'r', encoding='utf-8') as f:
                content = f.read()

Credential Access

High
Category
Privilege Escalation
Confidence
91% confidence
Finding

The script writes a newly issued API key directly into a local .env file, creating plaintext secret persistence on disk. This can expose credentials to other local users, malware, shell history/workspace leakage, backups, or accidental inclusion in archives and repositories.

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 unrelated to a company trade-area query skill and gives the package a monetization/transaction capability not justified by its stated purpose. If exposed to users or agents, it could trigger unwanted billing flows or social-engineer operators into funding an account.

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'

# 日志开关

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
88% confidence
Finding

The skill declares capabilities that include environment access, filesystem interaction, and network use, but does not constrain them with an explicit tool scope such as allowed-tools or permissions. That increases the blast radius if the skill is misused, modified, or prompted into performing actions beyond its advertised purpose, especially because it also handles credentials and paid operations.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The document instructs agents to send request parameters, response payloads, and exception context to a centralized error-reporting API, which can include sensitive business data, identifiers, or stack traces. Although it notes that some sensitive fields are automatically masked, it does not require explicit minimization, user/operator notice, or clear prohibition on including confidential data, creating a real privacy and data-exposure risk if agents forward raw inputs and outputs during failures.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

This file presents its description and operational messages in a single fixed language, which can violate a language/locale policy when no user opt-in or justification is provided. The same pattern continues throughout the CLI help and output strings, indicating the skill forces one locale rather than offering a choice.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The code can provision new API keys and persist them locally even though the skill is supposed to perform trade-area queries, not credential lifecycle management. This broadens privilege handling and increases the risk of unauthorized key issuance, misuse, or accidental exposure.

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:

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The file's natural-language documentation and user-facing messages are written exclusively in Chinese, which imposes a specific language/locale without any visible opt-in or alternative. Under the policy, a skill should not force a language choice unless it is explicitly justified or the user is given a choice.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
84% confidence
Finding

This code posts the provided params to a remote API endpoint, which may include user or system data, but the function does not emit any user-facing notice or confirmation before transmission. Although there is a docstring describing the HTTP request, there is no runtime disclosure to the user about outbound data transfer in this code path.

Content

No source excerpt is available for this finding.