Back to skill

Security audit

查询公司海关贸易港口列表数据 — 获取港口的贸易次数、金额和占比,用于物流分析。支持全球 220 多个国家和地区的海关数据。帮助外贸团队查看公司的贸易港口分布、分析物流通道的使用情况、识别核心进出口港——是供应链物流优化和贸易路线分析的重要参考。

Security checks across malware telemetry and agentic risk

Overview

This skill is a disclosed paid API lookup tool that handles local API credentials and billing support, with caution needed around plaintext key storage.

Install only if you are comfortable with this skill making paid requests to Upkuajing, reading or writing UPKUAJING_API_KEY in ~/.upkuajing/.env, and exposing account or recharge-order details when you explicitly use those helper commands. Prefer an environment variable or a secure secret manager over storing the key in a plaintext dotfile, and confirm charges before each query.

SkillSpector

By NVIDIA
Vulnerability Patterns
  • 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
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
Findings (15)

Lp3

Medium
Category
MCP Least Privilege
Confidence
91% confidence
Finding
The skill declares no permissions, yet its documented behavior clearly includes reading environment variables, reading and writing files under ~/.upkuajing/.env, and making network requests to external APIs. This creates a transparency and least-privilege problem: users and hosting systems cannot accurately assess or constrain what the skill will access before execution.

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding
The stated purpose is a read-oriented trade-port query, but the skill also instructs account-management operations such as creating API keys, reading local secrets, querying account status, creating recharge orders, and caching version data locally. This mismatch is dangerous because users invoking a data-query skill may not expect credential handling, billing actions, or local state changes, increasing the risk of overreach and unintended charges or secret exposure.

Description-Behavior Mismatch

High
Confidence
97% confidence
Finding
The file implements authentication lifecycle and billing-related functions (API key issuance, account info, recharge order, pricing) that are outside the declared purpose of a port-trade query skill. This capability mismatch expands the skill's authority and creates unnecessary opportunities for credential handling and financial actions, increasing risk if the skill is invoked unexpectedly or repurposed.

Context-Inappropriate Capability

High
Confidence
96% confidence
Finding
Creating recharge orders is a financial operation unrelated to port-trade analysis, so embedding it in this skill violates least privilege and surprises users. If exposed through the agent surface, it could be abused to initiate unintended payment flows or social-engineer users into completing fraudulent or unauthorized top-ups.

Context-Inappropriate Capability

Medium
Confidence
94% confidence
Finding
The code can request a new API key and persist it locally, which is broader than the skill's stated read-only data-query purpose. Unnecessary credential issuance and storage increase the attack surface and can lead to unauthorized API use if the local environment or output is exposed.

Context-Inappropriate Capability

Medium
Confidence
92% confidence
Finding
Account balance and pricing queries are unrelated to the advertised port-analysis function and expose business-sensitive billing metadata. Including these features in an unrelated skill broadens accessible information and normalizes unnecessary access to account and commercial details.

Description-Behavior Mismatch

Medium
Confidence
89% confidence
Finding
The module introduces behavior unrelated to the advertised customs-port query function: it performs outbound network calls to a version endpoint and writes persistent state under the user's home directory. This expands the skill's trust boundary, creates undisclosed telemetry/update-check behavior, and could expose skill usage metadata or be abused if the API base URL is untrusted or compromised.

Credential Access

High
Category
Privilege Escalation
Content
### **API密钥未设置**
首先检查 `~/.upkuajing/.env` 文件中是否有 UPKUAJING_API_KEY;
如果未设置,请让用户选择:
1. 用户已有密钥:用户提供(手动添加到 ~/.upkuajing/.env 文件)
2. 用户没有密钥:通过界面申请(`auth.py --new_key`),新密钥会自动保存到 ~/.upkuajing/.env
等待用户选择;
Confidence
93% confidence
Finding
.env

Credential Access

High
Category
Privilege Escalation
Content
首先检查 `~/.upkuajing/.env` 文件中是否有 UPKUAJING_API_KEY;
如果未设置,请让用户选择:
1. 用户已有密钥:用户提供(手动添加到 ~/.upkuajing/.env 文件)
2. 用户没有密钥:通过界面申请(`auth.py --new_key`),新密钥会自动保存到 ~/.upkuajing/.env
等待用户选择;

### **账户充值**
Confidence
93% confidence
Finding
.env

Credential Access

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

    if env_file.exists():
Confidence
88% confidence
Finding
.env

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

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

Unpinned Dependencies

Low
Category
Supply Chain
Content
httpx>=0.23.0
Confidence
94% confidence
Finding
httpx>=0.23.0

Unsafe Defaults

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

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

    # 检查是否申请成功
    if response.get('code') != 0:
Confidence
86% confidence
Finding
auth=False

Unsafe Defaults

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

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

    # 检查是否申请成功
    if response.get('code') != 0:
Confidence
86% confidence
Finding
require_auth=False

VirusTotal

61/61 vendors flagged this skill as clean.

View on VirusTotal

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