Back to skill

Security audit

Skill

Security checks for vulnerabilities and agentic risk

Overview

ClawTK has a coherent cost-saving purpose, but it installs broad persistent hooks, runs remote installer code, and caches potentially sensitive local tool output with insufficient containment.

Install only if you are comfortable with a cost tool that modifies OpenClaw config, installs persistent hooks, may run a third-party engine installer, stores a license key locally, and caches local tool outputs. Pro users should review the RTK hook and cache behavior carefully and plan manual cleanup if uninstalling.

Vulnerability Patterns
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
  • System PersistenceInstalls backdoors, hooks, services, or scheduled tasks that survive the run
  • 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
Findings (4)

T03 · Remote Payload Retrieval and Execution

Error
Location
scripts/install-engine.sh:94
Finding

Unverified Remote Shell Installer Is Downloaded and Executed

Content
View full analysis
/dev/null | tr -d '[:space:]') rtk_version="${rtk_version:-$RTK_MIN_VERSION}" local installer_url="https://raw.githubusercontent.com/rtk-ai/rtk/refs/tags/v${rtk_version}/install.sh" warn "Engine is not available via Homebrew on this system." warn "The installer will download and run a shell script from:" warn " $installer_url" warn "" warn "If you prefer, you can install manually instead:" warn " cargo install rtk@$rtk_version" warn " # or download from: https://github.com/rtk-ai/rtk/releases/tag/v${rtk_version}" warn "" log "Installing Engine v$rtk_version via official installer..." local tmp_installer tmp_installer=$(mktemp "${TMPDIR:-/tmp}/rtk-install-XXXXXX.sh") if command -v curl &>/dev/null; then curl -fsSL "$installer_url" -o "$tmp_installer" elif command -v wget &>/dev/null; then wget -qO "$tmp_installer" "$installer_url" else err "Neither curl nor wget found. Cannot download ClawTK Engine." rm -f "$tmp_installer" exit 1 fi # Show what will be executed so the user/reviewer can inspect log "Installer downloaded to $tmp_installer ($(wc -c < "$tmp_installer" | tr -d ' ') bytes)" sh "$tmp_installer" rm -f "$tmp_installer" ``` The troubleshooting guide additionally recommends direct execution from a mutable branch: ```markdown If not found: - Homebrew users: `brew install rtk` - Others: `curl -fsSL https://raw.githubusercontent.com/rtk-ai/rtk/refs/heads/master/install.sh | sh` Then add `~/.local/bin` to your PATH if needed. ``` ### Technical Analysis The installer downloads a shell pr ...[truncated 2139 chars]
Remediation
View remediation

T06 · System Persistence

Error
Location
scripts/install-engine.sh:154
Finding

Global Bash Command-Rewriting Hook Persists After Claimed Complete Uninstall

Content
View full analysis
/dev/null || { warn "Could not auto-configure Engine hooks." warn "Run manually: rtk init -g" return 1 } log "Engine hooks configured. Bash commands will be compressed automatically." } ``` The uninstall path only unregisters the ClawTK plugin and removes ClawTK-owned files: ```bash # Step 2: Unregister hooks if command -v openclaw &>/dev/null; then openclaw plugins uninstall clawtk 2>/dev/null || true log "Hooks unregistered." fi # Step 3: Remove ClawTK files rm -f "$STATE_FILE" log "Removed state file." rm -f "$SPEND_LOG" log "Removed spend log." rm -f "$CACHE_DB" log "Removed cache database." # Remove backup files rm -f "$CONFIG_FILE".clawtk-backup.* 2>/dev/null || true log "Removed config backups." # Step 4: Remove skill directory if [ -d "$SKILL_DIR" ]; then rm -rf "$SKILL_DIR" log "Removed skill directory." fi ``` ### Technical Analysis `rtk init -g --auto-patch` installs a global `PreToolUse` hook with the ability to transparently rewrite Bash commands. This is a tool-interception capability affecting subsequent sessions rather than a narrowly scoped operation within one ClawTK invocation. The uninstall script never invokes an RTK deinitialization or removal operation and does not inspect the global hook configuration to ensure that the command rewriter has been removed. Nevertheless, it reports that ClawTK has been “completely removed.” ...[truncated 1493 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
hooks/clawtk-cache/handler.ts:35
Finding

Tool Results and File Contents Are Persisted in an Unprotected Cross-Session Cache

