Back to skill

Security audit

Mac Cleaner - Because your Mac shouldn't have more baggage than your ex.

Security checks for vulnerabilities and agentic risk

Overview

This appears to be a legitimate Mac cleanup helper, but it deserves Review because it includes broad deletion commands, backup deletion guidance, sudo log cleanup, and Full Disk Access guidance for everyday users.

Review before installing or running clean mode. Run analyze first, do not paste the iOS backup rm -rf command unless you have confirmed the exact backup folder is no longer needed, avoid delete-all Time Machine snapshot commands unless you understand the recovery impact, and be cautious about granting Terminal Full Disk Access or entering an administrator password for cleanup.

Vulnerability Patterns
  • 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
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
Vulnerability Patterns
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • 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 Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
Findings (37)

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding
The skill is presented as a safe everyday cleanup tool, but it also instructs users to perform privileged deletions and inspect additional sensitive storage areas such as iOS backups and Downloads. That mismatch matters because users may consent to broader or riskier actions than they reasonably expect from the description, increasing the chance of accidental data loss or overbroad trust.

Tool Parameter Abuse

High
Category
Tool Misuse
Content
ls -lah ~/Library/Application\ Support/MobileSync/Backup/

# Delete specific backup (use folder name from above)
rm -rf ~/Library/Application\ Support/MobileSync/Backup/[FOLDER_NAME]
```

Or use **Finder → Locations → [Your iPhone] → Manage Backups**
Confidence
96% confidence
Finding
The command rm -rf ~/Library/Application\ Support/MobileSync/Backup/[FOLDER_NAME] is a destructive recursive deletion pattern applied to valuable backup data, with placeholder substitution left to the user. In the context of a consumer storage-cleanup skill, this is especially dangerous because a mistyped folder name or misunderstood path can permanently erase needed backups without recovery.

Tool Parameter Abuse

High
Category
Tool Misuse
Content
ls -lah ~/Library/Application\ Support/MobileSync/Backup/

# Delete specific backup (use folder name from above)
rm -rf ~/Library/Application\ Support/MobileSync/Backup/[FOLDER_NAME]
```

Or use **Finder → Locations → [Your iPhone] → Manage Backups**
Confidence
96% confidence
Finding
The command rm -rf ~/Library/Application\ Support/MobileSync/Backup/[FOLDER_NAME] is a destructive recursive deletion pattern applied to valuable backup data, with placeholder substitution left to the user. In the context of a consumer storage-cleanup skill, this is especially dangerous because a mistyped folder name or misunderstood path can permanently erase needed backups without recovery.

Tool Parameter Abuse

High
Category
Tool Misuse
Content
ls -lah ~/Library/Application\ Support/MobileSync/Backup/

