Back to skill

Security audit

Icloud Calendar Skill

Security checks for vulnerabilities and agentic risk

Overview

The skill does what it says in broad terms, but it handles iCloud credentials and calendar writes in ways users should review carefully before installing.

Review this before installing. Use only an Apple app-specific password, do not put credentials directly in source code, and be aware that the skill can write events to your iCloud Calendar and send event details to Apple's CalDAV service. The script should be fixed so help or invalid invocations never create calendar entries, and user-provided calendar text should be escaped or serialized with a proper iCalendar library.

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

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/add_event.py:51
Finding

Unescaped User Input Permits iCalendar Content Injection

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Note
Location
scripts/add_event.py:142
Finding

Invalid Invocation Triggers an Unexpected Authenticated Calendar Write

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Note
Location
README.md:25
Finding

Documentation Encourages Storing iCloud Credentials in Source Code

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
Findings (21)

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

The documented behavior does not fully match the reported code behavior: it accesses local credential files and environment variables without declared permissions, and may include automatic/demo execution paths not disclosed in the high-level description. Mismatches like this are dangerous because users may grant trust based on incomplete documentation while the code handles secrets or performs actions unexpectedly.

Content

No source excerpt is available for this finding.

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

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

md
Usage: python3 add_event.py "Event Title" "2026-03-06T10:00:00" "2026-03-06T11:00:00" "Description"

Setup:
1. Copy secrets/.env.example to secrets/.env
2. Fill in your iCloud credentials in secrets/.env
"""

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

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

md
Usage: python3 add_event.py "Event Title" "2026-03-06T10:00:00" "2026-03-06T11:00:00" "Description"

Setup:
1. Copy secrets/.env.example to secrets/.env
2. Fill in your iCloud credentials in secrets/.env
"""

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

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

md
Usage: python3 add_event.py "Event Title" "2026-03-06T10:00:00" "2026-03-06T11:00:00" "Description"

Setup:
1. Copy secrets/.env.example to secrets/.env
2. Fill in your iCloud credentials in secrets/.env
"""

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · scripts/add_event.py (reported line 7)May include surrounding context.

python
Usage: python3 add_event.py "Event Title" "2026-03-06T10:00:00" "2026-03-06T11:00:00" "Description"

Setup:
1. Copy secrets/.env.example to secrets/.env
2. Fill in your iCloud credentials in secrets/.env
"""

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · scripts/add_event.py (reported line 8)May include surrounding context.

python
Usage: python3 add_event.py "Event Title" "2026-03-06T10:00:00" "2026-03-06T11:00:00" "Description"

Setup:
1. Copy secrets/.env.example to secrets/.env
2. Fill in your iCloud credentials in secrets/.env
"""

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · scripts/add_event.py (reported line 14)May include surrounding context.

python
Usage: python3 add_event.py "Event Title" "2026-03-06T10:00:00" "2026-03-06T11:00:00" "Description"

Setup:
1. Copy secrets/.env.example to secrets/.env
2. Fill in your iCloud credentials in secrets/.env
"""

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · scripts/add_event.py (reported line 34)May include surrounding context.

python
Usage: python3 add_event.py "Event Title" "2026-03-06T10:00:00" "2026-03-06T11:00:00" "Description"

Setup:
1. Copy secrets/.env.example to secrets/.env
2. Fill in your iCloud credentials in secrets/.env
"""

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · scripts/add_event.py (reported line 16)May include surrounding context.

python
# Load credentials from .env file
def load_credentials():
    env_path = os.path.join(os.path.dirname(__file__), '..', 'secrets', '.env')
    if os.path.exists(env_path):
        with open(env_path) as f:
            for line in f:

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The description says the skill adds events to iCloud Calendar but does not clearly warn that event titles, descriptions, and reminder metadata are transmitted to Apple's iCloud CalDAV service. This can cause users to unknowingly send sensitive personal or business scheduling data to a third-party cloud provider, creating privacy and compliance risk.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The README tells users to hardcode iCloud credentials directly into the script, which encourages insecure secret handling and makes accidental disclosure via source control, backups, logs, or screenshots much more likely. Because these are valid iCloud app-specific credentials tied to a real account, exposure can allow unauthorized calendar access and misuse of the connected Apple account capability.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
89% confidence
Finding

The skill declares that it requires environment variables and performs network communication, but it does not declare an explicit tool scope such as permissions or allowed-tools. This weakens reviewability and sandbox enforcement because consumers cannot clearly see or constrain the skill's access to secrets and outbound network use.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The manifest requires ICLOUD_EMAIL and ICLOUD_PASSWORD but does not present any user-facing warning that highly sensitive personal credentials are needed to operate the skill. This creates a real risk of users supplying primary iCloud credentials without understanding the trust boundary, account sensitivity, or need for safer alternatives such as app-specific passwords, increasing the chance of credential exposure or misuse.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The documented usage implies the script adds an event only when called with the required arguments, but the actual help/error path triggers a test event creation. This mismatch increases the chance of accidental execution and makes the behavior deceptive from a safety perspective, especially because it uses stored credentials to write to a remote calendar.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

This code sends event data and stored credentials to a remote CalDAV endpoint using an HTTP PUT request, which changes the user's calendar state. Although success and error messages are printed after the fact, there is no pre-action confirmation prompt or explicit warning before transmitting data and creating the event.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

When invoked with too few arguments, the script does not stop after printing usage; instead it creates and uploads a demo event to the user's iCloud calendar. This is dangerous because a help or error path should never perform an authenticated write action, and an accidental invocation can cause unintended remote state changes without user consent.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
80% confidence
Finding

The usage examples and natural-language invocation examples are written in Chinese, while the rest of the README is in English, which may signal an implicit language expectation for interacting with the skill. The file does not clarify that other languages are supported or that Chinese input is merely illustrative, so this creates a possible language/locale policy concern.

Content

No source excerpt is available for this finding.

Vague Triggers

Low
Category
Not specified by scanner
Confidence
82% confidence
Finding

This manifest provides a broad capability description but does not specify when the skill should or should not be invoked, nor any limiting trigger context. Without explicit scope, an agent could match generic calendar-related requests too broadly.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Low
Category
Not specified by scanner
Confidence
78% confidence
Finding

The manifest describes a calendar-writing skill, but does not mention credential-file or environment access as part of its scope. While authentication is needed for CalDAV, this code adds a local secret-loading capability that is not stated in the skill description and goes beyond the user-facing purpose.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
96% confidence
Finding

The string literal "马上开始" forces a specific language for reminder content regardless of the user's locale or preference. The file does not offer a language selection mechanism or explain why Chinese-only output is required.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
94% confidence
Finding

When run with insufficient arguments, the script creates a demo event using mixed Chinese/English text and a Chinese description. This imposes a language choice on the user without any configuration, opt-in, or documented region-specific purpose.

Content

No source excerpt is available for this finding.