T09 · Insecure Skill Coding Practices
- Location
digest.py:289- Finding
Arbitrary LLM Endpoint Can Receive Private Email Content
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This email digest skill is not clearly malicious, but it needs Review because its local-only privacy promise conflicts with optional paths that can send email-derived data to arbitrary network endpoints.
Install only if you are comfortable with the optional network features and can ensure they are used safely. Avoid remote LLM endpoints unless you intend to send email content there, and use webhook delivery only to trusted destinations because subjects, senders, projects, and deadlines may leave the machine. The default local report path is much safer than enabling LLM or webhook options.
digest.py:289Arbitrary LLM Endpoint Can Receive Private Email Content
host_adapter.py:15Unrestricted Webhook URL Enables Email Metadata Disclosure and SSRF
digest.py:283Untrusted Email Content Can Manipulate LLM-Generated Classification Data
The skill is presented as primarily local processing, but it also supports external webhook notifications and other network access without declaring those capabilities in permissions. In the context of email summarization, this creates a real exfiltration risk because processed content may leave the machine despite user expectations and absent policy visibility.
The skill is presented as primarily local processing, but it also supports external webhook notifications and other network access without declaring those capabilities in permissions. In the context of email summarization, this creates a real exfiltration risk because processed content may leave the machine despite user expectations and absent policy visibility.
The header comments and description assert that data stays on the computer, but the code includes multiple outbound network paths such as LLM calls, webhook pushes, and SMTP delivery. This discrepancy is dangerous because users may enable features under a false privacy assumption and unintentionally disclose mailbox contents or summaries.
The natural-language assurance that data never leaves the computer conflicts with code paths that can transmit email content or summaries externally. This is dangerous because the mismatch masks real exfiltration behavior in a highly sensitive context: processing users' mailboxes.
The code comments claim the skill only performs local retrieval and structuring, but the implementation also sends data outward. Misleading scope statements in a privacy-sensitive email tool are security-relevant because they can cause unsafe deployment decisions and user consent based on false assumptions.
llm_enhance sends email metadata and up to 1500 characters of each message body to a user-supplied HTTP endpoint via urllib.request.urlopen. In the context of a skill advertised as local and privacy-preserving, this creates a real exfiltration path for sensitive mailbox content, especially if the endpoint is remote or controlled by an attacker.
endpoint, data=json.dumps(payload).encode("utf-8"),
headers={"Content-Type": "application/json"})
try:
with urllib.request.urlopen(req, timeout=180) as r:
resp = json.loads(r.read().decode("utf-8"))
content = resp["choices"][0]["message"]["content"]
result = _extract_json(content)
push_webhook transmits a digest text derived from email subjects and extracted todos to an arbitrary webhook URL. Even though it sends a summary rather than full raw messages, this still leaks potentially sensitive business or personal content to external services and is inconsistent with the skill's stated local-only behavior.
url, data=json.dumps(payload).encode("utf-8"),
headers={"Content-Type": "application/json"})
try:
with urllib.request.urlopen(req, timeout=10) as r:
resp = r.read().decode("utf-8")
print(f"[推送] Webhook({wh_type}) 响应: {resp[:80]}")
return True
The inline documentation emphasizes local-only execution and that data does not leave the computer, yet the adapter can post summaries to remote webhook endpoints. In a mail-processing skill, that discrepancy is especially dangerous because email metadata and extracted deadlines/projects are often sensitive business or personal information, and users may not scrutinize optional flags when the documentation strongly promises local-only behavior.
The skill markets itself as '数据不出电脑' and zero-config local processing, but it includes functionality to transmit mail-derived summaries to arbitrary webhook URLs. This creates a security/privacy mismatch: users may reasonably believe processed email content never leaves the machine, while high-priority subjects, senders, projects, and deadlines can in fact be sent to external services.
The skill advertises capabilities that imply file access, shell execution, and network use, but it does not declare any explicit tool scope or permissions in the manifest. In an agent ecosystem, missing scope declarations weaken least-privilege controls and can cause hosts or users to underestimate what the skill may access or invoke.
The statement '数据不出电脑' conflicts with the documented webhook and SMTP push functionality. Security-sensitive documentation contradictions are dangerous because they can mislead users and integrators about data handling guarantees, increasing the chance of accidental leakage of private email content.
The optional LLM path transmits message content to an OpenAI-compatible endpoint without an in-band warning that email data is being sent off-process and potentially off-device. In a mailbox-processing skill, that omission can lead to accidental disclosure of sensitive content to remote inference services.
The file contains outbound push features (SMTP and webhook) that go beyond simple local summarization and output generation. In a mail-digest skill, these functions materially expand the attack and privacy surface by creating new channels through which derived message content can leave the device.
Webhook and SMTP push are not necessary to perform local mail digestion, yet they allow summarized mailbox content to be transmitted externally. Unnecessary outbound capability increases privacy risk and broadens misuse potential if a host agent or user configuration provides attacker-controlled destinations.
subprocess module calls execute external commands. Without careful input validation, this enables command injection.
cmd += ["--md", a.md]
if a.llm:
cmd += ["--llm", a.llm, "--model", a.model]
subprocess.run(cmd, check=True)
print(f"[桥接] 已生成 {a.out} / {a.json}")
if a.webhook:
When --webhook is used, the program sends a condensed email summary containing sender, subject, project, and deadlines without any user-facing warning, preview, or confirmation that data is leaving the local machine. Given the skill's privacy-focused positioning, this lack of disclosure materially increases the risk of accidental exfiltration of sensitive email-derived information.