Back to skill

Security audit

Apple Contacts

Security checks for vulnerabilities and agentic risk

Overview

This skill is a legitimate macOS Contacts manager, but it needs review because it can expose and persistently change sensitive contact data with weak safeguards.

Install only if you are comfortable granting the agent host access to your macOS Contacts. Before using write actions, manually confirm the exact contact, prefer stable IDs where available, avoid ambiguous names, and be cautious running the bundled tests because they modify the real Contacts database.

Vulnerability Patterns
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
  • 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
  • Agent Memory PoisoningWrites attacker-controlled rules into memory that affect later sessions
Findings (4)

T09 · Insecure Skill Coding Practices

Error
Location
scripts/mac-contacts.py:570
Finding

AppleScript Injection Through Contact and Group Names

Content
View full analysis
" "" ``` 3. The command replaces only double quotation marks and embeds the remaining value into the AppleScript source. 4. `osascript` parses the ...[truncated 919 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/mac-contacts.py:429
Finding

Ambiguous Name Matching Can Modify or Delete the Wrong Contact

Content
View full analysis
Remediation
View remediation

T05 · Unauthorized Access and Privilege Escalation

Warning
Location
scripts/mac-contacts.py:17
Finding

Search Commands Fetch Unnecessary Sensitive Contact Fields

Content
View full analysis
Remediation
View remediation

T08 · Insecure Dependencies

Note
Location
SKILL.md:30
Finding

Third-Party Python Dependencies Are Installed Without Version or Hash Pinning

Content
View full analysis
Remediation
View remediation
PyYAML== ``` 2. Generate and verify cryptographic hashes: ```text PyYAML== \ --hash=sha256: ``` 3. Install with: ```bash python3 -m pip install --require-hashes -r requirements.txt ``` 4. Pin relevant transitive PyObjC components as well, preferably through a generated lock file. 5. Document the trusted package index and avoid implicit private-index fallback that could enable dependency confusion. 6. Recommend installation inside an isolated virtual environment. 7. Update the runtime error message to direct users to the locked requirements file rather than an unrestricted `pip install` command. 8. Use automated dependency scanning and controlled update reviews before changing pinned versions. ]]>
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Behavioral ASTexec() Call, eval() Call, Dynamic Import
Findings (16)

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The declared description is for a contact-management CLI interacting with macOS Contacts. The supplied code chunk does not implement contact lookup, modification, deletion, or group management. Instead, it is infrastructure for running tests. While test code can be a supporting implementation detail for a larger project, this chunk’s actual behavior is materially different from the declared end-user functionality and exposes capabilities (executing arbitrary test scripts and summarizing results) not described in the skill purpose. Therefore this chunk does not accurately represent the declared description.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill description uses broad trigger language such as 'use whenever asked' for common contact-related requests, which can cause the agent to invoke this skill in many ordinary contexts without sufficiently narrowing for necessity, consent, or least privilege. Because the skill supports both sensitive data access and destructive actions, overbroad invocation increases the chance of unnecessary contact disclosure or unintended modification/deletion.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The skill documents create, update, delete, and list-management capabilities without warning that these actions are destructive or privacy-sensitive. In an agent setting, absence of a cautionary notice or confirmation requirement can lead to accidental contact changes, deletions, or mass organizational edits that are difficult for a user to notice or recover from.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
80% confidence
Finding

The skill invokes local shell-executed commands (python3 ... and explicitly osascript) and requires privileged access to the user's Contacts database, but it declares no tool scope or permission boundaries. In an agent setting, missing explicit constraints increases the chance the skill is invoked with broader-than-necessary execution privileges and without informed consent around sensitive data access.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

This skill reads highly sensitive personal data from the macOS Contacts store, including phone numbers, emails, addresses, birthdays, notes, and group membership, but the description does not foreground a privacy warning. In agent workflows, that omission can lead to unintentional exposure of third-party personal data in responses, logs, or downstream tooling.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The create, update, delete, and list-management commands can permanently alter or remove contact data, yet the documentation does not clearly warn users about these side effects up front. In an agentic environment, insufficient emphasis on destructive behavior increases the risk of accidental modifications to a user's address book or synced iCloud/Exchange contacts.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The key-fetch list includes highly sensitive fields such as notes, birthdays, URLs, social profiles, dates, departments, job titles, and thumbnail image data, while the skill description focuses on basic lookup and management of names, contact details, addresses, and list membership. Over-collecting contact data increases privacy exposure and violates data minimization, especially because this tool can serialize and return those fields via show.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The create and update commands make persistent changes to the user's address book immediately after argument parsing, without a confirmation step or dry-run preview. In an agent context, that raises the risk of unintended or unauthorized modification of personal data if a prompt is ambiguous, manipulated, or misinterpreted.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The skill launches osascript to manipulate Contacts via AppleScript, which introduces general subprocess execution capability beyond the stated purpose of a Contacts CLI. Even though this instance is narrowly scoped, adding interpreter-backed execution increases attack surface and can create trust-boundary issues in agent environments where subprocess use is more sensitive than direct framework calls.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

Removing a contact from a list performs a state-changing action via osascript without explicit warning or confirmation. In an agent-driven workflow, silent mutation combined with external interpreter execution increases the chance of unintended changes and reduces user visibility into what will happen.

Content

No source excerpt is available for this finding.

subprocess module call

Medium
Category
Dangerous Code Execution
Confidence
70% confidence
Finding

subprocess module calls execute external commands. Without careful input validation, this enables command injection.

Content

Scanner excerpt · scripts/mac-contacts.py (reported line 582)May include surrounding context.

python
f'  save\n'
        f'end tell'
    )
    result = subprocess.run(['osascript', '-e', script], capture_output=True, text=True)
    if result.returncode != 0:
        print(f"Error removing from list: {result.stderr.strip() or result.stdout.strip()}")
        sys.exit(1)

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The test script creates and deletes entries in the user's real macOS Contacts database without any explicit warning, sandboxing, or confirmation that personal address-book data will be modified. In the context of a contacts-management skill, this is risky because running tests against a live CNContactStore can alter real user data, create clutter, or accidentally delete similarly named contacts if matching is imperfect.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The script prints search and show command output directly to stdout, which may expose personal contact information such as names, emails, phone numbers, addresses, and internal contact IDs to logs, CI systems, terminal scrollback, or other observers. This is especially sensitive for a contacts skill because its normal operation handles PII, so test output can inadvertently leak real address-book contents when searches return non-fixture matches.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

This test performs a real write operation against the user's macOS Contacts database by creating a contact, but the script itself provides no in-file warning, isolation mechanism, or consent gate. In the context of an agent skill that may be run automatically, that is dangerous because it can silently modify personal data, pollute the address book, and create a dependency chain for later tests based on stateful side effects.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
84% confidence
Finding

This shell test invokes an update operation that changes contact fields such as organization, phone, birthday, and URL, which affects user data. Although the script logs command output, it does not include any warning, confirmation, or explanatory comment disclosing that it will modify address book records beyond the generic test label.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Low
Category
Not specified by scanner
Confidence
92% confidence
Finding

The generic search path matches against notes, organization, and full street/postal address content, which exceeds the declared search behavior of name, email, phone number, city, or country. This broadens the reachable sensitive data surface and may reveal contacts based on private notes or exact address details that users would not expect to be searched by default.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.