Back to skill

Security audit

Email Chronicle Analyst

Security checks for vulnerabilities and agentic risk

Overview

The skill is mostly a disclosed email-analysis helper, but it automatically writes sensitive email contents to a predictable shared temp file, which creates avoidable privacy and file-safety risk.

Review this skill before installing if you handle confidential email. It does not show malicious exfiltration or persistence, but it should use a per-run private temporary file or in-memory processing and delete extracted email text after analysis.

Vulnerability Patterns
  • Insecure Skill Coding PracticesFinds exploitable flaws such as hardcoded secrets or command injection
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • Agent Memory PoisoningWrites attacker-controlled rules into memory that affect later sessions
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
Findings (1)

T09 · Insecure Skill Coding Practices

Warning
Location
eml_cleaner.py:49
Finding

Predictable Shared Temporary File Enables Symlink Attacks and Email Data Exposure

Content
View full analysis
/tmp/eml_cleaned.txt ``` `eml_cleaner.py:49-50`: ```python if output_path: with open(output_path, 'w', encoding='utf-8') as f: f.write(result) ``` ### Technical Analysis The skill mandates use of the fixed, globally predictable path `/tmp/eml_cleaned.txt` for extracted email content. The Python script then opens that path with standard write mode. This operation follows symbolic links and truncates an existing target. On a multi-user system, another local process may create the predictable path before the skill runs or attempt to replace it during processing. If the path is a symbolic link, the script may write the extracted email data to the linked file, subject to the operating system's symlink protections and the Agent process's permissions. The fixed filename also causes all runs and sessions to share the same output location. This creates race conditions, cross-session content contamination, and potential disclosure of sensitive email headers and bodies. The resulting file permissions depend on the process umask and may allow other local users to read the extracted content. ### Attack Path 1. A local attacker predicts that the skill will write to `/tmp/eml_cleaned.txt`. 2. Before preprocessing starts, the attacker creates that path as a symbolic link to a file writable by the Agent process, or races to replace the path. 3. The Agent executes the preprocessing command required by `SKILL.md`. 4. `open(output_path, 'w')` follows the symbolic link and truncates or overwrites the linked target with attacker-influenced email content. 5. Depending on the target and Agent privileges, this can corrupt application or user files. 6. Alternative ...[truncated 1209 chars]
Remediation
View remediation
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (5)

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

声明描述的是一个高级邮件分析技能,核心能力应是对复杂邮件线程进行语义层面的提炼与结构化总结。而实际代码只是一个 .eml 预处理工具:读取本地 .eml,抽取头部字段和 text/plain 内容,输出纯文本。它没有分析多封邮件之间的关系,也没有识别决策、行动项或遗留事项,更没有过滤寒暄语。触发条件中提到可处理用户粘贴的邮件正文,但代码只接受命令行传入的 .eml 文件路径。因此代码的主要目的与声明明显不一致,属于实质性能力缺失型不匹配。

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
95% confidence
Finding

The skill instructs the agent to run a local Python preprocessor and write output to /tmp/eml_cleaned.txt, but it declares no tool restrictions or explicit permissions. This creates an unnecessary file-write/code-execution capability gap: if honored by the runtime, the skill can cause filesystem side effects and invoke local code without transparent scoping, which is risky for untrusted .eml content and makes review/auditing harder.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The manifest description is entirely in Chinese and describes automatic behavior when users provide email content, but it does not state that language is user-selectable. This can violate a language/locale policy when a skill implicitly forces a specific language experience without user opt-in.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
83% confidence
Finding

The skill requires marking language switches as [Lang: CN/EN], and the rest of the document prescribes a Chinese reporting structure and labels, but it never offers the user a choice of output language. This creates a natural-language policy concern because the skill appears to default to a specific locale and presentation style regardless of user preference.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
91% confidence
Finding

This code's natural-language strings, including the module docstring and command-line usage/help output, are entirely in Chinese. Under the policy, forcing a specific language without user opt-in can be a natural-language policy violation unless the locale restriction is clearly documented and justified, which is not present here.

Content

No source excerpt is available for this finding.