Back to skill

Security audit

iOS Dev Cleanup

Security checks for vulnerabilities and agentic risk

Overview

This is a local iOS/Xcode cleanup skill, but it can permanently delete developer artifacts and includes automatic simulator cleanup without first asking the user.

Install only if you want an agent to inspect and clean local Xcode/iOS development storage. Before running it, require explicit approval for every deletion, including unavailable simulators/runtimes, and review archive deletion carefully because archives may contain important release artifacts.

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
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
  • 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
Findings (40)

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
90% 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).

Content

Scanner excerpt · SKILL.md (reported line 65)May include surrounding context.

xcrun simctl delete unavailable

text

**禁止** 直接 `rm -rf ~/Library/Developer/CoreSimulator/Devices/<UUID>/`,必须用 `simctl delete`。

### 3. CocoaPods 缓存 ~5-15GB

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
90% 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).

Content

Scanner excerpt · SKILL.md (reported line 240)May include surrounding context.

xcrun simctl delete unavailable

text

**禁止** 直接 `rm -rf ~/Library/Developer/CoreSimulator/Devices/<UUID>/`,必须用 `simctl delete`。

### 3. CocoaPods 缓存 ~5-15GB

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
85% 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).

Content

Scanner excerpt · SKILL.md (reported line 65)May include surrounding context.

xcrun simctl delete unavailable

text

**禁止** 直接 `rm -rf ~/Library/Developer/CoreSimulator/Devices/<UUID>/`,必须用 `simctl delete`。

### 3. CocoaPods 缓存 ~5-15GB

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
85% 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).

Content

Scanner excerpt · SKILL.md (reported line 240)May include surrounding context.

xcrun simctl delete unavailable

text

**禁止** 直接 `rm -rf ~/Library/Developer/CoreSimulator/Devices/<UUID>/`,必须用 `simctl delete`。

### 3. CocoaPods 缓存 ~5-15GB

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
90% 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).

Content

Scanner excerpt · SKILL.md (reported line 65)May include surrounding context.

xcrun simctl delete unavailable

text

**禁止** 直接 `rm -rf ~/Library/Developer/CoreSimulator/Devices/<UUID>/`,必须用 `simctl delete`。

### 3. CocoaPods 缓存 ~5-15GB

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
90% 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).

Content

Scanner excerpt · SKILL.md (reported line 240)May include surrounding context.

xcrun simctl delete unavailable

text

**禁止** 直接 `rm -rf ~/Library/Developer/CoreSimulator/Devices/<UUID>/`,必须用 `simctl delete`。

### 3. CocoaPods 缓存 ~5-15GB

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
91% confidence
Finding

The skill offers a direct rm -rf deletion of the CocoaPods cache. While the target path is user-scoped and commonly disposable, destructive shell deletion in an agent skill is risky because path expansion, quoting errors, or future variable substitution can widen the blast radius, and it enables file deletion without built-in safety checks.

Content

Scanner excerpt · SKILL.md (reported line 83)May include surrounding context.

pod cache clean --all

或直接删除

rm -rf ~/Library/Caches/CocoaPods/

text

### 4. iOS DeviceSupport(真机调试符号)~3-10GB

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
91% confidence
Finding

The skill offers a direct rm -rf deletion of the CocoaPods cache. While the target path is user-scoped and commonly disposable, destructive shell deletion in an agent skill is risky because path expansion, quoting errors, or future variable substitution can widen the blast radius, and it enables file deletion without built-in safety checks.

Content

Scanner excerpt · SKILL.md (reported line 83)May include surrounding context.

pod cache clean --all

或直接删除

rm -rf ~/Library/Caches/CocoaPods/

text

### 4. iOS DeviceSupport(真机调试符号)~3-10GB

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
90% confidence
Finding

The skill instructs rm -rf deletion of Xcode DeviceSupport directories. Although these are rebuildable artifacts, the command is still destructive and can remove the wrong path if placeholders are substituted incorrectly or if an agent executes without careful validation.

Content

Scanner excerpt · SKILL.md (reported line 102)May include surrounding context.

删除命令:

bash
rm -rf ~/Library/Developer/Xcode/iOS\ DeviceSupport/<版本目录>

5. DerivedData(编译缓存)~2-20GB

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
89% confidence
Finding

The skill instructs rm -rf deletion of Xcode DeviceSupport directories. Although these are rebuildable artifacts, the command is still destructive and can remove the wrong path if placeholders are substituted incorrectly or if an agent executes without careful validation.