Content
View full analysis
>?/, /&&/, ]; ``` Tool results are written to a temporary file and then stored in SQLite: ```ts function setCache(hash: string, toolName: string, result: string): void { // Write result to a temp file to avoid SQL injection from result content const tmpFile = join(OPENCLAW_DIR, `.clawtk-cache-tmp-${hash}`); try { writeFileSync(tmpFile, result, "utf-8"); sqlite3Exec( `INSERT OR REPLACE INTO cache (hash, tool_name, result, hit_count, created_at, last_hit) VALUES ('${hash}', '${toolName}', readfile('${tmpFile}'), 1, datetime('now'), datetime('now'))` ); } catch { // Non-fatal } finally { try { const { unlinkSync } = require("fs"); unlinkSync(tmpFile); } catch { // cleanup failure is fine } } // Prune if over max sqlite3Exec( `DELETE FROM cache WHERE hash IN (SELECT hash FROM cache ORDER BY last_hit ASC LIMIT max(0, (SELECT count(*) FROM cache) - ${MAX_CACHE_ENTRIES}))` ); } ``` All eligible results are cached without sensitive-path or content checks: ```ts if (event.even ...[truncated 2461 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/activate-pro.sh:88
Finding

License Credential Is Persisted in Plaintext Without Explicit Permission Hardening

Content
View full analysis
"$STATE_FILE" } ``` Setup preserves the plaintext credential in subsequent state rewrites: ```bash local tier="free" local license_key="null" local rtk_installed="false" local rtk_version="null" if [ -f "$STATE_FILE" ]; then tier=$(jq -r '.tier // "free"' "$STATE_FILE") license_key=$(jq -r '.licenseKey // "null"' "$STATE_FILE") rtk_installed=$(jq -r '.rtkInstalled // "false"' "$STATE_FILE") rtk_version=$(jq -r '.rtkVersion // "null"' "$STATE_FILE") fi cat > "$STATE_FILE" <
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
Findings (35)

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

The skill's stated purpose focuses on local cost reduction, but it also uploads spend telemetry, maintains sync state, uses a license-gated cloud service, and can compact or rewrite local logs after sync. Even if the data is limited, this materially changes the privacy and integrity profile of the tool and can surprise users who did not expect remote data flows or local log mutation from an optimizer skill.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding

The skill's stated purpose focuses on local cost reduction, but it also uploads spend telemetry, maintains sync state, uses a license-gated cloud service, and can compact or rewrite local logs after sync. Even if the data is limited, this materially changes the privacy and integrity profile of the tool and can surprise users who did not expect remote data flows or local log mutation from an optimizer skill.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The skill's stated purpose focuses on local cost reduction, but it also uploads spend telemetry, maintains sync state, uses a license-gated cloud service, and can compact or rewrite local logs after sync. Even if the data is limited, this materially changes the privacy and integrity profile of the tool and can surprise users who did not expect remote data flows or local log mutation from an optimizer skill.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

The skill's stated purpose focuses on local cost reduction, but it also uploads spend telemetry, maintains sync state, uses a license-gated cloud service, and can compact or rewrite local logs after sync. Even if the data is limited, this materially changes the privacy and integrity profile of the tool and can surprise users who did not expect remote data flows or local log mutation from an optimizer skill.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
94% confidence
Finding

The skill's stated purpose focuses on local cost reduction, but it also uploads spend telemetry, maintains sync state, uses a license-gated cloud service, and can compact or rewrite local logs after sync. Even if the data is limited, this materially changes the privacy and integrity profile of the tool and can surprise users who did not expect remote data flows or local log mutation from an optimizer skill.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

The skill's stated purpose focuses on local cost reduction, but it also uploads spend telemetry, maintains sync state, uses a license-gated cloud service, and can compact or rewrite local logs after sync. Even if the data is limited, this materially changes the privacy and integrity profile of the tool and can surprise users who did not expect remote data flows or local log mutation from an optimizer skill.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

The skill's stated purpose focuses on local cost reduction, but it also uploads spend telemetry, maintains sync state, uses a license-gated cloud service, and can compact or rewrite local logs after sync. Even if the data is limited, this materially changes the privacy and integrity profile of the tool and can surprise users who did not expect remote data flows or local log mutation from an optimizer skill.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The skill's stated purpose focuses on local cost reduction, but it also uploads spend telemetry, maintains sync state, uses a license-gated cloud service, and can compact or rewrite local logs after sync. Even if the data is limited, this materially changes the privacy and integrity profile of the tool and can surprise users who did not expect remote data flows or local log mutation from an optimizer skill.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

High
Category
Not specified by scanner
Confidence
97% confidence
Finding

The installer sets up a global shell/tool hook that transparently rewrites bash commands before execution. Any mechanism that intercepts and transforms commands across sessions materially expands trust in the installed tool and can affect integrity of later operations, making this dangerous if the hook is buggy, compromised, or behaves unexpectedly.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The skill metadata emphasizes local cost-reduction/setup behavior, but this script is explicitly designed to transmit locally collected spend telemetry to a remote vendor API. That mismatch is security-relevant because users may install or trust the skill under the assumption that it only performs local optimization, while it actually exfiltrates operational usage data and a license identifier off-host.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
85% confidence
Finding

