T09 · Insecure Skill Coding Practices
- Location
calendar_sync.py:192- Finding
AppleScript Injection Through Untrusted Calendar Data
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This calendar skill is mostly purpose-aligned, but its optional AppleScript path can execute unsafe script content derived from document data.
Review proposed events before importing them, avoid the AppleScript method unless the input JSON is trusted, and assume event notes may sync to Apple/iCloud calendars and expose document summaries, amounts, source paths, IDs, or Notion links. Prefer ICS-only use with redacted notes until the AppleScript injection issue is fixed and dependency versions are pinned.
calendar_sync.py:192AppleScript Injection Through Untrusted Calendar Data
system-prompt.md:13Unpinned Third-Party Dependency Installation
The declared purpose suggests calendar syncing from structured dates, but the implementation scope also includes direct local application control, file generation, and exporting sensitive document metadata into calendar entries. This mismatch matters because users may approve a seemingly simple scheduling skill without realizing it can manipulate local apps and replicate private data into broadly visible calendar records.
The skill advertises code-capable behavior such as shell/AppleScript execution and file interaction, but it does not declare any explicit tool scope or permission boundaries. That omission increases the chance an agent will execute side-effecting operations without clear user consent or runtime restriction, especially because this skill can modify local Calendar data and potentially write ICS files.
The manifest description and examples are entirely in Korean, and the ICS sample sets a Korean locale marker ('//KO'), indicating an assumed language/locale. There is no opt-in language choice or documented justification that this skill is intentionally limited to Korean users or Korean-language documents.
The skill is designed to automatically create calendar events from parsed documents, but it does not prominently warn that it will modify the user's calendar data. Automatic insertion of deadlines and events can cause integrity issues, clutter, or accidental disclosure via synced calendars if done without explicit approval and review.
Including Notion links, original file paths, summaries, and financial information in calendar notes can leak sensitive metadata into a system that is often synced across devices, shared with assistants, or visible in notifications. Even if the calendar action is expected, replicating document internals into event descriptions materially expands exposure beyond the original document system.
The AppleScript path directly creates a calendar and inserts events in the local Calendar application, which is a real state-changing system action. Without an explicit warning and confirmation boundary, an agent using this skill could silently alter user data, create persistent entries, or propagate sensitive information through calendar sync services.
The file description, calendar names, CLI usage text, and status messages are all hard-coded in Korean, indicating the skill is intended to operate only in that language. The policy requires either offering a language/locale choice or clearly documenting and justifying a locale-specific constraint, which is not present here.
The AppleScript passed to osascript is built with untrusted document fields such as title and description interpolated directly into the script body. Only the description is partially escaped, while the title is not escaped at all and other AppleScript-special characters are not handled robustly, so crafted input can break out of the string context and alter script behavior, potentially executing arbitrary AppleScript actions on the host.
'''
try:
result = subprocess.run(
['osascript', '-e', script],
capture_output=True, text=True, timeout=10
)
The manifest description promises automatic reflection of extracted schedules into Apple Calendar. In the implementation, sync_to_calendar defaults to method="ics" and merely writes an ICS file, then instructs the user to double-click or import it manually unless an explicit AppleScript mode is selected on macOS.
The skill instructs generating ICS calendar files whose event description/memo explicitly includes potentially sensitive business metadata such as sender, assignee, summary, amount, Notion link, and source file. Calendar imports can sync broadly across devices/accounts and make this metadata more exposed than the original document context, yet the prompt provides no minimization guidance, consent step, or warning to the user.
The skill recommends AppleScript execution through osascript for calendar creation, which is a system-modifying action affecting the user's local Calendar data. Because the prompt includes no confirmation, dry-run preview, or safety guidance, it increases the risk of unintended event creation, duplication, or user approval bypass in an automation chain that is explicitly designed to auto-register extracted schedules.
The prompt instructs the agent to perform direct Apple Calendar registration via AppleScript, which is a state-changing action on the user's system and can leak document metadata by placing source details into calendar notes. Because the prompt does not require explicit informed consent or warn about what fields will be exported, users may unintentionally create events containing sensitive internal information.
The top-level docstring describes the script as choosing between ICS creation or direct AppleScript registration. However, the main flow unconditionally generates an ICS file and treats AppleScript as an optional additional step, so the documentation presents the behavior as an either-or path when the code is not structured that way.
The instructions, labels, and examples are entirely in Korean, and the calendar metadata includes a locale-specific identifier ('KO') without any note that the skill is Korea-specific or that users may choose another language. This may violate language/locale policy if the organization expects skills not to force a language without opt-in.
Nearly all operational instructions and output format are specified only in Korean, which can amount to a language/locale policy constraint if the skill is expected to serve general users. The file does not offer user opt-in for Korean nor explain that the skill is intentionally limited to a Korean-speaking or region-specific context.