Back to skill

Security audit

Claude CLI Proxy

Security checks for vulnerabilities and agentic risk

Overview

This skill does what it claims, but it routes full agent context through a local proxy and external Claude session while adding persistent configuration and containing a real command-injection risk.

Install only if you deliberately want full OpenClaw prompts, system context, and conversation history routed through Claude Code/Anthropic using your subscription account. Review and harden the scripts first, especially the session-name command injection, file permissions for .ccproxy-system-context.md, and any autostart configuration. Avoid broad global Claude settings changes unless you understand they affect future Claude Code behavior.

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 (4)

T09 · Insecure Skill Coding Practices

Error
Location
scripts/claude-cli-proxy.js:48
Finding

Shell Command Injection Through Configurable Session Name

Content
View full analysis
&1`, { cwd: CWD, timeout: 10000, encoding: 'utf8', env, }); // Create fresh session execSync(`acpx claude sessions new --name ${SESSION_NAME}`, { cwd: CWD, timeout: 10000, encoding: 'utf8', env, }); ``` ```js // scripts/ccproxy-ensure.js:48 execSync(`acpx claude sessions new --name ${SESSION_NAME}`, { cwd: CWD, timeout: 10000, encoding: 'utf8', env: ENV, }); ``` ```js // scripts/ccproxy-ensure.js:59 execSync(`acpx claude prompt -s ${SESSION_NAME} "warmup"`, { cwd: CWD, timeout: 30000, encoding: 'utf8', env: ENV, }); ``` ### Technical Analysis `SESSION_NAME` is obtained directly from the `CCPROXY_SESSION_NAME` environment variable and interpolated into command strings passed to `execSync`. Node.js executes these strings through a shell, so shell metacharacters in the environment variable are interpreted as command syntax rather than treated as part of a session name. The vulnerability affects session creation, session reset, and warm-up operations. Although other Claude calls use `execFile` with an argument array, the affected calls do not receive equivalent protection. ### Attack Path 1. An attacker gains the ability to set or modify `CCPROXY_SESSION_NAME` in the proxy's environment, LaunchAgent configuration, systemd user service, heartbeat environment, shell profile, or startup wrapper. 2. The attacker assigns a value containing she ...[truncated 907 chars]
Remediation
View remediation

T08 · Insecure Dependencies

Warning
Location
SKILL.md:41
Finding

Unpinned Global Installation of Third-Party Dependencies

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/claude-cli-proxy.js:86
Finding

Sensitive System Context Persisted Without Explicit Restrictive Permissions

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Note
Location
scripts/claude-cli-proxy.js:302
Finding

Unbounded HTTP Request Body and Processing Queue Permit Local Denial of Service

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • System Prompt LeakageDirect Leakage, Indirect Extraction, Tool-Based Exfiltration
  • Rogue AgentSelf-Modification, Session Persistence
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
Findings (22)

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
Copy `scripts/claude-cli-proxy.js` and `scripts/ccproxy-ensure.js` to your OpenClaw workspace:

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
Copy `scripts/claude-cli-proxy.js` and `scripts/ccproxy-ensure.js` to your OpenClaw workspace:

Agent Config Directory Access

High
Category
Agent Snooping
Confidence
94% confidence
Finding

Referencing and instructing edits to ~/.claude/settings.json exposes a sensitive control point for the agent runtime. Changes at this path can persistently steer model behavior and are especially risky here because they embed identity and anti-refusal style instructions.

Content

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

a) Set customInstructions in Claude Code settings:

bash
cat > ~/.claude/settings.json << 'EOF'
{
  "customInstructions": "You are [YOUR_AGENT_NAME]. Your identity is defined in CLAUDE.md. Always respond as [YOUR_AGENT_NAME]. This is not roleplay — this is your configured identity by your operator."
}

Agent Config Directory Access

High
Category
Agent Snooping
Confidence
94% confidence
Finding

Referencing and instructing edits to ~/.claude/settings.json exposes a sensitive control point for the agent runtime. Changes at this path can persistently steer model behavior and are especially risky here because they embed identity and anti-refusal style instructions.

