Back to skill

Security audit

iCloud Calendar — Full CRUD

Security checks for vulnerabilities and agentic risk

Overview

This iCloud calendar skill mostly does what it says, but it can modify or bulk-delete real calendar events and its safety gates are weaker than the documentation implies.

Review this before installing if the calendar contains important or sensitive events. Use a dedicated iCloud app-specific password, keep the OpenClaw config file private, avoid persistent CONFIRM_DELETE or CONFIRM_UPDATE environment variables, run delete operations with DELETE_DRY_RUN=1 first, set the correct timezone explicitly, and consider tightening the confirmation checks before relying on update or delete actions.

Vulnerability Patterns
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • 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/add-event.py:567
Finding

Mutation confirmation gates accept false-looking non-empty values

Content
View full analysis
` or `--update-find `. 4. `os.environ.get(...)` returns a non-empty string, so the `not` condition evaluates to `False`. 5. The confirmation check is bypassed. 6. Matching calendar events are deleted or modified using the victim' ...[truncated 579 chars]
Remediation
View remediation

T08 · Insecure Dependencies

Note
Location
README.md:20
Finding

Third-party dependencies are installed without exact versions or integrity hashes

Content
View full analysis
=1.3.0,<2.0" ``` `SKILL.md` also includes an unconstrained form in its prerequisite summary: ```text pip install caldav ``` ### Technical Analysis The project delegates package selection to the package index at installation time. The constraint permits any future `caldav` release from version 1.3.0 up to, but excluding, version 2.0. It also does not lock or authenticate the complete transitive dependency graph through cryptographic hashes. As a result, two installations performed at different times can resolve to different code despite using the same audited Skill source. If an allowed package release or one of its transitive dependencies is compromised, malicious code could execute during installation or when `caldav` is imported by `scripts/add-event.py`. The documented command ordinarily uses pip's configured package index. The project does not itself redirect users to a demonstrated malicious index, and no malicious dependency was identified during this audit. This finding concerns the absence of reproducibility and integrity enforcement. ### Attack Path 1. An attacker compromises a permitted future release of `caldav`, a transitive dependency, or the package-distribution account used to publish it. 2. A user follows the documented installation command after the compromised version becomes the resolver's selected candidate. 3. Pip downloads and installs the compromised package because it satisfies the broad version constraint. 4. Malicious package code executes during installation or later when the calendar script imports the dependency. 5. At runtime, such code could inherit the Skill process env ...[truncated 685 chars]
Remediation
View remediation
``` 2. Lock all transitive dependencies in a requirements or lock file. 3. Record SHA-256 hashes and install with integrity enforcement: ```bash python -m pip install --require-hashes -r requirements.txt ``` 4. Ensure every installation example, including `SKILL.md`, references the same locked dependency file. 5. Explicitly use the intended trusted package index and prevent unexpected fallback indexes in deployment configuration. 6. Automate dependency vulnerability and provenance scanning, then update pins through a reviewed process. 7. Install dependencies inside an isolated virtual environment with only the permissions required by the Skill. ]]>
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Behavioral ASTexec() Call, eval() Call, Dynamic Import
Findings (24)

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 23)May include surrounding context.

md
entry: "python scripts/add-event.py"

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 70)May include surrounding context.

md
entry: "python scripts/add-event.py"

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 81)May include surrounding context.

md
entry: "python scripts/add-event.py"

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 97)May include surrounding context.

md
entry: "python scripts/add-event.py"

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 137)May include surrounding context.

md
entry: "python scripts/add-event.py"

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 159)May include surrounding context.

md
entry: "python scripts/add-event.py"

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 248)May include surrounding context.

md
entry: "python scripts/add-event.py"

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 279)May include surrounding context.

md
entry: "python scripts/add-event.py"

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 303)May include surrounding context.

md
entry: "python scripts/add-event.py"

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 319)May include surrounding context.

md
entry: "python scripts/add-event.py"

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 343)May include surrounding context.

md
entry: "python scripts/add-event.py"

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 360)May include surrounding context.

md
entry: "python scripts/add-event.py"

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

This markdown file contains the substantive skill documentation in Chinese, which can amount to a language/locale policy issue when no user opt-in or justification is provided. The policy specifically calls for flagging cases where a skill forces a specific language without user choice.

Content

No source excerpt is available for this finding.

Unsafe Defaults

Medium
Category
Tool Misuse
Confidence
75% confidence
Finding

Tool defaults are unsafe or overly permissive (e.g. disabled TLS verification, no authentication, world-writable permissions). Unsafe defaults widen the attack surface.

Content

Scanner excerpt · CHANGELOG.md (reported line 59)May include surrounding context.

md
|---|------|------|
| 25 | **搜索返回 errors[]** | 部分日历查询失败不阻断其他日历,错误信息完整返回 |
| 26 | **CALSCALE:GREGORIAN** | iCal 合规,部分客户端依赖此项 |
| 27 | **SSL 证书验证** | 启用默认验证,移除 `verify=False` 中间人风险 |
| 28 | **日历自动选择** | 按事件性质关键词自动选工作/个人日历 |
| 29 | **智能结束时间推断** | 会议 1h / 聚餐 2h / 航班 3h 等事件类型推断 |
| 30 | **搜索默认范围缩小** | 默认 180 天(原 365 天),减少 iCloud 响应时间和内存 |

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The primary skill description is written as an imperative product description in Chinese, and the document provides no indication that other languages are supported or that Chinese is an intentional region-specific limitation. Under the policy, forcing a specific language without user opt-in is a natural-language locale violation.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The trigger words include broad everyday terms like schedule, reminder, meeting, appointment, calendar, and event, including multilingual variants, which can cause accidental invocation during normal conversation. Because this skill performs write and delete operations on a user's real calendar, unintended activation can translate into unwanted state changes or destructive actions.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
86% confidence
Finding

The skill requires relative-date parsing in Asia/Shanghai by default without first deriving timezone or locale from user preferences or environment. This can misinterpret natural-language scheduling requests, causing events to be created, moved, or queried on the wrong date or time, which is especially risky for a state-changing calendar skill.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The natural-language instructions hardcode Asia/Shanghai date parsing rules, so expressions like tomorrow, next week, or afternoon are interpreted through a fixed regional assumption. In a calendar-management skill, that creates a realistic risk of incorrect event creation or updates, potentially leading to missed meetings or accidental modifications.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill claims update operations are protected by a confirmation gate, but the documented command flow and tool metadata do not actually enforce any runtime safeguard such as a required environment flag. In an agentic setting, this mismatch can lead to silent modification of calendar data when a model or orchestrator trusts the documentation instead of an enforced control.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

Declaring Asia/Shanghai as the global default timezone without user choice creates unsafe defaults for a cross-user calendar tool. While less severe than direct command injection, it can still cause systematic scheduling errors and misleading query results when used outside that timezone.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The docstring says the function generates a deterministic event UID for idempotent creation, but the implementation uses uuid.uuid4(), which is non-deterministic on every call. This is reinforced by later comments at L835-L836 describing idempotency, creating an active contradiction between documentation and behavior.

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 operational and safety instructions only in Chinese, including setup, credential handling, and destructive-operation safeguards. The policy allows locale constraints only when explicitly justified or when the user is offered a language/locale choice, neither of which is present here.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
95% confidence
Finding

The default event summary string "(无标题)" is hardcoded in Chinese, which imposes a specific language in user-visible output. The file does not offer a language choice or document a justified region-specific locale restriction, so this is a natural-language locale policy issue.

Content

No source excerpt is available for this finding.

Dynamic attribute access via getattr()

Low
Category
Dangerous Code Execution
Confidence
50% confidence
Finding

Dynamic getattr() with a non-literal attribute name can access arbitrary object attributes, potentially bypassing access controls.

Content

Scanner excerpt · scripts/add-event.py (reported line 358)May include surrounding context.

python
"location": "", "description": "", "rrule": "", "uid": "",
    }
    for key in ("summary", "dtstart", "dtend", "location", "description", "rrule", "uid"):
        obj = getattr(vevent, key, None)
        if obj and obj.value is not None:
            info[key] = str(obj.value)
    return info