T09 · Insecure Skill Coding Practices
- Location
scripts/main.py:192- Finding
Mail Draft Creation and Local File Attachment Bypass Explicit Confirmation
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
The skill is mostly coherent macOS automation, but it needs Review because it can create Mail drafts with attachments and run caller-named Shortcuts without clear confirmation boundaries.
Review before installing. Only use this if you are comfortable granting a skill access to macOS app automation and local Mail, Notes, Calendar, Reminders, Photos, Freeform, Weather, and Stocks data. Be especially careful with Mail draft attachments and the shortcut= parameter; use trusted Shortcut names only and avoid letting untrusted content choose command arguments.
scripts/main.py:192Mail Draft Creation and Local File Attachment Bypass Explicit Confirmation
scripts/main.py:1041Caller-Controlled Shortcut Name Can Invoke Arbitrary Existing macOS Shortcuts Without Confirmation
The public description understates the skill's real behavior: it can send email, perform external network requests for stock/history data, and invoke Shortcuts, which can themselves trigger additional automations. This mismatch is dangerous because users, agents, or policy systems may authorize the skill based on an incomplete understanding, leading to unintended data exfiltration, outbound communication, or execution of higher-risk actions under the guise of benign app automation.
Referenced artifact was not completely inspected
- Skill 目录以 `SKILL.md` 为核心(YAML frontmatter + 说明),并使用 `metadata` 单行 JSON 进行 gating(仅 darwin、需要 `python3/osascript`)。参见 OpenClaw 官方 Skills 规范:https://docs.opencl
Referenced artifact was not completely inspected
- Skill 目录以 `SKILL.md` 为核心(YAML frontmatter + 说明),并使用 `metadata` 单行 JSON 进行 gating(仅 darwin、需要 `python3/osascript`)。参见 OpenClaw 官方 Skills 规范:https://docs.opencl
The skill advertises broad capabilities that include shell execution, file access, environment access, and network use, but it does not declare an explicit tool scope such as permissions or allowed-tools. In an agent setting, this weakens least-privilege boundaries and makes it harder for reviewers or enforcement layers to constrain what the skill may do, especially since the documented actions include reading local app data, creating content, and invoking system automation.
subprocess module calls execute external commands. Without careful input validation, this enables command injection.
def _run(cmd, input_text=None):
p = subprocess.run(
cmd,
input=input_text,
text=True,
The confirmation flow presents user-facing strings only in Chinese, including safety instructions and alternative action notes. This forces a specific language for an important interaction without user opt-in, which is a natural-language locale policy violation under the stated rules.
The mail-reading functions enumerate unread messages and return metadata such as subject, sender, date, and message ID without any additional in-skill privacy warning, minimization, or confirmation step. In an agent setting, this can expose sensitive communications content and relationship metadata to downstream components or logs with little user awareness.
The notes search command reads note titles, modification dates, and body snippets, including potentially highly sensitive personal or business information, without an explicit disclosure or confirmation workflow. Because it searches note bodies and returns content excerpts, misuse could directly exfiltrate confidential data from the local Notes database.
The calendar listing command returns event titles, times, and locations, which can reveal schedules, travel, meetings, and physical whereabouts, without any user-facing privacy notice or confirmation. In an automation-agent context this information is sensitive operational metadata and could be misused for profiling or surveillance.
The photos command accesses recent photo-library metadata such as dates, names, and favorites without any visible privacy disclosure or confirmation. Even without image bytes, this metadata can reveal personal habits, timelines, and sensitive events, especially when combined with other local-app data sources.
The skill performs direct outbound HTTP(S) requests to external stock-data providers even though the primary skill description emphasizes local macOS app automation. This expands the trust boundary and can leak user-requested stock symbols and usage patterns to third parties, creating an undeclared data-exposure and capability-expansion risk.
The stock quote/history features rely on external network access that is broader than simple local app automation and is not obviously disclosed by the skill description. This creates a data-flow risk to third-party services and adds remote dependency behavior that users may not expect from a macOS automation skill.
The natural-language interface exposed by the manifest is entirely in Chinese, including the description and all trigger patterns, with no indication that users may choose another language or that the skill is intentionally limited to a Chinese-speaking environment. This creates a locale/language policy concern because the skill appears to require a specific language without opt-in or documented justification.
The trigger list contains many broad, everyday phrases such as “地图”, “日历”, “照片”, “天气”, “股票”, and “画图”, which can match normal conversation rather than a clear request to invoke this skill. Because the skill has access to an exec-backed automation entrypoint and can interact with local apps that expose personal data or create/modify content, unintended invocation could lead to privacy exposure or accidental actions.
The natural-language content in the example board is entirely in Chinese, including the title and item text, with no indication that language choice is optional or user-selected. This can violate locale/language policy expectations when a skill implicitly constrains output to a specific language without documented opt-in or justification.
For reminders fallback and weather retrieval, the code consults environment variables to locate user-configured Shortcuts. Reading environment configuration is not an obvious requirement of the manifest's stated scope of automating macOS apps like opening, reading, and creating content.