T05 · Unauthorized Access and Privilege Escalation
- Location
SKILL.md:45- Finding
API Credential Disclosure Through Instructed File Output
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
The skill is mainly a domain-checking tool, but it needs review because it can expose or persist API keys and performs extra account, payment, reporting, and update-check activity.
Review this skill before installing. Use it only if you trust the vendor API and are comfortable with paid requests, local API-key storage, account/recharge helper commands, optional error reporting, and daily update checks. Do not let an agent print `~/.upkuajing/.env`; check only whether the key exists, and ensure any stored key file is private to your user account.
SKILL.md:45API Credential Disclosure Through Instructed File Output
scripts/auth.py:62API Key Persisted Without Enforced Owner-Only Permissions
requirements.txt:1Unbounded Dependency Version Introduces Supply-Chain Risk
scripts/version_check.py:119Automatic Version Check Sends Undisclosed Usage Metadata
The skill is described as a domain validation utility, yet it reportedly performs version checking, local cache maintenance, and remote update queries. While version checks can be legitimate, they are security-sensitive when undeclared because they create extra network traffic and local state that users do not expect from a validation task.
The skill is described as a domain validation utility, yet it reportedly performs version checking, local cache maintenance, and remote update queries. While version checks can be legitimate, they are security-sensitive when undeclared because they create extra network traffic and local state that users do not expect from a validation task.
The skill is described as a domain validation utility, yet it reportedly performs version checking, local cache maintenance, and remote update queries. While version checks can be legitimate, they are security-sensitive when undeclared because they create extra network traffic and local state that users do not expect from a validation task.
The skill is described as a domain validation utility, yet it reportedly performs version checking, local cache maintenance, and remote update queries. While version checks can be legitimate, they are security-sensitive when undeclared because they create extra network traffic and local state that users do not expect from a validation task.
The documentation explicitly instructs reading the credential file at ~/.upkuajing/.env, which is a direct credential access pattern. In the context of a domain validation skill, requesting or displaying raw secret material is more dangerous because it is unnecessary for the primary task and can expose API keys to the model, logs, or unintended outputs.
使用此技能需要API密钥。API密钥保存在 ~/.upkuajing/.env 文件中:
cat ~/.upkuajing/.env
文件内容示例:
Checking for and handling UPKUAJING_API_KEY in ~/.upkuajing/.env as part of the skill workflow creates direct interaction with locally stored credentials. Because the same flow can lead to automatic issuance and storage of secrets, it raises the risk of exposing, overwriting, or persisting credentials without a clearly separated trust boundary.
### **未设置API密钥**
请先检查 `~/.upkuajing/.env` 文件是否有 UPKUAJING_API_KEY;
如果未设置 UPKUAJING_API_KEY API密钥,请提示并让用户选择:
1. 用户有,由用户提供(手动添加到 ~/.upkuajing/.env 文件)
2. 用户没有,你可使用接口进行申请(`auth.py --new_key`),申请到新密钥后,会自动保存到 ~/.upkuajing/.env
等待用户选择;
Automatically saving a newly obtained API key into ~/.upkuajing/.env is a sensitive credential write operation. This is dangerous because it lets a skill whose stated purpose is merely domain checking create and persist authentication material on the local system, potentially without sufficient transparency, access control, or auditability.
请先检查 `~/.upkuajing/.env` 文件是否有 UPKUAJING_API_KEY;
如果未设置 UPKUAJING_API_KEY API密钥,请提示并让用户选择:
1. 用户有,由用户提供(手动添加到 ~/.upkuajing/.env 文件)
2. 用户没有,你可使用接口进行申请(`auth.py --new_key`),申请到新密钥后,会自动保存到 ~/.upkuajing/.env
等待用户选择;
### **账户充值**
The file implements authentication, account lookup, pricing, and recharge/payment functions, which materially exceed the declared purpose of a domain-validity and risk-checking skill. This capability mismatch is dangerous because users or orchestrators may grant the skill trust and permissions appropriate for domain screening, while the code performs account-management and billing actions instead.
The code can create API keys, inspect balances, and generate recharge orders, all of which are sensitive account-management actions not required for domain verification. In the context of this skill, these hidden or unexpected capabilities increase the risk of unauthorized account changes, financial abuse, or misleading users about what the skill actually does.
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
"""
申请新的 API 密钥。
"""
# 检查是否已存在 .env 文件和 API key
env_file = UPKUAJING_ENV_FILE
if env_file.exists():
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
"""
申请新的 API 密钥。
"""
# 检查是否已存在 .env 文件和 API key
env_file = UPKUAJING_ENV_FILE
if env_file.exists():
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
"""
申请新的 API 密钥。
"""
# 检查是否已存在 .env 文件和 API key
env_file = UPKUAJING_ENV_FILE
if env_file.exists():
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
"""
申请新的 API 密钥。
"""
# 检查是否已存在 .env 文件和 API key
env_file = UPKUAJING_ENV_FILE
if env_file.exists():
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
"""
申请新的 API 密钥。
"""
# 检查是否已存在 .env 文件和 API key
env_file = UPKUAJING_ENV_FILE
if env_file.exists():
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
"""
申请新的 API 密钥。
"""
# 检查是否已存在 .env 文件和 API key
env_file = UPKUAJING_ENV_FILE
if env_file.exists():
This line is part of writing a plaintext API key into a .env file, which constitutes insecure credential storage rather than credential access. In the context of a domain-checking skill, silently persisting newly issued secrets locally broadens exposure if the file is later read by other tools, committed accidentally, or stored with weak permissions.
"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")
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
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'
# 日志开关
The script’s implemented behavior is remote exception reporting, which does not match the declared skill purpose of domain validity and risk checking. This functionality mismatch is security-relevant because it can conceal undisclosed data flows and expands the skill’s capabilities beyond user expectations, increasing the chance that operational or user-supplied context is transmitted off-box without informed consent.
This module adds update-checking and upgrade notification behavior that is unrelated to the stated domain-validation purpose of the skill. Even though the code is not overtly malicious, it introduces extra network activity, telemetry about installed skills, and side effects to stderr and local state that users may not expect from a domain-checking skill.
The skill declares capabilities that imply environment access, file read/write, and network use, but it does not scope or constrain those powers through explicit permissions. In a skill that can read local configuration and contact external services, missing tool scope increases the chance of overbroad access, unintended credential exposure, or actions outside the user-visible purpose.
The skill description and all operational instructions are written exclusively in Chinese, including prescribed user-facing prompts such as asking the user to choose how to provide an API key and guiding payment flow. There is no indication that the skill can adapt to the user's preferred language or that the Chinese-only constraint is justified as a region-specific requirement.
Allowing the skill to request a new API key and automatically write it into a local environment file exceeds the minimum capability needed for domain checking. This introduces credential lifecycle management into a validation skill, increasing the risk of secret mishandling, unauthorized persistence, or confusing users into granting broader trust than intended.
Creating recharge orders and presenting payment URLs is not directly necessary for checking domain validity. Embedding payment workflow inside a utility skill broadens the trust boundary and can be abused for unexpected billing-related actions or phishing-like user confusion if the destination is not tightly controlled.
The document instructs agents to send request parameters, response payloads, and error context to a central error-reporting API, which can include sensitive operational or user data. Although it notes that some sensitive fields are 'automatically desensitized,' it does not define the scope of redaction, require data minimization, or warn operators about privacy and data-sharing implications, creating a real risk of oversharing secrets, personal data, or confidential business content during failure reporting.
The module docstring identifies the component as authentication management, directly conflicting with the advertised purpose of domain safety/availability verification. This inconsistency is a meaningful trust and transparency problem because it suggests the skill may be repurposed or bundled with unrelated sensitive functionality.