T09 · Insecure Skill Coding Practices
- Location
scripts/batch_send_mail.py:64- Finding
SMTP Credentials Stored in a Plaintext Configuration File
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This bulk-email skill does what it says, but it stores reusable SMTP credentials in plaintext and grants broad email-sending authority that users should review carefully.
Install only if you are comfortable giving the skill access to recipient lists, templates, attachments, and an SMTP account. Use dry-run first, prefer an SMTP-specific app password, avoid passing secrets with --sender-password, and remove or protect config/config.ini because it stores the mail credential in plaintext.
scripts/batch_send_mail.py:64SMTP Credentials Stored in a Plaintext Configuration File
scripts/batch_send_mail.py:313SMTP Password Exposed Through a Command-Line Argument
The documentation states that SMTP credentials are automatically saved to config/config.ini for later reuse, but it does not prominently warn about the security implications of storing secrets locally. Local plaintext credential storage can expose mailbox access to other users, processes, backups, or source control mistakes, and this is especially sensitive because the skill performs outbound email operations.
The skill advertises capabilities that read files, write configuration, and access the network, but it does not declare any explicit tool scope or permission boundary. That increases the risk of unintended invocation with broader agent privileges, especially because the skill handles local files and SMTP credentials and can transmit data externally.
The trigger condition is very broad and explicitly says the skill should be used whenever users say common phrases like '批量发邮件' or similar. In an agent ecosystem, overly broad routing can cause the skill to activate in contexts the user did not intend, leading to accidental access to contact files, attachment paths, or SMTP operations.
整个技能说明均以中文撰写,且未声明支持按用户偏好切换语言,也未说明这是仅面向特定中文区域用户的工具。按规则,若技能隐含强制特定语言而无用户选择或正当限定,可构成语言/locale 政策问题。
The evaluation prompt asks the agent to '检查 batch-send-mail 技能' and '验证脚本能正确处理变量替换' without tightly constraining how the skill should be invoked or limiting actions to a safe, non-sending path. In a mail-sending skill, broad verification language can cause the agent to activate the skill in unintended contexts or exercise higher-risk behaviors than necessary, especially if trigger logic is keyed on loose phrases like '批量发邮件' or similar.
This plain-text template is entirely written in Chinese and provides no indication that language selection is optional or user-configurable. Under the policy rule for natural-language violations, forcing a specific language without user opt-in can be a locale-policy issue.
The template content is entirely in Chinese and provides no indication that language selection is optional or limited to a justified region-specific use case. This creates a natural-language policy issue because it imposes a specific locale on all users without opt-in.
The skill collects the SMTP password/authorization code and persists it in a local INI file in plaintext without warning the user or applying OS-backed secret storage. If the host, workspace, backups, or repository are accessible to others, the mail account credentials can be recovered and reused for unauthorized email sending or account compromise.
This file uses Chinese column headers and Chinese product descriptions throughout, which imposes a specific language on downstream use. The file does not indicate that this is a region-specific dataset or provide any opt-in or alternative locale, so it can be considered a natural-language locale policy issue.
The dependency is specified with a lower bound only, so builds can resolve to different versions over time, including newly introduced vulnerable or incompatible releases. In a skill that processes user-supplied CSV/Excel files, dependency drift increases supply-chain risk and makes security review and incident response harder.
pandas>=2.0.0
openpyxl>=3.1.0
Dependency has known vulnerabilities (CVEs). Using packages with unpatched security flaws exposes the environment to known exploits.
openpyxl is also unpinned, which means installations may fetch different versions depending on when and where the skill is deployed. Because this skill reads Excel files from users, lack of strict version control increases exposure to parser-related dependency issues and weakens reproducibility.
pandas>=2.0.0
openpyxl>=3.1.0
Dependency has known vulnerabilities (CVEs). Using packages with unpatched security flaws exposes the environment to known exploits.
Natural-language strings in the top-level docstring and user-facing prompts are exclusively Chinese, with no option to select another language. This can violate language/locale policy when a skill imposes a locale on all users rather than offering choice or documenting a justified region-specific constraint.
The manifest describes reading recipient tables, templating, attachments, SMTP configuration, and dry-run preview for bulk email sending. The additional --show-config capability prints live SMTP configuration details, including the sender email and server, which is not necessary to fulfill the stated mailing function and broadens the skill into credential/configuration disclosure behavior.