Back to skill

Security audit

Skill Validator

Security checks for vulnerabilities and agentic risk

Overview

This skill is a validator, but it can run untrusted target skill scripts on the host without sandboxing or clear user confirmation.

Review carefully before installing. Use this only on skills you already trust, or run it in a disposable sandbox with no secrets, no important files, and no network access. Do not use it as a safe scanner for unknown skills unless the script execution paths are removed or gated behind explicit sandboxed opt-in.

Vulnerability Patterns
  • 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
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
Findings (1)

T09 · Insecure Skill Coding Practices

Error
Location
scripts/validate.sh:159
Finding

Unrestricted Execution of Untrusted Skill Scripts

Content
View full analysis
/dev/null | head -1) if [ -n "$first_script" ] && [ -f "$first_script" ]; then # 空参数测试 output=$($first_script 2>&1) && result=0 || result=$? ``` At lines 194–195, a target Skill's diagnostic script is executed through Bash: ```bash if [ -f "$SKILL_PATH/scripts/diagnose.sh" ]; then output=$(bash "$SKILL_PATH/scripts/diagnose.sh" 2>&1 | head -5) ``` ### Technical Analysis The validator treats scripts from the Skill being audited as executable test cases. It runs them without: - Process or filesystem sandboxing - Privilege reduction - Network isolation - Execution timeout - CPU, memory, process, or output limits - Removal of secrets from the environment - User confirmation - Prior static security review A Skill is precisely the component whose trustworthiness is being evaluated. Its scripts must therefore be considered attacker-controlled until validation is complete. Executing those scripts in the validator's own security context violates this trust boundary and turns validation into an arbitrary code-execution mechanism. Piping the diagnostic script's output through `head -5` does not constrain the script itself. The shell still launches the script normally, and it can perform arbitrary side effects before, during, or after producing output. The base directory is hard-coded as `/root/.openclaw/workspace/skills`, indicating that the validator may run in a root-owned environment. If invoked with root privileges, the target script inherits those privileges. In addition, `SKILL_NAME` is appended directly to the base directory: ```bash SKILL_NAME=$1 SKILL_PATH="$SKILL_DIR/$SKILL_NAM ...[truncated 2213 chars]
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
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
Findings (17)

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
80% 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 · SECURITY.md (reported line 43)May include surrounding context.

md
fi
    
    # 检查权限提升
    if grep -E "sudo|chmod 777|chown root" "$script"; then
        echo "⚠ 发现权限提升"
    fi
}

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
90% 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 · SECURITY.md (reported line 96)May include surrounding context.

md
# 检查危险模式
    local patterns=(
        "rm -rf /"
        "dd if=/dev/zero"
        ":(){ :|:& };:"  # Fork bomb
        "curl.*|.*bash"

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
85% 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 · SECURITY.md (reported line 96)May include surrounding context.

md
# 检查危险模式
    local patterns=(
        "rm -rf /"
        "dd if=/dev/zero"
        ":(){ :|:& };:"  # Fork bomb
        "curl.*|.*bash"

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

The skill promises comprehensive validation of newly installed skills, including functional completeness, boundary cases, and security issues, but the documented behavior largely consists of static grepping and directory/text checks. This mismatch can cause users or downstream agents to over-trust the validator's results, creating a false sense of security while untested runtime behavior, boundary conditions, and real security issues remain undetected; additionally, scanning local skill directories is a material capability that should be disclosed.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

The validator executes the first discovered shell script from the target skill during an 'empty parameter' test. Because skills are treated as untrusted content, this turns validation into arbitrary code execution with the validator's privileges, allowing side effects such as file access, network calls, persistence, or data exfiltration instead of performing passive integrity checks.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

The validator directly runs a target skill's diagnose.sh script for 'diagnostic' skills, explicitly executing attacker-controlled code based only on the skill name/path. In this context, a malicious skill can abuse validation as a code-execution trigger, causing harmful actions while appearing to be a benign test.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The entire skill-facing document is written only in Chinese, including safety instructions and user notices, with no indication that users may choose another language or that the skill is intentionally limited to a Chinese-speaking context. Under the language/locale policy, a single-language requirement without opt-in or justification is a natural-language policy concern.

Content

No source excerpt is available for this finding.

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
80% confidence
Finding

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

Content

Scanner excerpt · SECURITY.md (reported line 43)May include surrounding context.

md
fi
    
    # 检查权限提升
    if grep -E "sudo|chmod 777|chown root" "$script"; then
        echo "⚠ 发现权限提升"
    fi
}

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
86% confidence
Finding

The description lists trigger phrases such as “测试新技能” and “检查skill功能”, which are generic enough to overlap with ordinary requests about evaluating a skill. The file does not provide negative examples or explicit constraints clarifying when this validator should activate versus when a different troubleshooting or testing skill should be used.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The manifest description is written entirely in Chinese and presents Chinese trigger phrases only, which can impose a language-specific interaction model without user opt-in. Elsewhere the document discusses multilingual support as a quality goal, but the skill itself does not state that users may choose another language or locale.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

This shell script presents comments, usage text, status messages, scoring labels, and best-practice guidance in Chinese throughout the file. The skill does not offer user opt-in or selectable locale behavior, which is a natural-language locale policy concern for a general-purpose validation script.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
87% confidence
Finding

The script's comments, help text, status messages, and report output are written exclusively in Chinese, with no indication that the user can select another language or locale. This can violate language/locale policy when a skill implicitly forces a specific language without user opt-in.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The script parses env entries from the target skill and dereferences arbitrary environment variable names from the host using indirect expansion. This can reveal whether sensitive host configuration exists and may print the names of secrets-related variables in output, exposing information unrelated to validation and helping an attacker profile the environment.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The validator executes a discovered skill script without a prominent warning or user confirmation, so users may believe validation is a safe read-only operation when it is not. This increases the chance that arbitrary side-effecting code will be run unintentionally, especially because the tool is framed as a validator rather than an executor.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

Running diagnose.sh as part of validation is not clearly disclosed as a potentially side-effecting action. Users may trigger the validator expecting inspection only, while the skill gains an execution path capable of changing system state or contacting external services.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

This markdown template is entirely written in Chinese, including headings, labels, and the autogenerated footer, which implies the generated report will always be presented in that language. The file does not offer a language choice or document that it is intended only for a Chinese-language or region-specific context, which matches the locale-policy violation criteria.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
97% confidence
Finding

The script's comments and user-facing output strings are written in Chinese, which imposes a specific language on users without any visible opt-in or alternative locale support. Under the stated policy, forcing a language without user choice is a natural-language policy violation unless the locale restriction is documented and justified.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.