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 appears to be a real API-backed date helper, but it also handles API keys, account details, payment top-up orders, error reporting, and automatic version checks.

Install only if you are comfortable with this skill using a paid UpKuaJing API key, storing that key in a plaintext home-directory .env file, contacting UpKuaJing servers, checking account/balance information, creating top-up payment orders when directed, and sending diagnostic reports after confirmation. Review the fee-confirmation behavior and avoid using broad date prompts unless you intend to invoke this paid platform workflow.

Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
Findings (26)

Lp3

Medium
Category
MCP Least Privilege
Confidence
94% confidence
Finding
The skill declares a narrow purpose but includes capabilities to read/write local files, access environment credentials, and make network calls without explicit permission declarations. This weakens transparency and consent boundaries: a user invoking a simple date helper may unknowingly trigger credential handling or remote operations.

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding
The documented purpose is a simple date-reference lookup, but the skill also supports API key provisioning, local credential storage, balance checks, payment order creation, pricing queries, remote error reporting, version checks, and local data management. This mismatch is dangerous because it expands the attack and privacy surface far beyond what a user would reasonably expect from the description.

Description-Behavior Mismatch

High
Confidence
99% confidence
Finding
The file implements API key issuance, account inspection, recharge-order creation, and pricing queries, which are unrelated to the declared skill purpose of providing date reference values for trade queries. This capability mismatch is dangerous because a user or host system may trust and install a seemingly harmless date utility while actually introducing credential lifecycle and billing operations that expand attack surface and enable unauthorized account actions.

Context-Inappropriate Capability

High
Confidence
98% confidence
Finding
Account information retrieval and recharge-order creation are unjustified for a date-reference skill and introduce financial and privacy-sensitive operations into an unrelated context. In a skill expected to compute dates, hidden billing capabilities increase the risk of deceptive behavior, accidental invocation, or abuse of trusted installation paths to expose account data or initiate payment workflows.

Context-Inappropriate Capability

Medium
Confidence
97% confidence
Finding
Provisioning and persisting API keys is unnecessary for a date-reference utility and creates avoidable secret-handling risk. Even if intended for platform integration, storing credentials in a local .env file broadens exposure through file disclosure, backup leakage, or reuse by other processes, especially when users do not expect secret management from a date helper skill.

Description-Behavior Mismatch

Medium
Confidence
94% confidence
Finding
The utility layer performs authenticated network requests to an external API, including bearer-token use and response handling, which goes beyond the skill’s narrowly declared purpose of computing reference dates. In this context, hidden outbound access expands the skill’s capability surface and could transmit user/query data or consume paid API resources unexpectedly.

Context-Inappropriate Capability

Medium
Confidence
97% confidence
Finding
The code retrieves an API key from process environment variables and a user-home .env file even though the skill is presented as date-reference-only. Secret access that is unnecessary for the advertised function is dangerous because it expands trust assumptions and enables authenticated external actions using user credentials.

Context-Inappropriate Capability

Medium
Confidence
92% confidence
Finding
The skill implements local task metadata and result persistence under task_data, which is unrelated to simply deriving last month/last year dates. Unnecessary local state increases the data-retention and tampering surface and can store query artifacts without users expecting persistent files.

Description-Behavior Mismatch

High
Confidence
92% confidence
Finding
The script’s behavior is inconsistent with the declared skill purpose of returning date reference values for trade queries. Instead, it collects and transmits operational error data, which expands the skill’s capability surface and can enable unexpected data exfiltration of request metadata and context in an environment where users would not reasonably expect telemetry.

Context-Inappropriate Capability

Medium
Confidence
88% confidence
Finding
The code performs a remote API call to report exceptions, a network capability unrelated to a date-reference utility. In a minimally scoped skill, undisclosed outbound communication is dangerous because it can leak request identifiers, paths, and free-form context to an external service beyond the user’s immediate task.

Description-Behavior Mismatch

High
Confidence
95% confidence
Finding
This date-reference skill contains unrelated update-check logic that makes outbound network requests and writes persistent state to disk. While the behavior is not directly code-execution or credential theft, it expands the skill's trust boundary, creates undisclosed telemetry/persistence, and violates least-privilege for a skill whose declared purpose is only date calculation.

Context-Inappropriate Capability

High
Confidence
94% confidence
Finding
The remote version-check capability is unjustified for the stated purpose of returning reference dates. Any unnecessary network path increases attack surface, can leak metadata such as installed skill names, and allows external infrastructure to influence runtime behavior or availability expectations.

Context-Inappropriate Capability

Medium
Confidence
90% confidence
Finding
The skill persists version-cache data under the user's home directory even though persistent storage is unnecessary for a date-reference function. This creates avoidable filesystem side effects, leaves artifacts about installed skills and check history, and normalizes hidden persistence in a low-scope utility.

