Back to skill

Security audit

Query date reference information for customs trade data queries — retrieve last year, last month, and same-month-last-year date values for use in trade data queries. Provides accurate fiscal reference dates for customs data analysis and import-export trade research. Designed for export teams, trade analysts and import-export professionals who need precise date parameters for customs trade queries, market trend analysis and trade intelligence research across 220+ countries and territories.

Security checks for vulnerabilities and agentic risk

Overview

This is a real UpKuaJing date API helper, but it handles API keys, billing/account operations, and hidden update-check persistence in ways users should review before installing.

Review this skill before installing. Do not let an agent print or paste the contents of `~/.upkuajing/.env`; use a secret manager or environment variable if possible, and if the file is used, keep `~/.upkuajing` owner-only and the `.env` file mode `0600`. Only approve billable queries, top-up/payment-order creation, and error reports when you understand what will be sent to UpKuaJing. Be aware that normal API calls also trigger an undocumented version check and local cache write.

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

Documentation Instructs Users to Expose the Complete API Key

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/auth.py:71
Finding

API Key File Is Created Without Explicitly Restrictive Permissions

Content
View full analysis
Remediation
View remediation

T08 · Insecure Dependencies

Note
Location
requirements.txt:1
Finding

Unbounded and Unlocked Third-Party Dependency