The skill exposes multiple shell-executing commands but does not declare any explicit tool scope such as allowed-tools or permissions. That makes the trust boundary unclear and increases the chance the agent can invoke shell operations more broadly than users or reviewers expect, especially because the skill also performs config changes, installs software, and runs maintenance scripts.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The manifest describes a cost-optimization/setup skill with caching/compression behavior, but this hook implements that by invoking local executables via execFileSync. Spawning subprocesses is a more powerful capability than is obviously justified by the stated purpose, especially since the manifest does not mention executing system binaries as part of its scope.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
84% confidence
Finding

The hook persists tool results and temporary cache material under ~/.openclaw without any evidence in this file of consent, disclosure, or permission hardening. Because cached results may contain sensitive file contents or command output, local disclosure can occur on shared systems or where home-directory permissions are overly broad, making the skill context more dangerous since it caches outputs from read_file, grep, and bash.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The markdown recommends using a Google-hosted model for heartbeat checks and emphasizes cost savings and safety, but it does not disclose that heartbeat requests may still transmit session metadata, prompts, or event context to a third-party provider. This creates a data-sharing/privacy risk because users may enable the setting without realizing cross-provider transmission is occurring.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The document promotes image downscaling before sending images to the model but omits a clear privacy disclosure that image contents are transmitted to an external provider for processing. Users may wrongly interpret this as a local-only optimization and upload sensitive screenshots, documents, or PII without informed consent.

Content

No source excerpt is available for this finding.

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
70% confidence
Finding

Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Content

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

md
Install jq:
- macOS: `brew install jq`
- Ubuntu/Debian: `sudo apt install jq`
- Other Linux: check your package manager or download from https://jqlang.github.io/jq/

### "OpenClaw config not found"

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

This markdown file describes /clawtk uninstall and explicitly states it will remove ClawTK files and the skill directory, but it provides no warning that the action is destructive or may delete user data. For markdown files, user-facing documentation should warn about behaviors that affect user data or system integrity.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
60% 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/activate-pro.sh (reported line 10)May include surrounding context.

sh
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
OPENCLAW_DIR="${OPENCLAW_DIR:-$HOME/.openclaw}"
STATE_FILE="$OPENCLAW_DIR/clawtk-state.json"
API_BASE="https://api.clawtk.co/v1"

# Colors
RED='\033[0;31m'

External Transmission

Medium
Category
Data Exfiltration
Confidence
60% 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/sync.sh (reported line 13)May include surrounding context.

sh
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
OPENCLAW_DIR="${OPENCLAW_DIR:-$HOME/.openclaw}"
STATE_FILE="$OPENCLAW_DIR/clawtk-state.json"
API_BASE="https://api.clawtk.co/v1"

# Colors
RED='\033[0;31m'

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The manifest describes a one-command setup tool for config optimization, spend caps, retry-loop protection, and compression, but this script implements a separate product activation workflow: it validates commercial license keys with a remote activation server, stores the license key locally, and installs gated Pro features. That monetization and entitlement-management behavior is not disclosed by the manifest description and goes beyond an obvious implementation detail of cost optimization.

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/activate-pro.sh (reported line 44)May include surrounding context.

sh
log "Validating license key..."

    if command -v curl &>/dev/null; then
        response=$(curl -sS --max-time 10 \
            -H "Content-Type: application/json" \
            -d "{\"key\": \"$key\"}" \

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

For a skill presented as automatically reducing OpenClaw API costs via local setup changes, contacting a vendor activation endpoint and transmitting a license key is not an obvious or necessary capability. The manifest does not mention account, billing, licensing, or external activation, so this networked entitlement check is context-inappropriate relative to the stated purpose.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The script transmits the provided license key to a remote service without an explicit up-front warning or consent prompt. In a CLI automation context, this can surprise users and may disclose a credential-like value to the vendor or to network monitoring infrastructure in environments with strict data-handling requirements.

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/activate-pro.sh (reported line 54)May include surrounding context.

sh
err "If the problem persists, contact support@clawtk.co"
            exit 1
        }
    elif command -v wget &>/dev/null; then
        response=$(wget -qO- --timeout=10 \
            --header="Content-Type: application/json" \
            --post-data="{\"key\": \"$key\"}" \

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The script stores the full license key in a local state file, creating a persistent secret at rest without warning or access-control hardening. If the file is readable by other local users, included in backups, or exfiltrated by unrelated malware, the license can be reused or abused.

Content

No source excerpt is available for this finding.