Back to skill

Security audit

OpenClaw 沙盒测试系统

Security checks for vulnerabilities and agentic risk

Overview

The skill appears intended for OpenClaw sandbox testing, but its scripts can affect live configuration and leave a localhost gateway running while overstating safety guarantees.

Review this carefully before installing. It is best treated as an operational helper for experienced OpenClaw users, not a zero-risk sandbox. Do not run it on shared machines or production systems without first changing the static token, using a unique secure temporary directory, disabling third-party plugins by default, adding a reliable stop/cleanup path for the background Gateway, and verifying backups and rollback manually before any live Gateway restart.

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
templates/safe-try.sh:75
Finding

Predictable Temporary Directory Enables Symlink-Based File Overwrite

Content
View full analysis
$SANDBOX_CONFIG << 'EOF' ``` ### Technical Analysis The script creates its sandbox under the fixed, publicly predictable path `/tmp/openclaw-sandbox-3.8`. It does not reject a pre-existing directory, verify path ownership, check for symbolic links, or create the directory atomically. The `cat > $SANDBOX_CONFIG` redirection follows symbolic links. A local attacker who can write to `/tmp` can therefore pre-create the expected directory hierarchy and make `openclaw.json` a symbolic link to another file writable by the victim. When the victim runs the script, the shell opens and truncates the symlink target before executing `cat`. The same predictable hierarchy is subsequently used for logs, backups, and the Gateway PID file, expanding the opportunity for local path-manipulation attacks. The unquoted path expansions are also unsafe coding practice, although the current hardcoded path contains no whitespace. ### Attack Path 1. A local attacker creates `/tmp/openclaw-sandbox-3.8/.openclaw`. 2. The attacker creates `openclaw.json` as a symbolic link to a file writable by the intended victim. 3. The victim invokes `templates/safe-try.sh`. 4. `mkdir -p` accepts the attacker-prepared hierarchy because it already exists. 5. The shell processes `cat > $SANDBOX_CONFIG` and follows the symbolic link. 6. The linked target is truncated and overwr ...[truncated 744 chars]
Remediation
View remediation
"$SANDBOX_CONFIG" <<'EOF' ``` 5. Ensure generated configuration and token-bearing files have mode `0600`. 6. Validate that critical files are regular files owned by the current user and are not symbolic links before writing. 7. Register cleanup handlers that stop the spawned Gateway and remove only the uniquely created directory: ```bash trap cleanup EXIT INT TERM ``` 8. Where supported, use no-follow or exclusive-creation semantics rather than ordinary shell redirection for security-sensitive files. ]]>

T09 · Insecure Skill Coding Practices

Warning
Location
templates/safe-try.sh:87
Finding

Sandbox Gateway Uses a Static Publicly Disclosed Authentication Token

Content
View full analysis
Remediation
View remediation

T08 · Insecure Dependencies

Warning
Location
templates/safe-try.sh:108
Finding

Sandbox Automatically Enables an Unpinned Third-Party Plugin

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Rogue AgentSelf-Modification, Session Persistence
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (28)

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The document promises Git version management and automatic rollback while mostly describing provisioning and manual steps, with no verifiable implementation shown in this file. This is primarily an integrity and operational safety issue: false assurances in a configuration tool can lead to data loss, incomplete recovery, and unsafe change management.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
94% confidence
Finding

The document promises Git version management and automatic rollback while mostly describing provisioning and manual steps, with no verifiable implementation shown in this file. This is primarily an integrity and operational safety issue: false assurances in a configuration tool can lead to data loss, incomplete recovery, and unsafe change management.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding

The document promises Git version management and automatic rollback while mostly describing provisioning and manual steps, with no verifiable implementation shown in this file. This is primarily an integrity and operational safety issue: false assurances in a configuration tool can lead to data loss, incomplete recovery, and unsafe change management.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
94% confidence
Finding

The document promises Git version management and automatic rollback while mostly describing provisioning and manual steps, with no verifiable implementation shown in this file. This is primarily an integrity and operational safety issue: false assurances in a configuration tool can lead to data loss, incomplete recovery, and unsafe change management.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The hard-coded HOME reassignment is unrelated to the stated sandbox cleanup purpose and introduces a dangerous side effect. In a script presented as 'zero-risk' and safe for preparing production commands, this can mislead users into trusting a command that silently changes global execution context, increasing the chance of accidental production misuse or cross-user data access.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

The script claims to clean OpenClaw-related environment state but also overwrites HOME with a hard-coded user-specific path. Changing HOME affects where shells and tools resolve config files, credentials, SSH keys, and output paths, which can redirect later commands into an unintended account context and cause data loss, credential misuse, or execution under the wrong environment.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The skill is marketed as a sandbox testing system, but this script directly targets the production configuration path under $HOME/.openclaw/openclaw.json and restarts the live gateway. That mismatch can mislead users into running production-affecting actions under the assumption they are operating in an isolated test environment, increasing the chance of unintended service disruption or unsafe config deployment.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
87% confidence
Finding

The display name and description are written in Chinese, and the rest of the skill documentation is also presented exclusively in Chinese. Under the policy, language or locale constraints should either offer user choice or be clearly documented as region-specific; this file does neither.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The document instructs users to run an apply script that changes live configuration immediately after sandbox testing, but it does not explicitly warn that this step affects production settings. That omission can cause operators to treat the action as low-risk and unintentionally modify active system behavior, especially because the surrounding text emphasizes sandbox safety and rollback convenience.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

This markdown file describes operational steps that modify user configuration and invoke a script which restarts a service, as shown by the sample output. Under the markdown criteria for missing user warnings, actions that can affect system integrity or service availability should be accompanied by a clear warning, but none is provided near the execution step.

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 · examples/污染问题案例.md (reported line 42)May include surrounding context.

