Back to skill

Security audit

PansClaw Code

Security checks for vulnerabilities and agentic risk

Overview

This skill is for a coding CLI, but it encourages full-access execution with disabled approvals and installs an unaudited local binary, so it needs review before use.

Install only if you trust the local PansClaw source tree and understand that the documented defaults can let the delegated coding CLI act without prompts. Prefer read-only or workspace-write modes, avoid --dangerously-skip-permissions, do not use cloud providers with private code unless you accept that data exposure, and review any ~/.local/bin/claw replacement before running it.

Vulnerability Patterns
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • 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 (3)

T03 · Remote Payload Retrieval and Execution

Warning
Location
scripts/build.sh:13
Finding

Unverified Remote Installer Is Recommended for Direct Shell Execution

Content
View full analysis
/dev/null; then echo "❌ Rust 工具链未安装" echo " 安装: curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh" exit 1 fi ``` ### Technical Analysis The script does not execute the installer automatically, but it instructs the user to pipe a response from `https://sh.rustup.rs` directly into a shell. The URL is associated with the standard Rust installer, and HTTPS with TLS 1.2 reduces transport interception risk. However, the command does not pin an installer version or verify a checksum or digital signature. Because the downloaded response is interpreted immediately, the code that ultimately runs may differ from what was reviewed in this Skill. If the upstream endpoint, DNS resolution, certificate trust chain, or delivery infrastructure is compromised, the response can execute arbitrary commands with the invoking user's privileges. This behavior is not required to build the declared CLI. The script can instead stop when Cargo is absent and direct the user to separately obtain and verify Rust using official installation documentation. ### Attack Path 1. A user runs `scripts/build.sh` without Cargo installed. 2. The script displays the `curl ... | sh` installation instruction. 3. The user copies and executes that command. 4. The remote endpoint returns an installer that has changed since the Skill was audited or has been compromised. 5. The response is passed directly to `sh` without local inspection or integrity verification. 6. The downloaded script executes with the user's filesystem, process, and network permissions. ### Impact Assessment Successful exploitation would permit arbitrary command execution under the account that runs the installer. This could expose user-accessible credenti ...[truncated 282 chars]
Remediation
View remediation

T05 · Unauthorized Access and Privilege Escalation

Error
Location
assets/claw.local.json:1
Finding

AI Coding Agent Is Configured for Unrestricted Access Without Permission Prompts

Content
View full analysis
Remediation
View remediation

T08 · Insecure Dependencies

Error
Location
scripts/build.sh:5
Finding

Unaudited External Source Tree Is Built and Installed as a Trusted Command

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
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
  • Rogue AgentSelf-Modification, Session Persistence
Findings (27)

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

The declared description presents a user-facing AI coding skill centered on invoking the PansClaw Code CLI for coding/refactoring tasks and handling binary build/setup. The supplied code does something materially different: it is a developer test script for a Rust codebase. Its primary purpose is validation of code quality and tests, not running the CLI for user coding tasks. It also accesses a specific local path under /Users/dashi/.openclaw-pansclaw/claw-code-main, which is not implied by the description. Because the actual behavior is unrelated to the declared triggers and capabilities, this is a clear mismatch.

Content

No source excerpt is available for this finding.

External Model or Provider Selection

High
Category
Excessive Agency
Confidence
90% confidence
Finding

This command delegates a coding task to an external model/tool and combines that delegation with a permission-bypass flag. Even when using a local Ollama backend, the skill is authorizing autonomous code-related actions without approval gates, which is risky in a coding environment where outputs may trigger filesystem or build changes.

Content

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

Run a single task (local Ollama)

bash
~/.local/bin/claw --provider ollama --model mistral-small:24b --dangerously-skip-permissions "Your coding task"

Run with cloud model

External Model or Provider Selection

High
Category
Excessive Agency
Confidence
97% confidence
Finding

This command sends tasks to a cloud model provider and also disables permission prompts. In the context of AI-assisted coding, that creates a compounded risk: sensitive code or instructions may be transmitted externally, and resulting actions may proceed without human review.

Content

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

