Back to skill

Security audit

Apple Notes Updater

Security checks for vulnerabilities and agentic risk

Overview

This skill is a plausible Apple Notes updater, but it can overwrite notes without safeguards and contains an input-handling bug that can turn a note title into executable AppleScript.

Review before installing or using. Only run it with trusted note titles and trusted content, avoid titles influenced by outside input, and understand that it may replace an existing note body rather than append. A safer version should pass values to osascript as arguments, reject ambiguous duplicate titles, clean temporary files on errors, and ask for explicit confirmation or provide backup guidance before overwriting notes.

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
update_note.sh:3
Finding

AppleScript Injection Through Unsanitized Note Title

Content
View full analysis
"$TMP_FILE" osascript <
Remediation
View remediation
&2 exit 2 fi NOTE_TITLE=$1 NEW_BODY=$2 TMP_FILE=$(mktemp) trap 'rm -f -- "$TMP_FILE"' EXIT HUP INT TERM printf '%s' "$NEW_BODY" > "$TMP_FILE" osascript - "$NOTE_TITLE" "$TMP_FILE" <<'APPLESCRIPT' on run argv set noteTitle to item 1 of argv set temporaryPath to item 2 of argv set newBodyFilePath to (POSIX file temporaryPath) as alias set fileRef to missing value try set fileRef to open for access newBodyFilePath set theContent to read fileRef as «class utf8» close access fileRef set fileRef to missing value tell application "Notes" set matchingNotes to notes whose name is noteTitle if (count of matchingNotes) is not 1 then error "Expected exactly one note with the supplied title." end if set body of item 1 of matchingNotes to theContent end tell on error errorMessage number errorNumber if fileRef is not missing value then try close access fileRef end try end if error errorMessage number errorNumber end try end run APPLESCRIPT ``` Additional hardening measures include: - Validate that exactly two arguments are supplied. - Use `set -euo pipefail` to stop on failures and unset variables. - Use `printf '%s'` instead of `echo` so content beginning with options or containing escape sequences is handled consistently. - Register a cleanup trap immediately after creating the temporary ...[truncated 231 chars]
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
Findings (3)

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The skill enables non-interactive modification of Apple Notes by title and explicitly supports overwriting note bodies, but it does not warn about destructive behavior, ambiguity in note selection, or the possibility of silently replacing existing content. In this context, omission of those warnings increases the risk of unintended data loss because users or agents may treat the operation as routine automation without safeguards.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The script performs file write/delete actions and an irreversible note update by setting the note body, then removing the temporary file. There is no confirmation prompt, user-facing warning, or explanatory comment in English describing the impact to user data before these operations occur.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
96% confidence
Finding

The file contains natural-language comments in Russian, which may violate language or locale policy when no user choice or documented justification is provided. This can reduce accessibility and maintainability for users who do not read that language.

Content

No source excerpt is available for this finding.