bash
# ✅ 正确做法:创建独立配置
mkdir -p /tmp/openclaw-sandbox/.openclaw/{extensions,agents,logs}

cat > /tmp/openclaw-sandbox/.openclaw/openclaw.json << 'EOF'
{

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

This shell script's comments and interface strings are written in Chinese, and there is no indication that the skill is region-specific or that users may opt into another language. The policy explicitly flags language or locale constraints when they are imposed without user choice or documented justification.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The script claims to verify 9 protection layers, but most checks are only hardcoded status messages rather than real validation. This can mislead operators into believing safety controls such as port isolation, plugin isolation, CORS, process protection, and performance settings are active when they may be absent or misconfigured.

Content

No source excerpt is available for this finding.

Session Persistence

Medium
Category
Rogue Agent
Confidence
65% 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 · SKILL.md (reported line 107)May include surrounding context.

md
echo -e "${GREEN}✓ 7. CORS 修复${NC} (allowedOrigins 同步端口)"
    
    # 8. 进程保护
    echo -e "${GREEN}✓ 8. 进程保护${NC} (nohup 后台运行)"
    
    # 9. 性能优化
    echo -e "${GREEN}✓ 9. 性能优化${NC} (关闭 memorySearch)"

Session Persistence

Medium
Category
Rogue Agent
Confidence
65% 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 · examples/污染问题案例.md (reported line 194)May include surrounding context.

md
echo -e "${GREEN}✓ 7. CORS 修复${NC} (allowedOrigins 同步端口)"
    
    # 8. 进程保护
    echo -e "${GREEN}✓ 8. 进程保护${NC} (nohup 后台运行)"
    
    # 9. 性能优化
    echo -e "${GREEN}✓ 9. 性能优化${NC} (关闭 memorySearch)"

Session Persistence

Medium
Category
Rogue Agent
Confidence
65% 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/init.sh (reported line 74)May include surrounding context.

sh
echo -e "${GREEN}✓ 7. CORS 修复${NC} (allowedOrigins 同步端口)"
    
    # 8. 进程保护
    echo -e "${GREEN}✓ 8. 进程保护${NC} (nohup 后台运行)"
    
    # 9. 性能优化
    echo -e "${GREEN}✓ 9. 性能优化${NC} (关闭 memorySearch)"

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

All user-facing strings, usage instructions, prompts, and status messages in the script are written in Chinese, which imposes a specific language on users. The file does not indicate that the skill is China-specific or provide any opt-in or alternative language, so this is a natural-language locale policy concern.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The script claims safety properties such as rollback on error, but it does not implement any automatic rollback path after failed validation, restart failure, or failed post-deployment health checks. This creates a false sense of safety and can leave production in a broken or partially applied state after an unsuccessful change.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

The script advertises environment cleanup as a safety control, but it only unsets OPENCLAW_HOME and leaves HOME changed to the sandbox directory for the remainder of the script. This can misdirect subsequent commands, reads, writes, and tool behavior, creating confusing state leakage and undermining the claimed safety guarantees.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The script claims sandbox isolation but writes a config that explicitly enables a real plugin, feishu-openclaw-plugin, inside the test environment. That weakens the isolation boundary because the sandbox may still interact with external services or production-adjacent resources through the plugin, making the 'zero-risk' claim misleading.

Content

No source excerpt is available for this finding.

Session Persistence

Medium
Category
Rogue Agent
Confidence
91% confidence
Finding

Using nohup to detach the gateway creates a persistent background process that survives the invoking shell session. In a skill presented as a safe sandbox helper, this increases risk because it leaves a long-lived service and token-bearing web UI running beyond the user's immediate awareness, expanding the window for unintended access or misuse.

Content

Scanner excerpt · templates/safe-try.sh (reported line 169)May include surrounding context.

sh
export OPENCLAW_HOME=$SANDBOX_DIR/.openclaw
    export HOME=$SANDBOX_DIR  # 破解~/陷阱
    
    # 后台启动(nohup 进程保护)
    cd $SANDBOX_DIR
    nohup openclaw gateway run --bind loopback --port 18800 \
      > $SANDBOX_DIR/.openclaw/logs/gateway.log 2>&1 &

Session Persistence

Medium
Category
Rogue Agent
Confidence
91% confidence
Finding

The nohup openclaw gateway run ... & command creates durable session persistence and leaves a service listening on a local port with a static token disclosed in script output. In context, the danger is elevated because the skill markets itself as 'zero-risk' and '9 layers of protection,' which may cause users to underestimate the risk of a persistent service remaining active after the script exits.

Content

Scanner excerpt · templates/safe-try.sh (reported line 171)May include surrounding context.

sh
# 后台启动(nohup 进程保护)
    cd $SANDBOX_DIR
    nohup openclaw gateway run --bind loopback --port 18800 \
      > $SANDBOX_DIR/.openclaw/logs/gateway.log 2>&1 &
    
    # 记录 PID

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
83% confidence
Finding

This markdown file presents the entire verification report in Chinese, with no indication that language choice is optional or configurable. Under the natural-language policy rule, forcing a specific language without user opt-in can be a locale-policy violation.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
95% confidence
Finding

The natural-language instructions and examples are presented only in Chinese, which can amount to forcing a specific language without user opt-in. The file does not indicate that the skill is region-specific or provide an alternative language option.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
96% confidence
Finding

Natural-language policy violations include forcing a specific language without user opt-in. This file presents all instructions, labels, and guidance only in Chinese and does not offer an alternative language or note that the skill is intended exclusively for a Chinese-speaking audience.

Content

No source excerpt is available for this finding.