Run with cloud model

bash
~/.local/bin/claw --provider minimax --model MiniMax-Text-01 --dangerously-skip-permissions "Your task"

Interactive REPL

External Model or Provider Selection

High
Category
Excessive Agency
Confidence
90% confidence
Finding

This example normalizes use of a local external model for code generation while bypassing permissions. Although local execution is less privacy-sensitive than cloud use, it still encourages unreviewed autonomous coding actions that could modify files or produce unsafe instructions.

Content

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

Assistant:

bash
~/.local/bin/claw --provider ollama --model mistral-small:24b --dangerously-skip-permissions "写一个冒泡排序算法"

User: "用 claw 重构 api 模块"

External Model or Provider Selection

High
Category
Excessive Agency
Confidence
97% confidence
Finding

This example delegates refactoring of an API module to a cloud provider while bypassing permissions, which is particularly risky because code restructuring often involves broad file changes. It can expose sensitive source code externally and allow substantial modifications without review.

Content

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

Assistant:

bash
~/.local/bin/claw --provider minimax --model MiniMax-Text-01 --dangerously-skip-permissions "重构 api 模块使用 async/await"

User: "用 claw 解释 Rust 生命周期"

External Model or Provider Selection

High
Category
Excessive Agency
Confidence
90% confidence
Finding

Skill selects an external model or provider that may use a different account or billing plan than the operator expects. Undisclosed model switches can cause unexpected cost or quota consumption.

Content

Scanner excerpt · references/models.md (reported line 33)May include surrounding context.

本地 Ollama

bash
~/.local/bin/claw --provider ollama --model mistral-small:24b --dangerously-skip-permissions "解释这段代码"

云端 Anthropic

External Model or Provider Selection

High
Category
Excessive Agency
Confidence
90% confidence
Finding

Skill selects an external model or provider that may use a different account or billing plan than the operator expects. Undisclosed model switches can cause unexpected cost or quota consumption.

Content

Scanner excerpt · references/models.md (reported line 45)May include surrounding context.

云端 MiniMax

bash
~/.local/bin/claw --provider minimax --model MiniMax-Text-01 --dangerously-skip-permissions "写一个排序算法"

权限模式

External Model or Provider Selection

High
Category
Excessive Agency
Confidence
90% confidence
Finding

Skill selects an external model or provider that may use a different account or billing plan than the operator expects. Undisclosed model switches can cause unexpected cost or quota consumption.

Content

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

| danger-full-access | 完全访问(危险) |

bash
~/.local/bin/claw --permission-mode workspace-write --provider ollama --model mistral-small:24b "修改 README.md"

External Model or Provider Selection

High
Category
Excessive Agency
Confidence
90% confidence
Finding

Skill selects an external model or provider that may use a different account or billing plan than the operator expects. Undisclosed model switches can cause unexpected cost or quota consumption.

Content

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

单次任务模式

bash
~/.local/bin/claw --provider ollama --model mistral-small:24b --dangerously-skip-permissions "你的任务"

配置 API 密钥

Missing User Warnings

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

This is a direct unsafe instruction: the documentation recommends running with a permissions-bypass flag and provides no warning that safety checks are being disabled. Users commonly copy-paste quickstart commands, so presenting a dangerous option without caution normalizes insecure operation and can lead to unauthorized file access, destructive edits, or other unsafe agent behavior.

Content

No source excerpt is available for this finding.

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
95% 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 · scripts/build.sh (reported line 31)May include surrounding context.

sh
# 链接或复制二进制
if [ -L "$BIN_DIR/claw" ]; then
    rm "$BIN_DIR/claw"
fi

ln -sf "$RUST_DIR/target/release/claw" "$BIN_DIR/claw"

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
95% 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 · scripts/install.sh (reported line 23)May include surrounding context.

sh
# 步骤 2: 创建符号链接
echo "🔗 步骤 2/2: 更新符号链接..."
mkdir -p "$HOME/.local/bin"
rm -f "$HOME/.local/bin/claw"
ln -sf "$RUST_DIR/target/release/claw" "$HOME/.local/bin/claw"

