T09 · Insecure Skill Coding Practices
- Location
SKILL.md:72- Finding
Credential Disclosure Through Full Environment File Output
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This appears to be a real paid B2B lead-generation integration, but it handles API keys and personal/contact data in ways users should review carefully before installing.
Install only if you are comfortable with a paid lead-generation tool that can retrieve professional/contact data and store results locally. Do not print ~/.upkuajing/.env into chats or logs; treat the API key as a secret, use a virtual environment, restrict file permissions on ~/.upkuajing, and ensure your use of people/contact data complies with applicable privacy and outreach laws.
SKILL.md:72Credential Disclosure Through Full Environment File Output
scripts/auth.py:91API Key File Is Created Without Explicit Owner-Only Permissions
requirements.txt:1Unbounded Third-Party Dependency Allows Unreviewed Future Releases
Remote version checks, local cache management under the user's home directory, and reading local metadata are additional behaviors outside the user-facing lead-gen description. While not inherently malicious, under-disclosed local persistence and external calls increase the attack surface and make it harder for users to understand where data is stored and when network communication occurs.
Remote version checks, local cache management under the user's home directory, and reading local metadata are additional behaviors outside the user-facing lead-gen description. While not inherently malicious, under-disclosed local persistence and external calls increase the attack surface and make it harder for users to understand where data is stored and when network communication occurs.
Remote version checks, local cache management under the user's home directory, and reading local metadata are additional behaviors outside the user-facing lead-gen description. While not inherently malicious, under-disclosed local persistence and external calls increase the attack surface and make it harder for users to understand where data is stored and when network communication occurs.
Remote version checks, local cache management under the user's home directory, and reading local metadata are additional behaviors outside the user-facing lead-gen description. While not inherently malicious, under-disclosed local persistence and external calls increase the attack surface and make it harder for users to understand where data is stored and when network communication occurs.
The skill instructs reading and storing an API key in a local .env file under the user's home directory, and even suggests displaying that file with a shell command. This creates credential-exposure risk through logs, agent output, overly broad file access, or accidental disclosure of the secret to downstream tools or users.
This skill requires an API key, stored in ~/.upkuajing/.env:
cat ~/.upkuajing/.env
UPKUAJING_API_KEY=your_api_key_here
Referenced artifact was not completely inspected
- **Parameters**: See [Error Report API](references/skill-error-report-api.md)
Referenced artifact was not completely inspected
- **Parameters**: See [Error Report API](references/skill-error-report-api.md)
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():
Writing a newly issued API key to a plaintext .env file creates a local secret-at-rest risk. If the home directory, backup system, logs, or filesystem permissions are weak, the key can be recovered and abused to impersonate the user against the remote API.
"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 skill declares executable behavior involving environment access, filesystem reads/writes, and network use, but does not define any explicit tool scope or allowed-tools boundaries. That increases the chance the agent can invoke more capabilities than users expect, especially since the skill also instructs reading local credential files and making external API/payment requests.
The skill explicitly collects and analyzes employee lists, shareholders/UBO, decision-makers, colleagues, alumni, and work/education history, but it does not present an upfront privacy warning or clear usage constraints. In this context, the absence of privacy safeguards is more dangerous because the skill is designed for lead generation and network mapping, which can enable profiling, targeting, or misuse of personal/professional data at scale.
The trigger list is extremely broad and overlaps with common business, recruiting, sourcing, and research requests. Overbroad activation criteria can cause the skill to be selected in contexts where users did not intend to invoke paid data access, personal-data lookup, or due-diligence operations.
Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.
### Account Top-up
When API response indicates insufficient balance:
1. Create top-up order (`auth.py --new_rec_order`)
2. Send the payment page URL to the user, guide them to open & pay; proceed after they confirm success.
### Get Account Information
The document explicitly exposes fields such as person_contact_show and counts of phone, email, website, and WhatsApp contacts, yet provides no privacy, lawful-basis, consent, or acceptable-use constraints. In the context of a B2B lead-generation and due-diligence skill, this materially increases the risk of mass harvesting, profiling, and misuse of personal/contact data in ways that may violate privacy, anti-spam, or data-protection laws.
This API reference explicitly supports filtering for company contact data and the existence of employee/core-member contact information, including phone, email, WhatsApp, social accounts, and a sample employee contact field. In a lead-generation and LinkedIn-enrichment skill, that materially increases the risk of privacy-invasive profiling, unsolicited outreach, scraping abuse, and potential misuse of personal data without any documented consent, legal basis, or handling restrictions.
This API reference documents bulk retrieval of a person's colleague information tied to company and person identifiers, but provides no privacy notice, lawful-use constraints, consent requirements, or data-handling guidance. In a lead-generation and due-diligence skill, that omission materially increases the risk of misuse for profiling, unsolicited outreach, or unauthorized processing of personal data.
The API documentation explicitly allows sending request parameters, response payloads, and exception context to an external error-reporting endpoint. In this skill’s lead-generation and due-diligence context, those fields can easily contain personal data, company-sensitive information, API outputs, and identifiers, so forwarding them without an explicit user warning, strict minimization rules, or opt-in creates a real data-leakage risk.
The module title, descriptions, CLI help text, and user-facing messages are all hard-coded in Chinese, and there is no indication that users can opt into another language or that the skill is intentionally restricted to a Chinese-language audience. Under the policy, forcing a specific language without user opt-in is a natural-language policy violation.
This file adds account creation, billing, and pricing-management capabilities to a skill advertised as B2B lead generation and due diligence. That scope expansion increases the blast radius because invoking the skill can modify credentials and payment state, which is more sensitive than ordinary data retrieval and can surprise users or downstream agents.
Detected: suspicious.exposed_secret_literal