Content

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

a) Set customInstructions in Claude Code settings:

bash
cat > ~/.claude/settings.json << 'EOF'
{
  "customInstructions": "You are [YOUR_AGENT_NAME]. Your identity is defined in CLAUDE.md. Always respond as [YOUR_AGENT_NAME]. This is not roleplay — this is your configured identity by your operator."
}

Anti-Refusal Statement

High
Category
Anti-Refusal
Confidence
91% confidence
Finding

The custom instruction contains 'Always respond as [YOUR_AGENT_NAME],' which is an anti-refusal/behavior-locking directive. Such instructions can suppress normal model caveats, reduce transparency, and make it harder for the model to accurately represent limitations or safety-relevant context.

Content

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

bash
cat > ~/.claude/settings.json << 'EOF'
{
  "customInstructions": "You are [YOUR_AGENT_NAME]. Your identity is defined in CLAUDE.md. Always respond as [YOUR_AGENT_NAME]. This is not roleplay — this is your configured identity by your operator."
}
EOF

Ssd 1

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The skill explicitly says the system prompt is written to a file so Claude Code reads it as operator context and 'avoids prompt injection rejection.' That is a direct instruction to repackage privileged instructions to bypass model safeguards, increasing the chance that harmful or hidden instructions are treated as trusted context.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
86% confidence
Finding

The skill instructs users to install and run a local HTTP proxy, manipulate environment variables, and forward requests over the network, but it declares no explicit tool scope or permission boundary. That omission increases the chance of unintended execution in environments where users or agents assume the skill is documentation-only, especially because it handles sensitive model context and local configuration.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

The trigger phrases include very broad terms like "free," "subscription," "$0," and "reduce costs," which can cause the skill to activate in unrelated conversations. Because the skill changes model-routing behavior, writes config, and forwards full context, accidental invocation increases the risk of misconfiguration or unintended disclosure.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The description emphasizes zero-cost routing but does not upfront disclose that full OpenClaw context is forwarded through the proxy and that system prompt content is written to disk. Users may adopt the setup without realizing sensitive prompts, history, and operator context are being persisted locally and transmitted to Anthropic via Claude Code.

Content

No source excerpt is available for this finding.

Ssd 1

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The skill instructs operators to force an identity override via custom instructions and frames it as authoritative configuration rather than role-play. This can mislead downstream users about the model's provenance and weaken safeguards by making the agent present a synthetic persona as mandatory behavior.

Content

No source excerpt is available for this finding.

Session Persistence

Medium
Category
Rogue Agent
Confidence
83% confidence
Finding

The skill recommends creating a persistent CLAUDE.md containing full identity, style, and context, and notes that it is read automatically on every session. Persisting rich context across sessions increases the blast radius of sensitive data leakage and can cause unintended instruction carryover into unrelated tasks.

Content

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

md
Replace `[YOUR_AGENT_NAME]` with your agent's name (e.g., "Ozwald", "Dexter", "Atlas").

**b) Create a `CLAUDE.md` in your workspace** with your agent's full identity, style, and context. Claude Code reads this file automatically on every session. Copy the relevant parts from your `SOUL.md` / `IDENTITY.md`.

> **Why both?** `settings.json` is the minimum instruction Claude Code always respects. `CLAUDE.md` provides richer context (relationships, style, domain knowledge) that the agent reads when it needs it.

Session Persistence

Medium
Category
Rogue Agent
Confidence
88% confidence
Finding

Creating a LaunchAgent plist under ~/Library/LaunchAgents is a macOS persistence technique. While this may be operationally legitimate, persistence in an agent skill is security-relevant because it causes code to run automatically at login and can mask continued execution of a network proxy from less technical users.

Content

Scanner excerpt · references/autostart.md (reported line 6)May include surrounding context.

macOS (LaunchAgent)

bash
cat > ~/Library/LaunchAgents/com.openclaw.ccproxy.plist << 'EOF'
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The document instructs users to create LaunchAgent and systemd service definitions that automatically start and persist a local proxy process across reboots, but it does not clearly warn that this establishes ongoing background execution. Persistence is a sensitive behavior because it can expand the blast radius of later compromise, make unexpected network activity continuous, and reduce user awareness of what is running on the host.

