T09 · Insecure Skill Coding Practices
- Location
check-permission.mjs:14- Finding
Policy Loading Failure Silently Disables Enhanced Permission Enforcement
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This skill is a permission-enforcement tool, but its own enforcement can fail open and its command wrapper can run commands unsafely.
Review this carefully before installing. It is intended to enforce permissions, but missing or incomplete policy can allow actions by default, the wrapper may execute reconstructed shell commands, and command logs may contain secrets. Use only in a test environment unless these behaviors are fixed to fail closed, preserve argument boundaries, harden path checks, and redact logs.
check-permission.mjs:14Policy Loading Failure Silently Disables Enhanced Permission Enforcement
permission-enforcer.mjs:23Legacy Permission Evaluator Also Fails Open
permission-enforcer.mjs:33Workspace Boundary Bypass Through Lexical Prefix and Symlink Paths
check-permission.mjs:68Nested Nonexistent Paths Bypass Symlink Escape Protection
exec-wrapper.sh:108Argument Flattening and Shell Reinterpretation Enable Command Injection
exec-wrapper.sh:28Raw Command Logging Can Expose Credentials and Other Secrets
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).
| `file_write` | `workspace` | allow | 允许写入 workspace 内文件 |
| `file_write` | `outside_workspace` | deny | 禁止写入 workspace 外 |
| `file_write` | `openclaw_core` | prompt | 修改核心文件需确认 |
| `bash` | `rm -rf /` 等 | deny | 禁止危险删除命令 |
| `bash` | `curl`, `wget` | prompt | 网络下载需确认 |
| `bash` | `sudo` | prompt | sudo 需确认 |
| `mcp` | `write_file` | prompt | MCP 文件写入需确认 |
Tool calls are chained to bypass individual safety checks or escalate capabilities beyond what any single tool call would allow.
| `file_write` | `openclaw_core` | prompt | 修改核心文件需确认 |
| `bash` | `rm -rf /` 等 | deny | 禁止危险删除命令 |
| `bash` | `curl`, `wget` | prompt | 网络下载需确认 |
| `bash` | `sudo` | prompt | sudo 需确认 |
| `mcp` | `write_file` | prompt | MCP 文件写入需确认 |
## 使用
Referenced artifact was not completely inspected
import { checkPermission } from './permission-enforcer.mjs';
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
{
name: "File outside workspace",
action: "file_write",
context: { filePath: "/etc/passwd" },
expected: "deny"
},
{
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
{
name: "File outside workspace",
action: "file_write",
context: { filePath: "/etc/passwd" },
expected: "deny"
},
{
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
{
name: "File outside workspace",
action: "file_write",
context: { filePath: "/etc/passwd" },
expected: "deny"
},
{
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).
expected: "allow"
},
{
name: "Bash: dangerous rm -rf /",
action: "bash",
context: { bashCommand: "rm -rf /" },
expected: "deny"
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).
expected: "allow"
},
{
name: "Bash: dangerous rm -rf /",
action: "bash",
context: { bashCommand: "rm -rf /" },
expected: "deny"
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).
{
name: "Bash: dangerous rm -rf /",
action: "bash",
context: { bashCommand: "rm -rf /" },
expected: "deny"
},
{
The script is presented as a permission-enforcing wrapper, but if the policy checker file is missing it offers the user an option to continue with no policy enforcement at all. That fail-open behavior defeats the core security boundary and allows dangerous commands to run unvalidated, especially if the checker is removed, misplaced, or tampered with.
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).
EXAMPLES:
exec-wrapper.sh ls -la
exec-wrapper.sh rm -rf /tmp/test
exec-wrapper.sh curl https://example.com
FEATURES:
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).
EXAMPLES:
exec-wrapper.sh ls -la
exec-wrapper.sh rm -rf /tmp/test
exec-wrapper.sh curl https://example.com
FEATURES:
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).
EXAMPLES:
exec-wrapper.sh ls -la
exec-wrapper.sh rm -rf /tmp/test
exec-wrapper.sh curl https://example.com
FEATURES:
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).
EXAMPLES:
exec-wrapper.sh ls -la
exec-wrapper.sh rm -rf /tmp/test
exec-wrapper.sh curl https://example.com
FEATURES:
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).
EXAMPLES:
exec-wrapper.sh ls -la
exec-wrapper.sh rm -rf /tmp/test
exec-wrapper.sh curl https://example.com
FEATURES:
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).
EXAMPLES:
exec-wrapper.sh ls -la
exec-wrapper.sh rm -rf /tmp/test
exec-wrapper.sh curl https://example.com
FEATURES:
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).
FEATURES:
• Intercepts commands before execution
• Checks against enforcer-policy.json
• Blocks dangerous commands (rm -rf /, sudo, etc.)
• Prompts for risky operations
• Supports dry-run mode
• Logs all decisions
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).
FEATURES:
• Intercepts commands before execution
• Checks against enforcer-policy.json
• Blocks dangerous commands (rm -rf /, sudo, etc.)
• Prompts for risky operations
• Supports dry-run mode
• Logs all decisions
The permission checker is implemented with a fail-open default: if no rule matches, it returns { allowed: true }. In a security enforcement component, this means missing, malformed, or incomplete policy coverage silently permits sensitive actions such as shell execution or file writes, which can completely bypass intended restrictions.
The primary descriptive text is written entirely in Chinese, which imposes a language choice on users without any opt-in, fallback, or note that the skill is region-specific. This matches the language/locale policy violation category because no user choice or documented justification is provided.
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.
| `file_write` | `openclaw_core` | prompt | 修改核心文件需确认 |
| `bash` | `rm -rf /` 等 | deny | 禁止危险删除命令 |
| `bash` | `curl`, `wget` | prompt | 网络下载需确认 |
| `bash` | `sudo` | prompt | sudo 需确认 |
| `mcp` | `write_file` | prompt | MCP 文件写入需确认 |
## 使用
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.
| `file_write` | `openclaw_core` | prompt | 修改核心文件需确认 |
| `bash` | `rm -rf /` 等 | deny | 禁止危险删除命令 |
| `bash` | `curl`, `wget` | prompt | 网络下载需确认 |
| `bash` | `sudo` | prompt | sudo 需确认 |
| `mcp` | `write_file` | prompt | MCP 文件写入需确认 |
## 使用
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.
| `file_write` | `openclaw_core` | prompt | 修改核心文件需确认 |
| `bash` | `rm -rf /` 等 | deny | 禁止危险删除命令 |
| `bash` | `curl`, `wget` | prompt | 网络下载需确认 |
| `bash` | `sudo` | prompt | sudo 需确认 |
| `mcp` | `write_file` | prompt | MCP 文件写入需确认 |
## 使用
The cleanup uses recursive forced deletion against a path derived from the user's home workspace without interactive confirmation or additional safety validation. If the directory variable is miscomputed, altered, or points somewhere unexpected, this can cause unintended data loss.
The script advertises boundary protection, but its authorization model is fail-open: if no policy rule matches, evaluate() returns allow. In a permission-enforcement component, this means missing, malformed, incomplete, or bypassed policy coverage can silently grant access, undermining the claimed protection and enabling unauthorized actions.