Back to skill

Security audit

macos-suite

Security checks for vulnerabilities and agentic risk

Overview

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.

Vulnerability Patterns
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
  • 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
Findings (2)

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/main.py:192
Finding
Mail Draft Creation and Local File Attachment Bypass Explicit Confirmation<![CDATA[ ## Vulnerability Details **File Location**: `scripts/main.py:192-252` **Vulnerability Type**: Missing authorization check for a state-changing operation **Risk Level**: Medium ### Vulnerable Code ```python def cmd_mail_draft(args, send): action = "mail.send" if send else "mail.draft" to = args.get("to", "").strip() subject = args.get("subject", "") body = args.get("body", "") cc = _split_csv(args.get("cc", "")) bcc = _split_csv(args.get("bcc", "")) attachments = _split_csv(args.get("attachments", "")) if not to: _fail(action, "Missing to=") if send: _confirm_required(action, args) ascript = r''' on run argv set theTo to item 1 of argv set theSubject to item 2 of argv set theBody to item 3 of argv set theCC to item 4 of argv set theBCC to item 5 of argv set theAttachments to item 6 of argv set shouldSend to item 7 of argv tell application "Mail" set newMessage to make new outgoing message with properties {subject:theSubject, content:theBody & return & return, visible:true} tell newMessage make new to recipient at end of to recipients with properties {address:theTo} if theCC is not "" then repeat with a in (paragraphs of theCC) if (a as text) is not "" then make new cc recipient at end of cc recipients with properties {address:(a as text)} end repeat end if if theBCC is not "" then repeat with a in (paragraphs of theBCC) if (a as text) is not "" then make new bcc recipient at end of bcc recipients with properties {address:(a as text)} end repeat end if end tell if theAttachments is not "" then set parts to paragraphs of theAttachments repeat with p in parts set fp to (p as text) if fp is not "" then tell newMessage to make new attachment with properties {file name:fp} at after the last paragraph end if end repeat end if ...[truncated 2462 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Apply explicit confirmation to both sending and draft creation: ```python action = "mail.send" if send else "mail.draft" _confirm_required(action, args) ``` 2. Add `mail.draft` to the confirmation response alternatives and documentation so the behavior is unambiguous. 3. Before approval, return a structured preview containing recipients, subject, body length, and normalized attachment paths. 4. Resolve attachment paths with `os.path.realpath`, reject nonexistent or non-regular files, and optionally restrict attachments to user-approved directories. 5. Consider a two-stage workflow in which the first call validates and previews the draft and a second call uses a short-lived approval token bound to the exact recipients, content, and attachment list. 6. Add regression tests proving that neither draft creation nor attachment access occurs without confirmation. ]]>

T05 · Unauthorized Access and Privilege Escalation

Warning
Location
scripts/main.py:1041
Finding
Caller-Controlled Shortcut Name Can Invoke Arbitrary Existing macOS Shortcuts Without Confirmation<![CDATA[ ## Vulnerability Details **File Location**: `scripts/main.py:1041-1083` **Additional Location**: `scripts/main.py:526-540` **Vulnerability Type**: Unrestricted invocation of locally privileged automation **Risk Level**: Medium ### Vulnerable Code ```python def _has_shortcuts(): return os.path.exists("/usr/bin/shortcuts") def _run_shortcut(name, input_text=None): if not _has_shortcuts(): return None, "shortcuts CLI not found" cmd = ["/usr/bin/shortcuts", "run", name] tmp_path = None if input_text is not None: fd, tmp_path = tempfile.mkstemp(prefix="openclaw-shortcuts-input-", suffix=".json") with os.fdopen(fd, "w", encoding="utf-8") as f: f.write(input_text) cmd.extend(["--input-path", tmp_path]) code, out, err = _run(cmd) if tmp_path: try: os.unlink(tmp_path) except Exception: pass if code != 0: return None, (err or out).strip()[:500] return (out or "").strip(), None def cmd_weather_current(args): name = (args.get("shortcut") or os.environ.get("MACOS_SUITE_WEATHER_SHORTCUT") or "").strip() if not name: _open_app_silent("Weather") _ok("weather.current", None, {"warning": "No shortcut configured. Set shortcut=... or env MACOS_SUITE_WEATHER_SHORTCUT.", "openedApp": "Weather"}) return out, err = _run_shortcut(name) if err: _open_app_silent("Weather") _ok("weather.current", None, {"warning": f"Shortcut failed: {err}", "openedApp": "Weather"}) return try: data = json.loads(out) _ok("weather.current", data) return except Exception: _ok("weather.current", {"text": out, "shortcut": name}) ``` The reminder fallback uses the same primitive: ```python name = (args.get("shortcut") or os.environ.get("MACOS_SUITE_REMINDERS_SHORTCUT") or "").strip() if name: payload = json.dumps( {"list": lst, "limit": limit, "inclu ...[truncated 2508 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Do not accept arbitrary Shortcut names from ordinary command arguments. 2. Bind each operation to a dedicated administrator-configured Shortcut name, such as one immutable configuration value for weather and another for reminders. 3. Maintain a strict per-command allowlist and reject names not present in it. 4. Require explicit confirmation before invoking any caller-selected Shortcut, with the exact name displayed to the user. 5. Prefer a dedicated implementation or a narrowly scoped Shortcut whose behavior is documented and reviewed. 6. Where practical, verify the selected Shortcut against a configured identifier or trusted configuration rather than relying only on its human-readable name. 7. Treat Shortcut output as untrusted data and validate it against a strict schema before returning it as a successful structured result. 8. Log the command, approved Shortcut name, invocation time, and outcome without recording sensitive payload contents. 9. Add tests confirming that unknown Shortcut names are rejected and that weather and reminder commands cannot invoke each other's configured automation. ]]>
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Behavioral ASTexec() Call, eval() Call, Dynamic Import
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
Findings (16)

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding
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.

Ae1

High
Category
analysis-evasion
Content
- Skill 目录以 `SKILL.md` 为核心(YAML frontmatter + 说明),并使用 `metadata` 单行 JSON 进行 gating(仅 darwin、需要 `python3/osascript`)。参见 OpenClaw 官方 Skills 规范:https://docs.opencl
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
- Skill 目录以 `SKILL.md` 为核心(YAML frontmatter + 说明),并使用 `metadata` 单行 JSON 进行 gating(仅 darwin、需要 `python3/osascript`)。参见 OpenClaw 官方 Skills 规范:https://docs.opencl
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Lp3

Medium
Category
MCP Least Privilege
Confidence
91% confidence
Finding
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 call

Medium
Category
Dangerous Code Execution
Content
def _run(cmd, input_text=None):
    p = subprocess.run(
        cmd,
        input=input_text,
        text=True,
Confidence
70% confidence
Finding
subprocess module calls execute external commands. Without careful input validation, this enables command injection.

Natural-Language Policy Violations

Medium
Confidence
95% confidence
Finding
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.

Missing User Warnings

Medium
Confidence
90% confidence
Finding
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.

Missing User Warnings

Medium
Confidence
93% confidence
Finding
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.

Missing User Warnings

Medium
Confidence
90% confidence
Finding
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.

Missing User Warnings

Medium
Confidence
86% confidence
Finding
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.

Description-Behavior Mismatch

Medium
Confidence
98% confidence
Finding
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.

Context-Inappropriate Capability

Medium
Confidence
97% confidence
Finding
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.

Natural-Language Policy Violations

Medium
Confidence
91% confidence
Finding
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.

Vague Triggers

Medium
Confidence
94% confidence
Finding
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.

Natural-Language Policy Violations

Low
Confidence
83% confidence
Finding
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.

Context-Inappropriate Capability

Low
Confidence
84% confidence
Finding
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.

Static analysis

No suspicious patterns detected.