Vague Triggers

Medium
Confidence
83% confidence
Finding
The trigger phrases include broad date-related terms such as 'last year' and 'last month', which can collide with many ordinary user requests unrelated to customs data. In context, accidental invocation is more dangerous because this skill can lead to paid API calls, credential checks, and other side effects beyond a harmless date calculation.

Missing User Warnings

Medium
Confidence
86% confidence
Finding
The document instructs agents to upload request parameters, response payloads, and exception context to an error-reporting API, which can easily include sensitive business data, identifiers, tokens, or stack traces. Although it states that sensitive fields will be auto-masked, it does not define the masking scope or require users to minimize or review submitted data first, creating a realistic risk of unintended data exfiltration to the platform.

Missing User Warnings

Medium
Confidence
90% confidence
Finding
Request and response logging writes transmitted data to files in the user home directory when enabled, without any user-facing warning or redaction. These logs may capture sensitive request parameters, API responses, and operational metadata that persist locally and can be accessed later by other processes or users.

Missing User Warnings

Medium
Confidence
90% confidence
Finding
The script sends exception report data, including request context, to a remote endpoint without any visible warning, consent flow, or redaction logic. Because the context field is free-form, it may contain sensitive business data, tokens, prompts, or user content, making silent transmission a privacy and data-handling risk.

Missing User Warnings

Low
Confidence
83% confidence
Finding
The HTTP request sends the skill name to a remote API without any visible user notice or consent path in this file. The data exposed is limited, but undisclosed outbound metadata transmission is still a privacy and transparency issue, especially in a skill that should operate locally.

Credential Access

High
Category
Privilege Escalation
Content
### **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;
Confidence
96% confidence
Finding
The skill instructs reading and writing API credentials in ~/.upkuajing/.env and can automatically save newly issued keys there. Credential access and storage in a local dotfile increases the risk of secret exposure, unintended persistence, and misuse by other processes or future skill runs.

Credential Access

High
Category
Privilege Escalation
Content
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**
Confidence
96% confidence
Finding
The follow-on instructions continue the credential-management flow by checking for UPKUAJING_API_KEY in a local .env file and offering automated key creation and persistence. In a skill advertised as a date reference helper, this materially increases secret-handling risk and normalizes unnecessary access to sensitive local configuration.

Credential Access

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

    if env_file.exists():
Confidence
90% confidence
Finding
The code explicitly targets a .env file for API key handling, indicating local credential discovery and management. In this skill context, credential file access is more dangerous because secret handling is unrelated to the advertised date function, so operators may not apply appropriate scrutiny or secret-storage controls.

Credential Access

High
Category
Privilege Escalation
Content
env_file = UPKUAJING_ENV_FILE

    if env_file.exists():
        # 读取现有的 .env 文件
        try:
            with open(env_file, 'r', encoding='utf-8') as f:
                content = f.read()
Confidence
94% confidence
Finding
Reading the existing .env file to inspect whether an API key is present is a form of credential access and secret material inspection. Although the code appears to check for existing configuration rather than exfiltrate it, it still expands secret exposure in an unrelated skill and could leak sensitive values through process memory, logs, or future code changes.

Credential Access

High
Category
Privilege Escalation
Content
"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")
Confidence
96% confidence
Finding
Writing a newly issued API key into a plaintext .env file stores a sensitive credential in a location commonly copied, backed up, or accidentally committed, making compromise easier. This is especially risky here because users would not expect a date-reference skill to create and persist secrets, reducing the chance they protect the file appropriately.

Unpinned Dependencies

Low
Category
Supply Chain
Content
httpx>=0.23.0
Confidence
95% confidence
Finding
The dependency is specified with only a lower bound, which allows future unreviewed versions of httpx to be installed. This can introduce supply-chain risk, unexpected breaking changes, or newly introduced vulnerable releases into builds without any change to the skill itself.

Unsafe Defaults

Medium
Category
Tool Misuse
Content
pass  # 如果读取失败,继续执行

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

    # 检查是否申请成功
    if response.get('code') != 0:
Confidence
87% confidence
Finding
The explicit require_auth=False setting disables authentication for a sensitive operation that creates new API keys, which is an unsafe default for credential lifecycle management. Even if the backend intentionally supports open registration, embedding that behavior in a low-risk-looking skill increases the chance of unnoticed misuse and weakens defense in depth.

Static analysis

Detected: suspicious.exposed_secret_literal

File appears to expose a hardcoded API secret or token.

Critical
Code
suspicious.exposed_secret_literal
Location
scripts/common.py:196

File appears to expose a hardcoded API secret or token.

Critical
Code
suspicious.exposed_secret_literal
Location
SKILL.md:58