Back to skill

Security audit

Apple Notes Extractor

Security checks for vulnerabilities and agentic risk

Overview

This Apple Notes exporter is mostly purpose-aligned, but it needs review because some paths automatically install unpinned third-party code and the docs encourage persistent or external handling of private notes despite local-only privacy claims.

Review carefully before installing. Use only the simple local extraction path unless you have vetted the third-party Ruby parser, avoid the auto/full mode until dependencies are pinned or manually reviewed, and do not enable cron, daemon, AI, Notion, Git, or remote-backup workflows without deciding exactly which notes may be copied, where they will be stored, and how they can be deleted.

Vulnerability Patterns
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
  • System PersistenceInstalls backdoors, hooks, services, or scheduled tasks that survive the run
  • 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
Findings (4)

T03 · Remote Payload Retrieval and Execution

Error
Location
USAGE.md:156
Finding
Remote Homebrew installer is piped directly into a shell<![CDATA[ ## Vulnerability Details **File Location**: `USAGE.md:156` **Vulnerability Type**: Remote mutable code execution without integrity verification **Risk Level**: High ### Vulnerable Code ```bash curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh | bash ``` ### Technical Analysis The installation guidance downloads a shell script from the current `HEAD` of a remote repository and immediately pipes it to Bash. The user cannot inspect the downloaded content before execution, and the command does not pin a commit, validate a checksum, or verify a cryptographic signature. Although the URL belongs to Homebrew's official GitHub repository, it is mutable. A compromise of the upstream repository, GitHub account, distribution infrastructure, DNS or TLS trust chain, or an unexpected upstream modification would change the code executed by users without requiring any change to this project. This behavior is not necessary for the Skill's core functionality. Homebrew is only suggested as part of troubleshooting the optional full-extraction method. ### Attack Path 1. An attacker compromises the referenced upstream repository, an authorized maintainer account, or another part of the download path. 2. The attacker modifies the script served from the `HEAD` URL. 3. A user follows the troubleshooting instructions and executes the documented command. 4. `curl` retrieves the attacker's current payload and streams it directly to Bash. 5. The payload executes with the privileges and environment of the invoking user. 6. If the installer or user subsequently invokes privileged operations, the compromise may extend to system-level changes. ### Impact Assessment Successful exploitation provides arbitrary command execution under the invoking user's account. The payload could read private user data, alter shell configuration, install persistence, steal credentials accessible to the user, or modify development tools and dependencies. The immediate ...[truncated 149 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Remove the direct `curl | bash` instruction. 2. Direct users to Homebrew's official installation documentation instead of executing remote content inline. 3. If an automated download is necessary: - Pin the installer to a reviewed release or immutable commit. - Download it to a local file. - Verify a documented cryptographic checksum or signature. - Allow the user to inspect the file before execution. - Execute it as a separate, explicit step. 4. Clearly state that Homebrew and Ruby are only required for the optional full-extraction method. 5. Avoid requesting administrator privileges unless a specific operation demonstrably requires them. ]]>

T08 · Insecure Dependencies

Error
Location
scripts/extract-notes.py:225
Finding
Full extraction automatically installs and executes unpinned third-party code<![CDATA[ ## Vulnerability Details **File Location**: `scripts/extract-notes.py:225-243` **Vulnerability Type**: Unpinned supply-chain dependency retrieval and execution **Risk Level**: High ### Vulnerable Code ```python def install_ruby_parser(self): """Install the Apple Cloud Notes Parser""" tools_dir = self.root_dir / "tools" tools_dir.mkdir(exist_ok=True) try: # Clone the repository subprocess.run([ "git", "clone", "https://github.com/threeplanetssoftware/apple_cloud_notes_parser.git" ], cwd=str(tools_dir), check=True) # Install Ruby dependencies parser_dir = tools_dir / "apple_cloud_notes_parser" subprocess.run([ "bundle", "install" ], cwd=str(parser_dir), check=True) print("✅ Ruby parser installed successfully") return True ``` The downloaded parser is subsequently executed by the full-extraction path: ```python cmd = [ "ruby", str(parser_path / "notes_cloud_ripper.rb"), "--export-json", str(output_file) ] result = subprocess.run( cmd, capture_output=True, text=True, timeout=self.config["methods"]["full"]["timeout"], cwd=str(parser_path) ) ``` ### Technical Analysis When the full extraction method is requested and the parser directory is absent, the Skill clones the current default branch of a third-party repository. It then executes `bundle install`, which may run package installation hooks and retrieve additional dependencies. Neither the repository commit nor the resolved dependencies are verified by this project. The installed parser is later executed with access to the user's Notes data. The automatic fallback from the simple method to the full method can also reach this installation path after a simple extraction failure. Using an external parser may be reasonable for optional attachment-aware extraction, but automatically retrieving and running its latest code exceeds ...[truncated 1229 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Vendor and audit the required parser code, or pin the repository to a specific reviewed commit hash. 2. Maintain and enforce a reviewed Ruby lockfile with exact dependency versions and integrity metadata. 3. Verify downloaded source and package hashes or signatures before installation. 4. Require explicit user confirmation before retrieving or executing third-party code. 5. Do not initiate dependency installation merely because the simple extraction method failed. 6. Separate installation from extraction so normal execution never modifies the dependency set. 7. Run the parser with the narrowest practical filesystem permissions and without unrelated secrets in its environment. 8. Document the parser's data access and supply-chain risks. ]]>

T06 · System Persistence

Warning
Location
AUTOMATION_INTEGRATION.md:88
Finding
Documentation encourages persistent scheduled extraction of private Notes<![CDATA[ ## Vulnerability Details **File Location**: `AUTOMATION_INTEGRATION.md:88-97` **Additional Location**: `USAGE.md:117-120` **Vulnerability Type**: Persistent scheduled access to sensitive user data **Risk Level**: Medium ### Vulnerable Code ```bash # Add to crontab # Daily extraction at 6:00 AM 0 6 * * * cd /Users/saiterminal/.openclaw/workspace-genai-research/apple-notes-extractor && python3 scripts/extract-notes.py --method auto >> logs/daily-extraction.log 2>&1 # Real-time monitoring (every 30 minutes during work hours) */30 9-17 * * 1-5 cd /Users/saiterminal/.openclaw/workspace-genai-research/apple-notes-extractor && python3 scripts/monitor-notes.py --check-once # Weekly full extraction with attachments (Sundays at 2 AM) 0 2 * * 0 cd /Users/saiterminal/.openclaw/workspace-genai-research/apple-notes-extractor && python3 scripts/extract-notes.py --method full ``` A second documented example is: ```bash # Add to crontab for daily export at 9 AM 0 9 * * * cd /path/to/apple-notes-extractor && python3 scripts/extract-notes.py --method auto && python3 scripts/workflow-integrator.py ``` ### Technical Analysis The project does not silently install these cron entries; users must add them explicitly. Nevertheless, the production instructions encourage recurring, cross-session access to private Notes and repeated creation of plaintext exports. The scheduled full-extraction job is particularly sensitive because it can invoke the automatic third-party parser installation and execution path. Scheduled execution also means a later modification of the project or its dependencies can run without contemporaneous user review. Scheduling is a legitimate optional feature for monitoring and automated export, but it is unnecessary for one-time extraction and materially expands the duration and frequency of access. ### Attack Path 1. A user follows the deployment instructions and installs one or more cron entries. 2. The jobs continue to run across terminal se ...[truncated 905 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Present scheduling as a separate, explicit opt-in feature rather than part of the default production setup. 2. Document how to list, disable, and remove every scheduled entry. 3. Avoid scheduling the `full` or `auto` method when it may retrieve dependencies automatically. 4. Pin and protect all code and dependencies before allowing unattended execution. 5. Use absolute interpreter and script paths owned by the user and not writable by untrusted accounts. 6. Apply restrictive permissions to generated files and directories, such as user-only access. 7. Prefer a least-privileged macOS LaunchAgent with explicit configuration and logging over loosely managed cron entries. 8. Provide retention and cleanup controls for historical exports. 9. Warn users that scheduled jobs continue to access Notes after the interactive session ends. ]]>

T09 · Insecure Skill Coding Practices

Error
Location
INTEGRATION.md:47
Finding
Local-only privacy assurances conflict with integrations that transmit Notes externally<![CDATA[ ## Vulnerability Details **File Location**: `INTEGRATION.md:47-112,159-204` **Related Claim**: `SKILL.md:101-105` **Vulnerability Type**: Misleading privacy guarantee and potential disclosure of sensitive note content **Risk Level**: High ### Vulnerable Code and Documentation The Skill makes an unconditional privacy claim: ```markdown ## Security & Privacy - All processing happens locally on your machine - No data sent to external services - Respects macOS security permissions - Configurable privacy filters for sensitive content - Optional encryption for exported data ``` The integration guide includes an AI service transmission: ```python response = openai.ChatCompletion.create( model="gpt-4", messages=[{ "role": "user", "content": f"Summarize this note in one sentence: {note['body'][:500]}" }] ) ``` It also documents complete export transmission through Git and SSH-based backup: ```bash cd output git add . git commit -m "Notes backup $(date '+%Y-%m-%d %H:%M:%S')" git push origin main # Upload to cloud storage rsync -av . user@backup-server:/backups/apple-notes/ ``` The Notion example sends note title, metadata, and body content to an external API: ```python def create_notion_page(note): url = "https://api.notion.com/v1/pages" headers = { "Authorization": f"Bearer {NOTION_TOKEN}", "Content-Type": "application/json", "Notion-Version": "2022-06-28" } data = { "parent": {"database_id": DATABASE_ID}, "properties": { "Name": { "title": [{"text": {"content": note['title']}}] }, "Created": { "date": {"start": note['created']} }, "Folder": { "select": {"name": note['folder']} } }, "children": [ { "object": "block", "type": "paragraph", "paragraph": { ...[truncated 2283 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Replace the unconditional privacy claim with a precise statement that only the core/default workflow is local. 2. Clearly label every integration that sends data off-device. 3. Describe the exact fields transmitted, destination, authentication method, and expected retention behavior. 4. Require explicit user consent before enabling each external destination. 5. Default to transmitting no note bodies and allow users to select individual notes or folders. 6. Add robust redaction and review steps before network transmission; do not rely only on substring filters. 7. Load API credentials from protected environment variables or a secure credential store rather than encouraging source-code constants. 8. Warn users against pushing exports to public or improperly configured Git repositories. 9. Recommend encryption in transit and at rest, destination allowlisting, restricted remote permissions, and retention limits. 10. Add a dry-run mode that displays the records and fields that would leave the machine. ]]>
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
Findings (51)

Tp4

High
Category
MCP Tool Poisoning
Confidence
94% confidence
Finding
If the skill sends outbound webhook notifications while claiming only local Apple Notes monitoring, it introduces undeclared network exfiltration risk for note-derived data or metadata. Even if only metadata is transmitted, users handling personal or corporate notes could unknowingly leak sensitive information to external endpoints.

Tp4

High
Category
MCP Tool Poisoning
Confidence
90% confidence
Finding
If the skill sends outbound webhook notifications while claiming only local Apple Notes monitoring, it introduces undeclared network exfiltration risk for note-derived data or metadata. Even if only metadata is transmitted, users handling personal or corporate notes could unknowingly leak sensitive information to external endpoints.

Tp4

High
Category
MCP Tool Poisoning
Confidence
93% confidence
Finding
If the skill sends outbound webhook notifications while claiming only local Apple Notes monitoring, it introduces undeclared network exfiltration risk for note-derived data or metadata. Even if only metadata is transmitted, users handling personal or corporate notes could unknowingly leak sensitive information to external endpoints.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding
If the skill sends outbound webhook notifications while claiming only local Apple Notes monitoring, it introduces undeclared network exfiltration risk for note-derived data or metadata. Even if only metadata is transmitted, users handling personal or corporate notes could unknowingly leak sensitive information to external endpoints.

Ae1

High
Category
analysis-evasion
Content
./scripts/setup.sh
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Description-Behavior Mismatch

High
Confidence
99% confidence
Finding
The skill is described as a notes extraction/export utility, but it also clones and installs third-party tooling from GitHub during execution. That hidden capability materially changes the trust boundary by introducing network access and external code execution that users would not reasonably expect from the stated functionality.

Context-Inappropriate Capability

High
Confidence
99% confidence
Finding
Runtime network access and package installation are unnecessary and dangerous capabilities for a local notes extraction workflow. In a skill that handles private Notes content, this is especially risky because a compromised dependency chain could execute code in the same environment that has access to sensitive personal data.

Tool Parameter Abuse

High
Category
Tool Misuse
Content
if python3 scripts/extract-notes.py --method simple --output-dir output/test 2>/dev/null; then
    print_success "Basic extraction test successful"
    # Clean up test output
    rm -rf output/test 2>/dev/null || true
else
    print_warning "Basic extraction test failed. You may need to configure permissions."
fi
Confidence
95% confidence
Finding
Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Missing User Warnings

Medium
Confidence
92% confidence
Finding
The document presents Apple Notes extraction and monitoring as production-ready automation without any prominent consent, retention, or sensitivity warning, despite Apple Notes commonly containing personal, financial, medical, or credential-adjacent data. This can normalize persistent collection of highly sensitive note content and lead users to enable broad access without understanding the privacy implications.

Missing User Warnings

Medium
Confidence
95% confidence
Finding
The cron job examples enable unattended recurring extraction and monitoring, which creates continuous background collection and local logging/storage of note content without clearly warning the user. In the context of a personal notes integration skill, this is especially risky because it turns an inherently sensitive data source into an always-on feed for other systems.

Missing User Warnings

Medium
Confidence
96% confidence
Finding
The instructions append extracted note insights into memory files, effectively propagating private note content into additional long-term systems where access controls, deletion behavior, and downstream reuse may differ. This increases exposure and persistence of sensitive information beyond the original Notes app, making accidental disclosure or over-collection more likely.

External Transmission

Medium
Category
Data Exfiltration
Content
'folder': note['folder']
    }
    
    requests.put(
        f"http://localhost:9200/notes/_doc/{note['id']}",
        json=doc
    )
Confidence
70% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Internal Network Request

Medium
Category
Server-Side Request Forgery
Content
'folder': note['folder']
    }
    
    requests.put(
        f"http://localhost:9200/notes/_doc/{note['id']}",
        json=doc
    )
Confidence
70% confidence
Finding
Code issues a request to a loopback, link-local, or private-range host. This can reach internal services not meant to be exposed and is a common SSRF pivot.

Missing User Warnings

Medium
Confidence
95% confidence
Finding
The guide includes an AI processing example that sends note body content to an external LLM service without an explicit privacy warning, consent step, or data-minimization guidance. Because Apple Notes commonly contains sensitive personal or business information, this can lead users to unintentionally disclose confidential data to third parties.

Missing User Warnings

Medium
Confidence
93% confidence
Finding
The automated backup example commits extracted notes to git and uploads them to a remote server, but it does not warn about long-term persistence, replication, or unauthorized access risks. Users may unknowingly publish or replicate highly sensitive note contents into systems with weaker access controls or broader retention.

Missing User Warnings

Medium
Confidence
96% confidence
Finding
The Notion migration example transmits note titles and body content to a third-party SaaS platform without an explicit disclosure warning. This creates a real privacy and compliance risk because users may transfer sensitive Apple Notes data into an external system with different sharing, retention, and access properties.

External Transmission

Medium
Category
Data Exfiltration
Content
DATABASE_ID = "your-database-id"

def create_notion_page(note):
    url = "https://api.notion.com/v1/pages"
    headers = {
        "Authorization": f"Bearer {NOTION_TOKEN}",
        "Content-Type": "application/json",
Confidence
90% confidence
Finding
The hardcoded Notion API endpoint indicates note content will be transmitted to an external SaaS provider. While the endpoint itself is not malicious, the surrounding example facilitates data export of sensitive note content without prominent warnings or privacy controls.

External Transmission

Medium
Category
Data Exfiltration
Content
]
    }
    
    return requests.post(url, headers=headers, json=data)

# Load and migrate notes
with open('output/json/notes_auto_latest.json') as f:
Confidence
91% confidence
Finding
The code posts note-derived content to the Notion API, transferring potentially sensitive user data to a third-party service. In the context of an Apple Notes extractor, this is dangerous because notes frequently contain private, regulated, or business-confidential information, and the example lacks safeguards or warnings.

Missing User Warnings

Medium
Confidence
94% confidence
Finding
This checklist promotes automated extraction, monitoring, indexing, backup, and AI summarization of Apple Notes without any explicit warning about the sensitivity of note contents, retention, sharing boundaries, or consent requirements. In the context of Apple Notes, users commonly store passwords, personal records, financial details, and other highly sensitive data, so normalizing broad workflow integration and version-controlled backups materially increases privacy and data-exposure risk.

Lp3

Medium
Category
MCP Least Privilege
Confidence
95% confidence
Finding
The skill declares no explicit tool scope or permissions even though it instructs use of Python, osascript, shell commands, file writes, and package installation. This is dangerous because it obscures the true capability boundary of a skill that accesses private Apple Notes data and writes exports to disk, reducing informed user consent and making over-privileged execution more likely.

Missing User Warnings

Medium
Confidence
95% confidence
Finding
The skill encourages bulk extraction and export of Apple Notes without a prominent warning that notes may contain highly sensitive personal, financial, health, legal, or corporate information that will be copied into local files or downstream tools. In this context, omission of a clear warning materially increases the chance of accidental data sprawl and inappropriate handling of sensitive content.

Missing User Warnings

Medium
Confidence
94% confidence
Finding
The monitoring and auto-export instructions omit a warning that continuous monitoring can capture future note edits and persist them to other locations over time. This is especially risky for Apple Notes because users may later add credentials, personal records, or confidential work material, which would then be silently propagated to archives or third-party knowledge stores.

Missing User Warnings

Medium
Confidence
95% confidence
Finding
The documentation tells users where extracted notes are saved but does not clearly warn that these files may contain highly sensitive personal content from Apple Notes. In this skill context, the omission is more dangerous because the tool explicitly bulk-extracts private notes into JSON and markdown files that could be indexed, synced, backed up, or exposed to other local users/processes.

Missing User Warnings

Medium
Confidence
91% confidence
Finding
The monitoring and daemon instructions encourage continuous or repeated processing of private notes without clearly warning users about the privacy implications of ongoing collection. In a note-extraction skill, background monitoring increases risk by widening the window for capturing sensitive content and silently generating updated exports over time.

Intent-Code Divergence

Medium
Confidence
95% confidence
Finding
The guide asserts that all processing is local and no data is sent externally, yet it instructs the user to fetch and execute a remote installer script from GitHub via curl-to-bash. That claim is misleading because setup requires network access and execution of unreviewed remote code, which could be tampered with or behave unexpectedly.

Static analysis

No suspicious patterns detected.