# Delete specific backup (use folder name from above)
rm -rf ~/Library/Application\ Support/MobileSync/Backup/[FOLDER_NAME]
```

Or use **Finder → Locations → [Your iPhone] → Manage Backups**
Confidence
96% confidence
Finding
The command rm -rf ~/Library/Application\ Support/MobileSync/Backup/[FOLDER_NAME] is a destructive recursive deletion pattern applied to valuable backup data, with placeholder substitution left to the user. In the context of a consumer storage-cleanup skill, this is especially dangerous because a mistyped folder name or misunderstood path can permanently erase needed backups without recovery.

Tool Parameter Abuse

High
Category
Tool Misuse
Content
if [[ $cache_size -gt 100 ]]; then
        print_info "Clearing user caches (~${cache_size}MB)..."
        rm -rf ~/Library/Caches/*
        SPACE_FREED=$((SPACE_FREED + cache_size))
        print_info "Caches cleared."
    else
Confidence
100% 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).

Tool Parameter Abuse

High
Category
Tool Misuse
Content
if [[ $cache_size -gt 100 ]]; then
        print_info "Clearing user caches (~${cache_size}MB)..."
        rm -rf ~/Library/Caches/*
        SPACE_FREED=$((SPACE_FREED + cache_size))
        print_info "Caches cleared."
    else
Confidence
100% 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).

Tool Parameter Abuse

High
Category
Tool Misuse
Content
if [[ $cache_size -gt 100 ]]; then
        print_info "Clearing user caches (~${cache_size}MB)..."
        rm -rf ~/Library/Caches/*
        SPACE_FREED=$((SPACE_FREED + cache_size))
        print_info "Caches cleared."
    else
Confidence
100% 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).

Tool Parameter Abuse

High
Category
Tool Misuse
Content
if [[ $cache_size -gt 100 ]]; then
        print_info "Clearing user caches (~${cache_size}MB)..."
        rm -rf ~/Library/Caches/*
        SPACE_FREED=$((SPACE_FREED + cache_size))
        print_info "Caches cleared."
    else
Confidence
100% 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).

Tool Parameter Abuse

High
Category
Tool Misuse
Content
if [[ $cache_size -gt 100 ]]; then
        print_info "Clearing user caches (~${cache_size}MB)..."
        rm -rf ~/Library/Caches/*
        SPACE_FREED=$((SPACE_FREED + cache_size))
        print_info "Caches cleared."
    else
Confidence
100% 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).

Tool Parameter Abuse

High
Category
Tool Misuse
Content
if [[ $cache_size -gt 100 ]]; then
        print_info "Clearing user caches (~${cache_size}MB)..."
        rm -rf ~/Library/Caches/*
        SPACE_FREED=$((SPACE_FREED + cache_size))
        print_info "Caches cleared."
    else
Confidence
100% 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).

Tool Parameter Abuse

High
Category
Tool Misuse
Content
if [[ $cache_size -gt 100 ]]; then
        print_info "Clearing user caches (~${cache_size}MB)..."
        rm -rf ~/Library/Caches/*
        SPACE_FREED=$((SPACE_FREED + cache_size))
        print_info "Caches cleared."
    else
Confidence
100% 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).

Tool Parameter Abuse

High
Category
Tool Misuse
Content
if [[ $cache_size -gt 100 ]]; then
        print_info "Clearing user caches (~${cache_size}MB)..."
        rm -rf ~/Library/Caches/*
        SPACE_FREED=$((SPACE_FREED + cache_size))
        print_info "Caches cleared."
    else
Confidence
100% 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).

Tool Parameter Abuse

High
Category
Tool Misuse
Content
if [[ $dd_size -gt 100 ]]; then
            print_info "Clearing Xcode Derived Data (~${dd_size}MB)..."
            rm -rf ~/Library/Developer/Xcode/DerivedData/*
            rm -rf ~/Library/Developer/Xcode/iOS\ DeviceSupport/* 2>/dev/null || true
            SPACE_FREED=$((SPACE_FREED + dd_size))
            print_info "Xcode data cleared."
Confidence
100% 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).

Tool Parameter Abuse

High
Category
Tool Misuse
Content
if [[ $dd_size -gt 100 ]]; then
            print_info "Clearing Xcode Derived Data (~${dd_size}MB)..."
            rm -rf ~/Library/Developer/Xcode/DerivedData/*
            rm -rf ~/Library/Developer/Xcode/iOS\ DeviceSupport/* 2>/dev/null || true
            SPACE_FREED=$((SPACE_FREED + dd_size))
            print_info "Xcode data cleared."
        else
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).

Tool Parameter Abuse

High
Category
Tool Misuse
Content
if [[ $dd_size -gt 100 ]]; then
            print_info "Clearing Xcode Derived Data (~${dd_size}MB)..."
            rm -rf ~/Library/Developer/Xcode/DerivedData/*
            rm -rf ~/Library/Developer/Xcode/iOS\ DeviceSupport/* 2>/dev/null || true
            SPACE_FREED=$((SPACE_FREED + dd_size))
            print_info "Xcode data cleared."
        else
Confidence
100% 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).

Tool Parameter Abuse

High
Category
Tool Misuse
Content
if [[ $trash_size -gt 0 ]]; then
        print_info "Emptying trash (~${trash_size}MB)..."
        osascript -e 'tell application "Finder" to empty trash' 2>/dev/null || rm -rf ~/.Trash/*
        SPACE_FREED=$((SPACE_FREED + trash_size))
        print_info "Trash emptied."
    else
Confidence
100% 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).

Context-Inappropriate Capability

High
Confidence
99% confidence
Finding
Invoking sudo to inspect and delete files grants the script elevated capabilities beyond the stated use case of user-friendly disk cleanup. This is dangerous because a mistake, path expansion issue, or future modification in a privileged code path can cause system-wide damage, and users may be conditioned to enter admin credentials for low-risk tasks.

Tool Parameter Abuse

High
Category
Tool Misuse
Content
# Chrome
    if [[ -d ~/Library/Caches/Google/Chrome ]]; then
        local chrome_size=$(du -sm ~/Library/Caches/Google/Chrome 2>/dev/null | awk '{print $1}' || echo "0")
        rm -rf ~/Library/Caches/Google/Chrome/Default/Cache/* 2>/dev/null || true
        browser_cache=$((browser_cache + chrome_size))
    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).

Tool Parameter Abuse

High
Category
Tool Misuse
Content
# Chrome
    if [[ -d ~/Library/Caches/Google/Chrome ]]; then
        local chrome_size=$(du -sm ~/Library/Caches/Google/Chrome 2>/dev/null | awk '{print $1}' || echo "0")
        rm -rf ~/Library/Caches/Google/Chrome/Default/Cache/* 2>/dev/null || true
        browser_cache=$((browser_cache + chrome_size))
    fi
Confidence
100% 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).

Tool Parameter Abuse

High
Category
Tool Misuse
Content
# Safari
    if [[ -d ~/Library/Caches/com.apple.Safari ]]; then
        rm -rf ~/Library/Caches/com.apple.Safari/Cache.db 2>/dev/null || true
    fi
    
    # Firefox
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).

Tool Parameter Abuse

High
Category
Tool Misuse
Content
# Safari
    if [[ -d ~/Library/Caches/com.apple.Safari ]]; then
        rm -rf ~/Library/Caches/com.apple.Safari/Cache.db 2>/dev/null || true
    fi
    
    # Firefox
Confidence
100% 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).

Tool Parameter Abuse

High
Category
Tool Misuse
Content
# Firefox
    if [[ -d ~/Library/Caches/Firefox ]]; then
        rm -rf ~/Library/Caches/Firefox/Profiles/*/cache2/* 2>/dev/null || true
    fi
    
    if [[ $browser_cache -gt 0 ]]; then
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).

Tool Parameter Abuse

High
Category
Tool Misuse
Content
# Firefox
    if [[ -d ~/Library/Caches/Firefox ]]; then
        rm -rf ~/Library/Caches/Firefox/Profiles/*/cache2/* 2>/dev/null || true
    fi
    
    if [[ $browser_cache -gt 0 ]]; then
Confidence
100% 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).

Vague Triggers

Medium
Confidence
92% confidence
Finding
The description and 'When to use' section include broad phrases like 'How do I free up disk space?' and 'Why is my disk full?' without tighter activation constraints or exclusion conditions. Because this is a markdown file, these vague triggers could cause the skill to activate for general troubleshooting requests that are not specifically asking for cleanup actions.

Sudo/Root Execution

Medium
Category
Privilege Escalation
Content
| iOS Simulators | ✅ Yes | Unused simulator devices |
| Xcode Derived Data | ✅ Yes | Build artifacts (rebuildable) |
| Browser Caches | ✅ Yes | Chrome, Safari, Firefox |
| System Logs | ✅ Old only | 7+ days old, requires sudo |
| Trash | ✅ Yes | Empty trash |
| iOS Backups | ⚠️ Review | Check if backups are needed |
| Parallels VMs | ⚠️ Review | Only if Windows not needed |
Confidence
81% confidence
Finding
The skill advertises itself as safe for everyday users but includes cleanup categories that require sudo, which elevates the consequences of mistakes. Even if limited to old logs, normalized root access in end-user guidance increases the blast radius of operator error and weakens the expectation of least privilege.

Static analysis

No suspicious patterns detected.