# 验证

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
94% confidence
Finding

The skill clearly instructs shell execution, binary building, and invocation of a local CLI, but it declares no explicit tool scope such as permissions or allowed-tools. That omission weakens policy enforcement and makes it harder to constrain what the skill may execute, especially because the skill also includes build and run steps against a local filesystem path.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The skill encourages use of cloud providers and API keys but does not clearly warn that user prompts, source code, or repository context may be transmitted to external services. For a coding skill, this can expose proprietary code, secrets, or sensitive business logic to third parties without informed consent.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

The documentation repeatedly recommends using the --dangerously-skip-permissions flag without any warning or compensating controls. In a coding agent context, bypassing permission prompts can let model-generated actions run without human review, increasing the risk of unsafe file modification, command execution, or destructive operations.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

The configuration explicitly enables unrestricted filesystem and command access via "permissionMode": "danger-full-access" and disables permission prompts with "dangerouslySkipPermissions": true. For a coding-assistant skill, this removes an important safety boundary and allows any prompt-induced or compromised tool action to execute with broad local impact, including modifying files, exfiltrating data, or running destructive commands.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The documentation explicitly advertises a --dangerously-skip-permissions flag but provides no warning about the security consequences of bypassing permission prompts. In an AI-assisted coding CLI, this can normalize unsafe usage and lead users or downstream agents to run file/system-modifying actions without review, increasing the chance of destructive or unauthorized operations.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The documentation repeatedly recommends --dangerously-skip-permissions, which disables normal safety prompts and permission checks while encouraging users to run AI-assisted coding tasks. In this skill context, that materially increases the chance of unauthorized file modification, command execution, or other unsafe agent actions because the examples normalize bypassing safeguards without any warning or constrained use case.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
87% confidence
Finding

The file forces a specific language for all user-facing instructions, and there is no indication that the skill is intentionally restricted to Chinese-speaking users or that alternative locales are available. Under the policy, natural-language content should not impose a language without user opt-in or clear justification.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The quickstart explicitly tells users to invoke the tool with --dangerously-skip-permissions, which disables or bypasses a core safety boundary for an AI coding agent. In the context of a coding CLI that may read, modify, or execute project actions, documenting the dangerous mode as the normal one-shot example materially increases the chance that users run unreviewed operations without safeguards.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The manifest describes a skill for using the PansClaw Code CLI and automatically building it when missing or outdated, which implies a reusable installer/build path. This script instead operates on a fixed absolute path under a specific user's home directory, making it a machine-specific helper rather than a general auto-build mechanism matching the described behavior.

Content

No source excerpt is available for this finding.

Session Persistence

Medium
Category
Rogue Agent
Confidence
60% 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 · scripts/install.sh (reported line 22)May include surrounding context.

sh
# 步骤 2: 创建符号链接
echo "🔗 步骤 2/2: 更新符号链接..."
mkdir -p "$HOME/.local/bin"
rm -f "$HOME/.local/bin/claw"
ln -sf "$RUST_DIR/target/release/claw" "$HOME/.local/bin/claw"

Session Persistence

Medium
Category
Rogue Agent
Confidence
60% 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 · scripts/install.sh (reported line 22)May include surrounding context.

sh
# 步骤 2: 创建符号链接
echo "🔗 步骤 2/2: 更新符号链接..."
mkdir -p "$HOME/.local/bin"
rm -f "$HOME/.local/bin/claw"
ln -sf "$RUST_DIR/target/release/claw" "$HOME/.local/bin/claw"

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
75% confidence
Finding

Several usage examples are exclusively in Chinese, and the qwen3 model is labeled 'Chinese-optimized', which creates a bias toward a specific language without stating that language choice should follow user preference. This can conflict with language/locale policy expectations when the skill is used in other contexts.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
94% confidence
Finding

The script's comments and all user-visible status/error messages are written in Chinese, which imposes a specific language on users without any opt-in or alternative. This matches the policy concern for language/locale restrictions because the file provides no mechanism or documentation for selecting another language.

Content

No source excerpt is available for this finding.