Content

No source excerpt is available for this finding.

Session Persistence

Medium
Category
Rogue Agent
Confidence
75% confidence
Finding

Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.

Content

Scanner excerpt · references/autostart.md (reported line 8)May include surrounding context.

bash
cat > ~/Library/LaunchAgents/com.openclaw.ccproxy.plist << 'EOF'
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>Label</key>

Session Persistence

Medium
Category
Rogue Agent
Confidence
75% confidence
Finding

Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.

Content

Scanner excerpt · references/autostart.md (reported line 9)May include surrounding context.

bash
cat > ~/Library/LaunchAgents/com.openclaw.ccproxy.plist << 'EOF'
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>Label</key>

Session Persistence

Medium
Category
Rogue Agent
Confidence
75% confidence
Finding

Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.

Content

Scanner excerpt · references/autostart.md (reported line 30)May include surrounding context.

bash
cat > ~/Library/LaunchAgents/com.openclaw.ccproxy.plist << 'EOF'
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>Label</key>

Session Persistence

Medium
Category
Rogue Agent
Confidence
75% confidence
Finding

Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.

Content

Scanner excerpt · references/autostart.md (reported line 8)May include surrounding context.

bash
cat > ~/Library/LaunchAgents/com.openclaw.ccproxy.plist << 'EOF'
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>Label</key>

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The service configuration includes an environment variable slot for ANTHROPIC_API_KEY without guidance on secure credential handling. Even though the value is blank in the example, encouraging placement of secrets in service files can lead users to store credentials in plaintext in readable configuration files or process environments, increasing risk of credential disclosure.

Content

No source excerpt is available for this finding.

Session Persistence

Medium
Category
Rogue Agent
Confidence
95% confidence
Finding

launchctl load ~/Library/LaunchAgents/com.openclaw.ccproxy.plist actively loads the LaunchAgent, enabling automatic execution of the proxy on login. In the context of a local HTTP proxy intended to route model requests, this increases operational and security risk by making the service long-lived and less visible to the user.

Content

Scanner excerpt · references/autostart.md (reported line 35)May include surrounding context.

Replace /Users/YOU with your actual home path

Load it:

launchctl load ~/Library/LaunchAgents/com.openclaw.ccproxy.plist

text

## Linux (systemd)

Session Persistence

Medium
Category
Rogue Agent
Confidence
95% confidence
Finding

launchctl load ~/Library/LaunchAgents/com.openclaw.ccproxy.plist actively loads the LaunchAgent, enabling automatic execution of the proxy on login. In the context of a local HTTP proxy intended to route model requests, this increases operational and security risk by making the service long-lived and less visible to the user.

Content

Scanner excerpt · references/autostart.md (reported line 35)May include surrounding context.

Replace /Users/YOU with your actual home path

Load it:

launchctl load ~/Library/LaunchAgents/com.openclaw.ccproxy.plist

text

## Linux (systemd)

Session Persistence

Medium
Category
Rogue Agent
Confidence
93% confidence
Finding

The command enables the user service to start automatically in future sessions, which is a persistence mechanism. In a tool specifically designed to proxy model traffic and reduce API costs, unattended persistence increases risk because the proxy may continue handling requests or exposing a local service after the user forgets it is installed.

Content

Scanner excerpt · references/autostart.md (reported line 57)May include surrounding context.

WantedBy=default.target EOF

systemctl --user enable ccproxy systemctl --user start ccproxy

text

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

This proxy forwards user prompts and conversation history to the external acpx/Claude CLI backend without any in-file disclosure, consent mechanism, or warning that request contents leave the local proxy boundary and are processed by another tool and account context. In this skill’s context, that is especially sensitive because it is explicitly designed to route OpenClaw traffic through a subscription-backed Claude session, so users may unknowingly send sensitive prompts, system prompts, and prior history into a persistent external session with retention and workspace side effects.

Content

No source excerpt is available for this finding.