T09 · Insecure Skill Coding Practices
- Location
scripts/parse_emails.py:497- Finding
Excel Formula Injection Through Attacker-Controlled Email Content
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
The skill is purpose-aligned but needs review because it can parse sensitive email attachments, upload the resulting ledger, and has unsafe ZIP and Excel handling.
Install only if you are comfortable with the agent parsing the provided email files, storing summaries and addresses in an XLSX, and uploading that workbook through a separate uploader. Use trusted, reasonably sized ZIPs, avoid opening generated ledgers from untrusted emails without spreadsheet protections, and prefer adding explicit confirmation before upload and cleanup/size limits before broad use.
scripts/parse_emails.py:497Excel Formula Injection Through Attacker-Controlled Email Content
scripts/parse_emails.py:385Unbounded ZIP Extraction and Email Loading Permit Resource-Exhaustion Attacks
The trigger logic is overly broad, including generic phrases like '整理一下' or '帮我登记' when any attachment exists in context, which can cause the skill to activate in conversations where the user did not intend email parsing or ledger generation. Because the skill processes attachments and later uploads generated output, accidental invocation could lead to unauthorized handling of sensitive email contents and metadata.
The skill declares no explicit tool scope or permissions boundaries while instructing access to user-provided files and local paths, which creates unnecessary ambiguity about what filesystem access the skill may exercise. In a file-processing skill that handles archives, templates, and workspace outputs, missing least-privilege declarations can enable broader-than-expected file reads if the runtime or agent interprets paths permissively.
The applicable scenarios rely on ambiguous keyword matching such as '报备台账', '邮件台账', and '整理邮件' without clear exclusions, increasing the chance the skill will claim requests outside its intended scope. In this context, incorrect activation is risky because the skill is designed to inspect archives and extract structured data from potentially sensitive communications.
The skill explicitly instructs uploading the generated Excel ledger and returning a download URL, but it does not require informing the user that parsed email contents and metadata will be transmitted to another service or storage location. Since the output may contain sensitive business correspondence details, this can create a privacy and data-handling risk through silent exfiltration beyond the immediate processing environment.
This code extracts ZIP contents to a temporary directory and later writes parsed email metadata and body summaries into an XLSX file. Although the script logs progress, it does not disclose that it will persist potentially sensitive email content and addresses to disk or that ZIP contents will be unpacked locally, which is a user-facing safety warning gap for data-affecting operations.
该文件全文以中文编写并直接给出操作性规则,但未说明这是仅适用于中文邮件场景,或是否支持其他语言/地区输入。按组织语言/locale 政策标准,这构成了默认强制单一语言而缺少用户选择或明确范围说明的自然语言策略问题。
Natural-language strings in the file, including the top-level documentation and command descriptions, force a specific language/locale experience. The policy allows locale constraints when explicitly documented and justified or when users are given a choice, but neither is present here.
No suspicious patterns detected.