Content
View full analysis
=0.23.0 ``` The documented installation flow executes: ```bash pip install -r requirements.txt ``` ### Technical Analysis The dependency declaration specifies only a minimum version and provides no upper bound, exact version, lockfile, or integrity hashes. Consequently, installations performed at different times can resolve to materially different versions that were not reviewed with this Skill. The package name does not appear to be a typosquat, and the audit found no evidence that the currently intended `httpx` package is malicious. The risk is that a future compromised, incompatible, or unexpectedly changed release would be accepted automatically by the broad version constraint. Python packages execute with the installing user's privileges during installation and import/runtime, making reproducible and integrity-verified dependency resolution important. ### Attack Path 1. A user follows the documented dependency installation command. 2. Package resolution selects the newest release satisfying `httpx>=0.23.0`. 3. That release has not necessarily been reviewed or tested by the Skill author. 4. If the selected package release or its dependency chain is compromised, attacker-controlled code executes during installation or later import/runtime. 5. The code receives the privileges of the user running the Skill and may access data available to that process, including the API credential. This exploitation path is conditional on a future dependency or transitive dependency compromise; no such compromise was established during this static audit. ### Impact Assessment A compromised dependency could execute arbitrary code with the invoking user's privileges, access local files available to that user, read the API key from the environment or configuration fil ...[truncated 242 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
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
Findings (40)

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The documented functionality includes version checking, reading local metadata, writing a cache under ~/.upkuajing, and emitting upgrade notices, none of which are implied by a simple date-reference skill. This hidden auxiliary behavior expands the attack surface with unnecessary network and filesystem access and makes the skill less predictable in restricted environments.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The documented functionality includes version checking, reading local metadata, writing a cache under ~/.upkuajing, and emitting upgrade notices, none of which are implied by a simple date-reference skill. This hidden auxiliary behavior expands the attack surface with unnecessary network and filesystem access and makes the skill less predictable in restricted environments.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The documented functionality includes version checking, reading local metadata, writing a cache under ~/.upkuajing, and emitting upgrade notices, none of which are implied by a simple date-reference skill. This hidden auxiliary behavior expands the attack surface with unnecessary network and filesystem access and makes the skill less predictable in restricted environments.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The documented functionality includes version checking, reading local metadata, writing a cache under ~/.upkuajing, and emitting upgrade notices, none of which are implied by a simple date-reference skill. This hidden auxiliary behavior expands the attack surface with unnecessary network and filesystem access and makes the skill less predictable in restricted environments.

Content

No source excerpt is available for this finding.

Credential Access

High
Category
Privilege Escalation
Confidence
98% confidence
Finding

The skill instructs reading ~/.upkuajing/.env directly and even shows a command to print it, which can expose API keys and other secrets in cleartext. In an agent setting, normalizing direct secret-file access increases the chance of credential disclosure to logs, transcripts, or unauthorized components.

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

The workflow explicitly checks for API keys in a local .env file and supports automatically saving newly created keys there. This couples the skill to local credential-store inspection and modification, creating both read and write risk for secrets and increasing the blast radius if the skill is misused or compromised.

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 documented flow encourages checking and populating a plaintext local .env credential file as part of normal skill operation. Making credential-file access part of the expected workflow materially raises the risk of secret leakage, unauthorized overwrites, and persistence of sensitive data in insecure local storage.

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, billing, and pricing operations, which are unrelated to the declared purpose of a date-reference helper. This capability mismatch is dangerous because it expands the skill’s privileges and attack surface beyond user expectations, enabling credential provisioning and financial/account actions under misleading packaging.

Content

No source excerpt is available for this finding.

Credential Access

High
Category
Privilege Escalation
Confidence
87% confidence
Finding

This code explicitly targets a .env file for API key handling, indicating credential material is read from local plaintext configuration. Accessing and managing secrets in this manner increases the risk of leakage through filesystem access, backups, logs, or accidental check-in.

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

The script opens and reads the .env file contents to discover an existing API key. Reading secrets from plaintext local storage broadens the credential exposure surface and is particularly concerning in a skill whose advertised purpose does not justify secret management.

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

Context-Inappropriate Capability

High
Category
Not specified by scanner
Confidence
97% confidence
Finding

The code exposes account-management and payment-related capabilities that are unjustified for a date utility. In a misleading skill context, these functions can be abused to create credentials, enumerate account data, or initiate recharge/payment flows that users and reviewers would not expect.

Content

No source excerpt is available for this finding.

Credential Access

High
Category
Privilege Escalation
Confidence
95% confidence
Finding

The code writes the API key directly into a .env file in plaintext. Plaintext persistence of live credentials can lead to credential theft by local users, malware, backups, or accidental upload, enabling unauthorized API access and possible account or billing abuse.

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")

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'

# 日志开关

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
def load_env_file() -> Dict[str, str]:
    """
    从 ~/.upkuajing/.env 文件加载环境变量。

    Returns:
        环境变量字典

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
def load_env_file() -> Dict[str, str]:
    """
    从 ~/.upkuajing/.env 文件加载环境变量。

    Returns:
        环境变量字典

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
def load_env_file() -> Dict[str, str]:
    """
    从 ~/.upkuajing/.env 文件加载环境变量。

    Returns:
        环境变量字典

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
def load_env_file() -> Dict[str, str]:
    """
    从 ~/.upkuajing/.env 文件加载环境变量。

    Returns:
        环境变量字典

Description-Behavior Mismatch

High
Category
Not specified by scanner
Confidence
97% confidence
Finding

This file implements remote exception reporting that is unrelated to the declared purpose of a date-reference skill. It sends operational metadata and free-form context to an external endpoint, which expands the skill's data flows and creates a risk of unintended data exfiltration if request identifiers, paths, or context contain sensitive user or system information.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
Not specified by scanner
Confidence
97% confidence
Finding

This module performs outbound network requests and persists cache state even though the advertised skill purpose is only to provide date reference values. That hidden side-effect expands the trust boundary, can leak environment usage metadata to a remote service, and introduces unnecessary external dependency and persistence behavior that users would not reasonably expect from this skill.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
93% confidence
Finding

The skill advertises executable behaviors that include environment access, local file read/write, and network use, but it declares no explicit tool scope or permission boundaries. This creates an over-privileged and poorly constrained skill surface, making unintended credential access, file modification, or remote calls more likely if the skill is invoked in an automated agent environment.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The manifest description lists trigger terms such as "last year" and "last month" alongside a generic "date reference" phrase. In a markdown/manifest context, these are broad enough to match ordinary conversation outside the intended customs-trade domain, and the file does not provide exclusion conditions or tighter activation scope in the trigger field.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The document instructs agents to send request parameters, response data, and error context to a platform error-reporting API, which can include sensitive operational or user data. Although it notes that sensitive fields are automatically redacted, it does not provide an explicit warning, consent model, or minimization guidance, so users or integrators may transmit confidential information unintentionally.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

This Python file contains natural-language descriptions, CLI help text, and user-visible messages exclusively in Chinese. Under the policy, forcing a specific language without offering a user choice or documenting a justified locale constraint is a natural-language policy violation.

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: