T09 · Insecure Skill Coding Practices
- Location
SKILL.md:44- Finding
Hardcoded DeepSeek API Key and QQ SMTP Credentials
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This skill has a coherent paper-translation purpose, but it exposes fixed credentials and can email arbitrary local attachments with weak user controls.
Review before installing. Use only if you trust the publisher and environment, rotate/remove the embedded credentials, constrain attachments to generated translation outputs, validate recipients, and avoid detached cron/nohup operation unless you have clear job tracking and cancellation.
SKILL.md:44Hardcoded DeepSeek API Key and QQ SMTP Credentials
scripts/send_email.py:24Arbitrary Local File Disclosure Through Unrestricted Email Attachment Path
The skill documentation exposes hardcoded secrets and operational behaviors that go beyond a narrowly scoped arXiv translation helper, including arbitrary SMTP email sending with fixed credentials and attachment delivery. This creates a real capability mismatch: a user-invoked skill framed as document translation can be repurposed to exfiltrate local files or send unauthorized outbound email, while also embedding credentials directly in the skill file.
The command rm -f translated/{slug}.*.pdf performs wildcard deletion using a variable that may be derived from paper metadata or other input, creating a path-manipulation and overbroad deletion risk if slug is malformed or attacker-controlled. Even if intended only for cleanup, insufficient sanitization could delete unrelated files in the translated directory or behave unpredictably with shell metacharacters.
cd /root/workspace/pdf2zh2 && \
# 清理旧输出
rm -f translated/{slug}.*.pdf && \
HTTPS_PROXY=http://127.0.0.1:7890 HTTP_PROXY=http://127.0.0.1:7890 \
nohup env PYTHONUNBUFFERED=1 \
setsid .venv/bin/python -u .venv/bin/pdf2zh_next \
The trigger phrases are broad enough to overlap with ordinary user language, increasing the chance the skill activates when the user did not intend to initiate downloading, translation, background processing, or email sending. In a skill that can perform outbound network actions and send mail, accidental activation materially increases security and privacy risk.
The skill performs consequential actions including sending email, background execution, file cleanup, and network access, yet the documentation does not present explicit risk disclosures or user-consent checkpoints. This makes it easier for users to trigger actions affecting local files, external services, and recipients without understanding the side effects.
L003 的描述直接规定“翻译为中文”,并在后文命令模板中固定为 --lang-out zh,文档中没有说明可由用户选择目标语言或需用户主动确认中文输出。按语言/地区政策要求,强制单一语言输出而无用户选择属于自然语言策略风险。
The manifest says this skill is for downloading arXiv papers, translating them to Chinese, and emailing them. However, the documented interface exposes generic queue administration operations such as listing, counting pending jobs, and clearing completed items, which are operational management capabilities not justified by the user-facing purpose described in the manifest.
Using nohup causes the translation process to persist after the initiating session ends, which can bypass normal user visibility and control over long-running activity. In combination with network access, credentialed API usage, and email delivery, detached execution increases the risk of unnoticed resource consumption or unauthorized continued processing.
# 清理旧输出
rm -f translated/{slug}.*.pdf && \
HTTPS_PROXY=http://127.0.0.1:7890 HTTP_PROXY=http://127.0.0.1:7890 \
nohup env PYTHONUNBUFFERED=1 \
setsid .venv/bin/python -u .venv/bin/pdf2zh_next \
--deepseek \
--deepseek-api-key "sk-aea81697cdc34baa8a11727b52bbb513" \
Using setsid further detaches the process from the controlling terminal and session, making it harder to monitor or terminate through normal interaction. This strengthens persistence of a task that can consume CPU, access external APIs, and generate/send outputs without the user's active oversight.
rm -f translated/{slug}.*.pdf && \
HTTPS_PROXY=http://127.0.0.1:7890 HTTP_PROXY=http://127.0.0.1:7890 \
nohup env PYTHONUNBUFFERED=1 \
setsid .venv/bin/python -u .venv/bin/pdf2zh_next \
--deepseek \
--deepseek-api-key "sk-aea81697cdc34baa8a11727b52bbb513" \
--deepseek-model deepseek-chat \
The manifest frames the skill as a paper-processing tool for end users, but the file documents manually spawning an internal worker session. Launching internal workers is an orchestration/operations capability rather than a necessary end-user feature for downloading, translating, and emailing a paper.
This script sends arbitrary user-supplied email content and an optional local file attachment directly to an external recipient with no confirmation, authorization check, recipient validation, or audit guardrails. In the context of an agent skill, this creates a strong exfiltration primitive: if upstream components can influence the recipient, body, or file path, sensitive local files or generated content could be emailed out silently.
The manifest describes sending translated papers by email, but the documentation also states that completed jobs proactively notify a QQ target. Sending messages to a separate messaging channel is an additional communication capability that is not part of the declared purpose of downloading, translating, and emailing papers.
The module docstring is written only in Chinese and provides no indication that language selection is optional or that the skill is intentionally limited to a Chinese-speaking context. Under the policy, forcing a specific language without user opt-in is a natural-language locale violation.
No suspicious patterns detected.