Content

Scanner excerpt · SKILL.md (reported line 102)May include surrounding context.

删除命令:

bash
rm -rf ~/Library/Developer/Xcode/iOS\ DeviceSupport/<版本目录>

5. DerivedData(编译缓存)~2-20GB

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
90% confidence
Finding

The skill instructs rm -rf deletion of Xcode DeviceSupport directories. Although these are rebuildable artifacts, the command is still destructive and can remove the wrong path if placeholders are substituted incorrectly or if an agent executes without careful validation.

Content

Scanner excerpt · SKILL.md (reported line 102)May include surrounding context.

删除命令:

bash
rm -rf ~/Library/Developer/Xcode/iOS\ DeviceSupport/<版本目录>

5. DerivedData(编译缓存)~2-20GB

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
90% confidence
Finding

The skill provides rm -rf for deleting a single DerivedData project directory. DerivedData is generally safe to clear, but destructive recursive deletion by name can be error-prone if project identifiers are misresolved or shell-expanded incorrectly by an agent.

Content

Scanner excerpt · SKILL.md (reported line 122)May include surrounding context.

删除命令:

bash
# 删除单个项目缓存
rm -rf ~/Library/Developer/Xcode/DerivedData/<项目名>/

# 清空全部
rm -rf ~/Library/Developer/Xcode/DerivedData/*

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
90% confidence
Finding

The skill provides rm -rf for deleting a single DerivedData project directory. DerivedData is generally safe to clear, but destructive recursive deletion by name can be error-prone if project identifiers are misresolved or shell-expanded incorrectly by an agent.

Content

Scanner excerpt · SKILL.md (reported line 122)May include surrounding context.

删除命令:

bash
# 删除单个项目缓存
rm -rf ~/Library/Developer/Xcode/DerivedData/<项目名>/

# 清空全部
rm -rf ~/Library/Developer/Xcode/DerivedData/*

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
90% confidence
Finding

The skill provides rm -rf for deleting a single DerivedData project directory. DerivedData is generally safe to clear, but destructive recursive deletion by name can be error-prone if project identifiers are misresolved or shell-expanded incorrectly by an agent.

Content

Scanner excerpt · SKILL.md (reported line 122)May include surrounding context.

删除命令:

bash
# 删除单个项目缓存
rm -rf ~/Library/Developer/Xcode/DerivedData/<项目名>/

# 清空全部
rm -rf ~/Library/Developer/Xcode/DerivedData/*

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
94% confidence
Finding

The command rm -rf ~/Library/Developer/Xcode/DerivedData/* performs broad wildcard deletion of all DerivedData contents. Even though the directory is usually disposable, wildcard recursive deletion is more dangerous than itemized cleanup because mistakes in expansion or path handling can cause much wider unintended deletion and no granular rollback.

Content

Scanner excerpt · SKILL.md (reported line 125)May include surrounding context.

rm -rf ~/Library/Developer/Xcode/DerivedData/<项目名>/

清空全部

rm -rf ~/Library/Developer/Xcode/DerivedData/*

text

### 6. Archives(归档包)~0-10GB

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
94% confidence
Finding

The command rm -rf ~/Library/Developer/Xcode/DerivedData/* performs broad wildcard deletion of all DerivedData contents. Even though the directory is usually disposable, wildcard recursive deletion is more dangerous than itemized cleanup because mistakes in expansion or path handling can cause much wider unintended deletion and no granular rollback.

Content

Scanner excerpt · SKILL.md (reported line 125)May include surrounding context.

rm -rf ~/Library/Developer/Xcode/DerivedData/<项目名>/

清空全部

rm -rf ~/Library/Developer/Xcode/DerivedData/*

text

### 6. Archives(归档包)~0-10GB

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
90% confidence
Finding

The skill includes rm -rf for deleting Xcode archive bundles. Archives may contain important release artifacts, symbols, or notarization-related outputs, so permanent recursive deletion can cause operational loss if an agent or user misidentifies an archive.

Content

Scanner excerpt · SKILL.md (reported line 139)May include surrounding context.

删除命令:

bash
rm -rf ~/Library/Developer/Xcode/Archives/<日期>/<归档名>.xcarchive

7. SPM 缓存(Swift Package Manager)~0-2GB

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
88% confidence
Finding

The skill includes rm -rf for deleting Xcode archive bundles. Archives may contain important release artifacts, symbols, or notarization-related outputs, so permanent recursive deletion can cause operational loss if an agent or user misidentifies an archive.

Content

Scanner excerpt · SKILL.md (reported line 139)May include surrounding context.

删除命令:

bash
rm -rf ~/Library/Developer/Xcode/Archives/<日期>/<归档名>.xcarchive

7. SPM 缓存(Swift Package Manager)~0-2GB

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
90% confidence
Finding

The skill includes rm -rf for deleting Xcode archive bundles. Archives may contain important release artifacts, symbols, or notarization-related outputs, so permanent recursive deletion can cause operational loss if an agent or user misidentifies an archive.

Content

Scanner excerpt · SKILL.md (reported line 139)May include surrounding context.

删除命令:

bash
rm -rf ~/Library/Developer/Xcode/Archives/<日期>/<归档名>.xcarchive

7. SPM 缓存(Swift Package Manager)~0-2GB

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
90% confidence
Finding

The skill recommends rm -rf on the SwiftPM cache directory. Although cache cleanup is routine, using raw recursive deletion in an agent-executed context still creates avoidable destructive risk from path mishandling and bypasses safer package-manager-native cleanup options.

Content

Scanner excerpt · SKILL.md (reported line 151)May include surrounding context.

删除命令:

bash
rm -rf ~/Library/Caches/org.swift.swiftpm/

8. Caches & Logs(其他缓存和日志)

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
90% confidence
Finding

The skill recommends rm -rf on the SwiftPM cache directory. Although cache cleanup is routine, using raw recursive deletion in an agent-executed context still creates avoidable destructive risk from path mishandling and bypasses safer package-manager-native cleanup options.

Content

Scanner excerpt · SKILL.md (reported line 151)May include surrounding context.

删除命令:

bash
rm -rf ~/Library/Caches/org.swift.swiftpm/

8. Caches & Logs(其他缓存和日志)

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
90% confidence
Finding

This line instructs rm -rf over the CoreSimulator cache contents with a wildcard. While intended for cleanup, it is still a destructive recursive command that can unexpectedly alter simulator behavior and poses path-expansion risk in an automated agent setting.

Content

Scanner excerpt · SKILL.md (reported line 176)May include surrounding context.

删除命令:

bash
rm -rf ~/Library/Developer/CoreSimulator/Caches/*
rm -rf ~/Library/Developer/Xcode/UserData/IDB/*
rm -rf ~/Library/Developer/Xcode/DocumentationCache/*
rm -rf ~/Library/Caches/com.apple.dt.Xcode/*

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
90% confidence
Finding

This line instructs rm -rf over the CoreSimulator cache contents with a wildcard. While intended for cleanup, it is still a destructive recursive command that can unexpectedly alter simulator behavior and poses path-expansion risk in an automated agent setting.

Content

Scanner excerpt · SKILL.md (reported line 176)May include surrounding context.

删除命令:

bash
rm -rf ~/Library/Developer/CoreSimulator/Caches/*
rm -rf ~/Library/Developer/Xcode/UserData/IDB/*
rm -rf ~/Library/Developer/Xcode/DocumentationCache/*
rm -rf ~/Library/Caches/com.apple.dt.Xcode/*

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
90% confidence
Finding

This command recursively deletes Xcode IDB user data contents. These files are less critical than source code, but the use of direct wildcard rm -rf still creates unnecessary destructive risk and may remove debugging or indexing state the user expected to keep.

Content

Scanner excerpt · SKILL.md (reported line 177)May include surrounding context.

删除命令:

bash
rm -rf ~/Library/Developer/CoreSimulator/Caches/*
rm -rf ~/Library/Developer/Xcode/UserData/IDB/*
rm -rf ~/Library/Developer/Xcode/DocumentationCache/*
rm -rf ~/Library/Caches/com.apple.dt.Xcode/*

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
90% confidence
Finding

This command recursively deletes Xcode IDB user data contents. These files are less critical than source code, but the use of direct wildcard rm -rf still creates unnecessary destructive risk and may remove debugging or indexing state the user expected to keep.

Content

Scanner excerpt · SKILL.md (reported line 177)May include surrounding context.

删除命令:

bash
rm -rf ~/Library/Developer/CoreSimulator/Caches/*
rm -rf ~/Library/Developer/Xcode/UserData/IDB/*
rm -rf ~/Library/Developer/Xcode/DocumentationCache/*
rm -rf ~/Library/Caches/com.apple.dt.Xcode/*