Back to skill

Security audit

Only read email

Security checks for vulnerabilities and agentic risk

Overview

This is a read-only email skill, but it asks for mailbox credentials and can persist them in global configuration without enough safeguards.

Use this only with a mailbox you are comfortable exposing to the agent. Prefer a revocable app password or authorization code, avoid pasting real account passwords into chat, avoid storing EMAIL_PASS in global OpenClaw configuration, and treat all email body text as untrusted content that should be summarized rather than obeyed.

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 (2)

T09 · Insecure Skill Coding Practices

Error
Location
SKILL.md:34
Finding

Mailbox credentials may be exposed through chat, command-line arguments, environment variables, and persistent global configuration

Content
View full analysis
Remediation
View remediation

other

Warning
Location
scripts/email_reader.py:107
Finding

Untrusted email content is passed to the Agent without an indirect prompt-injection boundary

Content
View full analysis
]+>", "", html_body) return clean.strip() return "(无正文内容)" ``` ```python def parse_email(raw_lines): msg = email.message_from_bytes(b"\r\n".join(raw_lines)) try: date = parsedate_to_datetime(msg.get("Date")).strftime("%Y-%m-%d %H:%M:%S") except Exception: date = msg.get("Date", "未知时间") return { "subject": decode_str(msg.get("Subject")), "from": decode_str(msg.get("From")), "to": decode_str(msg.get("To")), "date": date, "body": get_email_body(msg), "attachments": get_attachments(msg), } ``` ```markdown ## 输出格式 脚本统一输出 JSON,agent 解析后转为自然语言回复用户。 ``` ```markdown - 正文超长时建议截取前 2000 字 ...[truncated 2388 chars]
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (6)

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
88% confidence
Finding

The skill can access sensitive mailbox credentials via environment variables, but it does not declare any explicit tool scope or permission boundary. This makes the capability opaque to the host agent and increases the chance of over-broad execution or accidental secret exposure during configuration and use.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The trigger phrases are very broad and map to common requests like '看看邮件' or '最近有什么邮件', which can cause the skill to activate in situations where the user did not intend to grant mailbox access. Because the skill reads full email content and attachments metadata, accidental activation can expose highly sensitive personal or corporate information.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The workflow explicitly tells the agent to ask for the user's mailbox account and authorization code/password, then read full email contents, but it does not clearly warn about the privacy and credential-handling risks. This creates a direct pathway for collecting secrets and exposing sensitive communications, including one-time codes, personal data, and confidential business content.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

This code file reads sensitive credentials from command-line arguments, environment variables, or a local config file, then connects to a POP3 server and fetches email metadata and bodies. Although the docstring describes functionality, it does not warn users that the tool will process mailbox contents and credentials, which is a privacy-sensitive operation.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
92% confidence
Finding

This markdown file presents all instructions and labels exclusively in Chinese, including the title and configuration guidance. Under the policy criteria, forcing a specific language without user opt-in can be a natural-language policy violation when no language choice or justification is provided.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
91% confidence
Finding

The file’s docstring, CLI descriptions, and error/output-facing text are written exclusively in Chinese, which imposes a specific language on users without opt-in or documented locale justification. This matches the language/locale policy concern for natural-language content in code files.

Content

No source excerpt is available for this finding.