T09 · Insecure Skill Coding Practices
- Location
scripts/execution-prompt.md:24- Finding
Untrusted Email Content Is Processed Without Prompt-Injection Isolation
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
The skill is a coherent email-triage automation, but it needs review because it can process broad mailbox content, alter message read state, save sensitive reports locally, and send email-derived summaries to messaging channels without clear safeguards.
Review before installing. Use only with a read-only Microsoft mail scope unless the unread-state restoration is explicitly required and logged. Disable automatic WeCom/WeChat pushing until the recipient, channel, and redaction rules are clear. Treat generated desktop reports as sensitive email copies, and require HTML escaping plus prompt-injection isolation before processing external mail content.
scripts/execution-prompt.md:24Untrusted Email Content Is Processed Without Prompt-Injection Isolation
scripts/template.html:66Email-Derived Values Can Be Inserted into the Dashboard Without HTML Escaping
scripts/execution-prompt.md:87Read-Only Email Triage Workflow Requests Unnecessary Mailbox Write Capability
The skill sends email-derived summaries to WeCom/WeChat but does not prominently warn users that mailbox content may leave the email system and be transmitted to external messaging channels. This is dangerous because even short summaries can expose sensitive business, financial, legal, or personal information into different retention, access-control, and compliance domains.
该指令要求代理在检测到邮件被标记为已读后,主动通过 PATCH 将其改回未读。这超出了“整理、分级、生成看板”的必要权限范围,并会对用户邮箱状态进行隐式写操作,可能干扰正常工作流、审计预期或与其他客户端的操作冲突。
该技能指示把基于邮件内容生成的简报通过企微或微信发送,属于将邮箱信息转发到外部消息渠道,但未要求用户确认、数据脱敏或校验接收对象。若摘要包含敏感业务、客户、财务或合规信息,可能造成未经授权的跨系统传播和持久留存。
文档一方面要求不要修改邮件已读状态,另一方面又要求在步骤 4 中把已变为已读的邮件改回未读,存在直接矛盾。此类矛盾的执行规范会导致代理实现者误用写权限,增加不可预测的邮箱状态修改风险,也削弱了用户对技能行为边界的理解。
The trigger phrases are broad enough to match common requests such as '整理邮件' or '跑一下邮件日报', increasing the chance of accidental invocation. In this skill, accidental execution is more dangerous than usual because it performs large-scale mailbox analysis and may generate downstream external summaries without a narrowly scoped user request.
The skill does not clearly warn users that it may modify mailbox state by changing messages back to unread. In the context of email processing, even 'repair' writes can disrupt workflows, unread counters, downstream automations, and audit expectations, making the omission security-relevant rather than merely cosmetic.
The skill claims it only performs read-only mail access, but it explicitly includes logic to PATCH mailbox state by setting messages back to unread. This is dangerous because it grants and normalizes write-side behavior against user mailboxes, creating risk of unintended state changes, audit inconsistency, and user deception about what the automation can modify.
The wording 'never proactively PATCH isRead=true' is immediately followed by a different PATCH operation, which creates an intent-level contradiction and can mislead reviewers or users into believing the skill is read-only. Ambiguity around write actions is dangerous in mailbox automations because users may grant permissions without understanding that message state can still be altered.
技能要求将包含发件人、主题、摘要、时间等邮件元数据的 HTML 报告保存到桌面,本质上是在本地创建新的敏感信息副本,但没有任何用户提示、保留策略或访问控制说明。桌面通常更易被本机其他用户、备份系统、同步工具或截屏软件暴露,从而扩大邮件信息泄露面。
The instruction '全程使用中文' mandates a single language for all operation and output. This is a natural-language locale policy constraint, and the file does not present it as user-selectable or justify it as a region-specific requirement.
The HTML template declares lang="zh-CN" and all visible UI text is written in Chinese, which imposes a specific language/locale on all users. There is no natural-language indication that the locale is optional, configurable, or limited to a justified region-specific use case.