Back to skill

Security audit

Email to Calendar Extraction Engine

Security checks for vulnerabilities and agentic risk

Overview

This skill is an email-to-calendar helper, but it asks agents to read inbox content and modify calendars with some unclear safeguards around automation, local commands, and stored email metadata.

Review before installing. Use it only with explicit mailbox and calendar permissions you are comfortable granting, require per-event confirmation for every create/update/delete action, avoid auto-create patterns, and prefer structured calendar APIs or ICS output over raw shell or AppleScript commands. Consider disabling or minimizing logs that retain email subjects, message IDs, and calendar event IDs.

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

T09 · Insecure Skill Coding Practices

Error
Location
SKILL.md:145
Finding

Unsafe Interpolation of Email-Derived Data into Shell and AppleScript Commands

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, lines 145-162
Vulnerability Type: Command and script injection
Risk Level: High

Vulnerable Code

bash
### Google Calendar (via `gog` or API)
```bash
gog calendar create \
  --title "Event Title" \
  --start "2026-02-17T09:00:00-05:00" \
  --end "2026-02-17T10:00:00-05:00" \
  --description "Extracted from email: [subject]" \
  --location "Zoom link or address"

Apple Calendar (via osascript)

bash
osascript -e 'tell application "Calendar"
  tell calendar "Work"
    make new event with properties {summary:"Event Title", start date:date "Monday, February 17, 2026 at 9:00:00 AM", end date:date "Monday, February 17, 2026 at 10:00:00 AM", description:"Extracted from email", location:"Zoom"}
  end tell
end tell'
text

### Technical Analysis

The documented calendar-creation flow places event titles, email subjects, descriptions, and locations into shell and AppleScript command strings. These fields can originate from untrusted email content. The instructions do not require validation, context-specific escaping, or invocation through a structured API or shell-free argument array.

Quoting a value is not sufficient when the value itself may contain quotation marks, command substitutions, shell metacharacters, or AppleScript syntax. If an agent replaces the example placeholders through direct string interpolation, crafted email content could terminate the intended string and inject additional shell or AppleScript operations.

The Google Calendar example is vulnerable when the assembled command is passed through a shell, such as with `sh -c`, because malicious values may escape their quoted argument or trigger shell expansion. The Apple Calendar example is especially sensitive because the complete program is supplied as one string to `osascript -e`; an injected quotation mark can alter the program structure and add arbitrary AppleS
...[truncated 1843 chars]
Remediation
View remediation

Remediation Suggestions

  1. Prefer structured calendar APIs over generated shell or AppleScript source. Pass event properties as typed API fields.
  2. When invoking gog, use a subprocess argument array with shell execution disabled. Each untrusted value must be supplied as a separate argument rather than concatenated into a command string.
  3. Never pass an assembled command containing email-derived values to sh -c, bash -c, eval, or an equivalent shell interpreter.
  4. For Apple Calendar, avoid embedding untrusted content directly into the osascript -e program. Pass values as separate argv parameters to an AppleScript run argv handler and treat them only as data.
  5. If source generation cannot be avoided, apply proven context-specific escaping for AppleScript string literals. Generic shell escaping is not valid for AppleScript and vice versa.
  6. Validate extracted fields before calendar creation. Enforce reasonable length limits, reject control characters, normalize line breaks, and allow only expected URL schemes such as https.
  7. Preserve the existing user-confirmation requirement, but do not treat confirmation as a substitute for safe command construction because users cannot reliably identify embedded injection syntax.
  8. Add security tests containing quotation marks, backticks, command substitutions, semicolons, newlines, and AppleScript delimiters in every email-derived field. Verify that these values remain literal calendar data and cannot change command behavior.
Vulnerability Patterns
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
Findings (9)

Description-Behavior Mismatch

High
Category
Not specified by scanner
Confidence
96% confidence
Finding

The manifest describes the skill as a pure extraction tool with no external dependencies, but the body instructs the agent to create calendar events, reminders, and follow-up actions. This capability mismatch can mislead users and policy systems into granting broader email/calendar access than they expect, increasing the risk of unintended side effects on user data and calendars.

Content

No source excerpt is available for this finding.

Missing User Warnings

High
Category
Not specified by scanner
Confidence
95% confidence
Finding

The auto_create_patterns configuration conflicts with the stated prohibition on auto-creation and implies certain events may be added automatically. Because this directly affects a user's calendar state, the absence of a clear warning and explicit consent mechanism makes accidental or unauthorized modifications more likely.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The README encourages inbox scanning and calendar entry creation without clearly warning that the skill may access privacy-sensitive email contents and modify calendar data. In an agent ecosystem, vague documentation can cause users to grant broad permissions or approve actions without understanding the data exposure and integrity risks, increasing the chance of unintended disclosure or unwanted calendar changes.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The skill claims to work universally with no external dependencies, yet its instructions depend on provider-specific tools and APIs such as gog, osascript, and other calendar integrations. This discrepancy can hide actual execution surfaces and permission requirements, making review, sandboxing, and user consent less reliable.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The invocation text is broad enough to match common inbox or email-related requests that may not be intended for this skill. Overbroad activation increases the chance the skill will process unnecessary email content or initiate calendar-related workflows in contexts where the user did not request them.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The skill states events should never be auto-created without confirmation, but later introduces auto_create_patterns in session memory, creating a conflicting policy. This inconsistency can cause silent calendar modifications if implementations honor the memory config over the safety rule.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The skill includes shell-style and local automation instructions that extend beyond passive extraction into endpoint-side execution and calendar manipulation. In an agent setting, such instructions can trigger risky local actions or tool use without sufficient platform-level review of the commands and their environment assumptions.

Content

No source excerpt is available for this finding.

Ssd 3

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

Persisting email-derived metadata such as subjects, dates, and event identifiers in a tracking log creates a retention and disclosure risk, especially if the storage is local, unencrypted, or shared across contexts. Even limited metadata can reveal sensitive meetings, travel, work relationships, and user activity patterns.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The skill instructs inbox scanning and processing of unread or recent emails, which can expose large volumes of sensitive content beyond the minimum necessary user input. Without prominent privacy notice, scope limits, and retention guidance, this creates avoidable data access and overcollection risk.

Content

No source excerpt is available for this finding.