Back to skill

Security audit

Claude Code Launcher

Security checks for vulnerabilities and agentic risk

Overview

The skill does what it says, but it combines remote session access, broad Mac automation permissions, full-screen screenshot storage, and unsafe terminal command construction in ways users should review carefully.

Install only if you are comfortable granting Mac screen and input automation permissions, exposing a Claude Code Remote Control session URL or QR code, and retaining screenshots/logs locally. Use trusted project paths only, avoid running it on directories with unusual characters, clear stored screenshots when done, and verify the Peekaboo and Claude CLI sources before granting permissions.

Vulnerability Patterns
  • 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
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
Findings (3)

T09 · Insecure Skill Coding Practices

Error
Location
scripts/launch_claude_code.sh:90
Finding
Shell Command Injection Through Crafted Project Paths<![CDATA[ ## Vulnerability Details **File Location**: `scripts/launch_claude_code.sh`, lines 90-106 and 130-137 **Vulnerability Type**: OS command injection through unsafe shell-input construction **Risk Level**: High ### Vulnerable Code ```bash validate_project() { local project="$1" # Expand ~ to home directory project="${project/#\~/$HOME}" if [[ ! -d "$project" ]]; then error "Project path does not exist: $project" error "Did you mean one of these?" ls -d ~/dev/* 2>/dev/null | head -5 || true exit 1 fi if [[ ! -w "$project" ]]; then error "No write permission for: $project" exit 1 fi success "Project validated: $(basename "$project")" echo "$project" } ``` ```bash navigate_to_project() { local project="$1" info "Navigating to project: $project" if peekaboo type "cd \"$project\"" --app Terminal --return 2>/dev/null; then success "Navigated to project" sleep 1 else error "Failed to navigate to project" return 1 fi } ``` The returned value is captured and subsequently passed to the vulnerable function: ```bash PROJECT_PATH=$(validate_project "$PROJECT_PATH") open_terminal navigate_to_project "$PROJECT_PATH" ``` ### Technical Analysis The launcher validates only that the supplied project path identifies an existing writable directory. It does not encode the path safely before inserting it into a command that is typed into an interactive shell. The construction below is not sufficient shell escaping: ```bash peekaboo type "cd \"$project\"" --app Terminal --return ``` A directory name can legally contain characters such as double quotes, semicolons, backticks, dollar signs, command substitutions, and newline characters. An embedded double quote can terminate the intended quoted path, after which shell syntax in the directory name can introduce additional commands. Peekaboo's `--return` opti ...[truncated 1734 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Avoid constructing commands for an interactive shell. Prefer a process-launching interface that accepts an executable and arguments separately. 2. If UI automation is unavoidable, convert the path to an absolute canonical path and encode it as one shell argument before typing it: ```bash canonical_project="$(cd -- "$project" && pwd -P)" printf -v escaped_project '%q' "$canonical_project" peekaboo type "cd -- $escaped_project" --app Terminal --return ``` 3. Ensure `validate_project` emits only the validated path on standard output. Send informational output to standard error: ```bash success "Project validated: $(basename -- "$project")" >&2 printf '%s\n' "$project" ``` 4. Use `realpath` or an equivalent canonicalization mechanism and reject paths containing newline or carriage-return characters as defense in depth. 5. Add automated tests using directory names containing spaces, quotes, semicolons, command substitutions, backticks, leading hyphens, and newlines. 6. Do not treat existence and writability checks as input sanitization; retain shell-safe argument handling at the command-execution boundary. ]]>

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/launch_claude_code.sh:177
Finding
Full-Screen Capture and Storage May Expose Sensitive Desktop and Session Data<![CDATA[ ## Vulnerability Details **File Location**: `scripts/launch_claude_code.sh`, lines 13-14, 56, and 177-188 **Vulnerability Type**: Excessive screen capture and insecure handling of sensitive local artifacts **Risk Level**: Medium ### Vulnerable Code ```bash SCREENSHOT_DIR="${HOME}/.openclaw/workspace/logs/claude-code-launcher" LOG_FILE="${SCREENSHOT_DIR}/launch-$(date +%s).log" ``` ```bash setup() { mkdir -p "$SCREENSHOT_DIR" ``` ```bash capture_screenshot() { local output_file="${SCREENSHOT_DIR}/result-$(date +%s).png" info "Capturing screenshot..." if peekaboo image --mode screen --path "$output_file" 2>/dev/null; then success "Screenshot saved: $output_file" echo "$output_file" else error "Failed to capture screenshot" return 1 fi } ``` ### Technical Analysis The launcher requests Screen Recording access and invokes Peekaboo with `--mode screen`, which captures the complete visible display rather than only the Terminal or Claude Code window needed for the task. The resulting image may include unrelated application windows, notifications, credentials, private communications, source code, Remote Control URLs, or QR codes. Because Remote Control access information is expected to be visible when the screenshot is taken, the captured image may itself become an access-bearing artifact. The screenshot directory and files are created without an explicit restrictive `umask` or permission mode. Their effective permissions therefore depend on the invoking environment's current umask and Peekaboo's file-creation behavior. The script also defines no retention policy or automatic deletion process. ### Attack Path 1. The user grants Screen Recording permission to the automation environment or Peekaboo. 2. The launcher activates Claude Code Remote Control. 3. Other applications, notifications, or session-access information remain visible on the display. 4. `peekaboo image --mode screen` capt ...[truncated 824 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Capture only the relevant Terminal or Claude Code window instead of the entire screen. 2. Make screenshot capture opt-in rather than unconditional, and clearly warn that Remote Control access information may be captured. 3. Establish restrictive permissions before creating artifacts: ```bash umask 077 install -d -m 700 "$SCREENSHOT_DIR" ``` 4. Verify that screenshot and log files are created with mode `0600`. 5. Redact or hide session URLs, QR codes, notifications, and unrelated windows before capture. 6. Introduce a short retention period and securely remove screenshots when they are no longer required. 7. Avoid recording absolute sensitive paths or session identifiers in logs. 8. Document the artifact location, captured scope, retention behavior, and deletion procedure so users can make an informed decision. ]]>

T08 · Insecure Dependencies

Warning
Location
scripts/launch_claude_code.sh:63
Finding
Unpinned Global Installation of Privileged Third-Party Automation Tools<![CDATA[ ## Vulnerability Details **File Location**: `scripts/launch_claude_code.sh`, lines 63-71; `references/troubleshooting.md`, lines 8 and 22-27 **Vulnerability Type**: Unsafe dependency acquisition and mutable global tool installation **Risk Level**: Medium ### Vulnerable Code From `scripts/launch_claude_code.sh`: ```bash if ! command -v peekaboo &> /dev/null; then error "peekaboo not found. Install with: brew install steipete/tap/peekaboo" exit 1 fi if ! command -v claude &> /dev/null; then error "claude CLI not found. Install with: npm install -g @anthropic-ai/claude-cli" exit 1 fi ``` From `references/troubleshooting.md`: ```bash brew install steipete/tap/peekaboo ``` ```bash npm install -g @anthropic-ai/claude-cli ``` ```bash brew tap anthropic-ai/claude brew install claude ``` ### Technical Analysis The project directs users to install globally executable dependencies from npm and additional Homebrew taps without pinning reviewed versions, verifying checksums, identifying immutable revisions, or documenting package-signature validation. This is particularly sensitive for Peekaboo because the Skill instructs users to grant Screen Recording and Accessibility permissions. A compromised or unexpectedly replaced automation dependency could therefore observe sensitive screen content and automate keyboard input across applications. The audit found no evidence that the listed packages are currently malicious. The vulnerability is the unsafe, mutable dependency-acquisition process and the high privileges subsequently granted to those tools. ### Attack Path 1. A user follows the installation or troubleshooting instructions. 2. Homebrew or npm resolves the current package version from an external registry or tap. 3. The package is installed as a globally executable tool without project-level version isolation or explicit integrity verification. 4. The user grants the automation tool Screen Recording and Accessibility permissions as ...[truncated 908 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Confirm and document the official package names and authoritative distribution channels. 2. Pin dependencies to reviewed versions or immutable release revisions rather than installing the latest mutable release. 3. Where supported, verify release signatures, checksums, or package provenance before installation. 4. Avoid global npm installation when a project-local, isolated, or otherwise constrained installation is available. 5. Record the tested dependency versions in `SKILL.md` and provide a controlled upgrade and review process. 6. Explain why Screen Recording and Accessibility permissions are required and grant them only to a verified executable. 7. Recommend revoking those permissions when the launcher is no longer in use. 8. Consider replacing UI automation with a narrower programmatic interface that does not require broad screen-observation and keyboard-control permissions. ]]>
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
Findings (11)

Missing User Warnings

Medium
Confidence
92% confidence
Finding
The skill explicitly enables Remote Control and surfaces a session URL and QR code that can grant access from other devices, but it does not include a clear warning that these artifacts are sensitive access tokens. In this context, the omission is dangerous because the skill automates sharing-enabling steps and screenshot capture, increasing the chance that the URL or QR code is exposed to logs, screenshots, shoulder-surfing, or unintended recipients.

File System Enumeration

Medium
Category
Data Exfiltration
Content
1. **Verify the path exists:**
   ```bash
   ls -la ~/dev/proposal-generator
   ```

2. **Check for typos:**
Confidence
60% confidence
Finding
Code scans file system directories looking for sensitive files. This could be reconnaissance for credential theft.

Missing User Warnings

Medium
Confidence
94% confidence
Finding
The troubleshooting guidance includes process-kill commands that can terminate Terminal or Claude Code sessions without any explicit warning about data loss, interrupted work, or collateral impact on unrelated sessions. In a launcher skill that manages interactive coding sessions, this increases the chance a user will copy-paste destructive commands and unintentionally disrupt active work.

Missing User Warnings

Medium
Confidence
97% confidence
Finding
The document explicitly recommends killing all Claude Code instances, but does not warn that this will terminate every active session, including unrelated work. Because this skill is designed to automate multi-session terminal workflows, broad process termination is more dangerous here than in generic documentation.

Missing User Warnings

Medium
Confidence
96% confidence
Finding
The script unconditionally captures a full-screen image after enabling Remote Control, which can include unrelated windows, notifications, credentials, personal messages, or other sensitive content visible on the user's display. In this skill context, the risk is heightened because the workflow explicitly enables remote access and stores the screenshot under a persistent log directory, creating an additional local artifact containing potentially sensitive data without an explicit opt-in warning at capture time.

Excessive Permissions

Low
Category
Privilege Escalation
Content
✅ **Installed:** `peekaboo` (for UI automation)  
✅ **Installed:** `claude` CLI (Claude Code)  
✅ **System:** macOS with Terminal.app  
✅ **Permissions:** Screen Recording + Accessibility enabled  

To enable permissions:
```
Confidence
80% confidence
Finding
Skill requests more permissions than appear necessary for its stated functionality. Review if elevated access is justified.

Excessive Permissions

Low
Category
Privilege Escalation
Content
**Solution:**

1. **Check Screen Recording permission:**
   ```bash
   peekaboo permissions
   ```
Confidence
80% confidence
Finding
Skill requests more permissions than appear necessary for its stated functionality. Review if elevated access is justified.

Excessive Permissions

Low
Category
Privilege Escalation
Content
**Solution:**

1. **Check permissions:**
   ```bash
   ls -ld ~/dev/proposal-generator
   ```
Confidence
80% confidence
Finding
Skill requests more permissions than appear necessary for its stated functionality. Review if elevated access is justified.

Excessive Permissions

Low
Category
Privilege Escalation
Content
**Solution:**

1. **Check permissions:**
   ```bash
   ls -ld ~/dev/proposal-generator
   ```
Confidence
80% confidence
Finding
Skill requests more permissions than appear necessary for its stated functionality. Review if elevated access is justified.

Excessive Permissions

Low
Category
Privilege Escalation
Content
**Solution:**

1. **Check permissions:**
   ```bash
   ls -ld ~/dev/proposal-generator
   ```
Confidence
80% confidence
Finding
Skill requests more permissions than appear necessary for its stated functionality. Review if elevated access is justified.

Excessive Permissions

Low
Category
Privilege Escalation
Content
**Solution:**

1. **Check permissions:**
   ```bash
   ls -ld ~/dev/proposal-generator
   ```
Confidence
80% confidence
Finding
Skill requests more permissions than appear necessary for its stated functionality. Review if elevated access is justified.

Static analysis

No suspicious patterns detected.