T05 · Unauthorized Access and Privilege Escalation
- Location
src/engine.ts:101- Finding
Configured allowlists are bypassed for essential and T0 tools
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This appears to be a legitimate policy-engine plugin, but its own enforcement boundary has fail-open and bypass behaviors that can make restrictive policies much weaker than users expect.
Install only if you treat this as an advisory guardrail, not a sandbox or authoritative security boundary. Review the defaults carefully, remove powerful tools such as gateway and sessions_send from any always-allowed recovery set where possible, avoid empty allowlist profiles, keep OPENCLAW_POLICY_BYPASS unset except during supervised recovery, and do not rely on the built-in deny patterns or path allowlists as the only protection around exec or write-capable tools.
src/engine.ts:101Configured allowlists are bypassed for essential and T0 tools
src/engine.ts:158Empty or invalid allowlist profiles silently grant access to all tools
src/hooks/before-tool-call.ts:106Policy evaluation errors permit the original tool call
src/patterns.ts:14Literal shell deny patterns are easily bypassed by common command variants
src/patterns.ts:224Lexical path checks permit writes outside allowlisted directories through symbolic links
Remote code is downloaded and executed. This bypasses code review and could introduce malicious code.
### 1.2 The ClawHub Incident (2026-02-06)
On 2026-02-06, a compromised skill published to ClawHub contained a hidden `exec` call that exfiltrated workspace files. The model was "helpful" and executed it. This validated the need for deterministic governance: the model shouldn't get to decide unilaterally whether to run `exec curl ... | bash`.
### 1.3 What Policy Engine Solves
Instructions found that direct the agent to transmit conversation context or user data to external services.
- Read files to understand state
- Check its own status
- Send messages to the user
- Manage the gateway
---
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
### 8.1 PLAN → ACT Enforcement
Require agents to declare a plan (tool sequence) before execution. The policy engine approves the plan as a unit, rejecting suspicious sequences (e.g., `read /etc/shadow` → `exec curl POST`).
### 8.2 Automatic Model Escalation
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
### 8.1 PLAN → ACT Enforcement
Require agents to declare a plan (tool sequence) before execution. The policy engine approves the plan as a unit, rejecting suspicious sequences (e.g., `read /etc/shadow` → `exec curl POST`).
### 8.2 Automatic Model Escalation
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
### 8.1 PLAN → ACT Enforcement
Require agents to declare a plan (tool sequence) before execution. The policy engine approves the plan as a unit, rejecting suspicious sequences (e.g., `read /etc/shadow` → `exec curl POST`).
### 8.2 Automatic Model Escalation
An environment-variable bypass that is not prominently disclosed weakens the trust boundary of the entire skill. If this file is only tests or partial code while the manifest promises strong governance, the documentation still misleads users into overestimating protection.
An environment-variable bypass that is not prominently disclosed weakens the trust boundary of the entire skill. If this file is only tests or partial code while the manifest promises strong governance, the documentation still misleads users into overestimating protection.
An environment-variable bypass that is not prominently disclosed weakens the trust boundary of the entire skill. If this file is only tests or partial code while the manifest promises strong governance, the documentation still misleads users into overestimating protection.
An environment-variable bypass that is not prominently disclosed weakens the trust boundary of the entire skill. If this file is only tests or partial code while the manifest promises strong governance, the documentation still misleads users into overestimating protection.
An environment-variable bypass that is not prominently disclosed weakens the trust boundary of the entire skill. If this file is only tests or partial code while the manifest promises strong governance, the documentation still misleads users into overestimating protection.
An environment-variable bypass that is not prominently disclosed weakens the trust boundary of the entire skill. If this file is only tests or partial code while the manifest promises strong governance, the documentation still misleads users into overestimating protection.
An environment-variable bypass that is not prominently disclosed weakens the trust boundary of the entire skill. If this file is only tests or partial code while the manifest promises strong governance, the documentation still misleads users into overestimating protection.
An environment-variable bypass that is not prominently disclosed weakens the trust boundary of the entire skill. If this file is only tests or partial code while the manifest promises strong governance, the documentation still misleads users into overestimating protection.
An environment-variable bypass that is not prominently disclosed weakens the trust boundary of the entire skill. If this file is only tests or partial code while the manifest promises strong governance, the documentation still misleads users into overestimating protection.
An environment-variable bypass that is not prominently disclosed weakens the trust boundary of the entire skill. If this file is only tests or partial code while the manifest promises strong governance, the documentation still misleads users into overestimating protection.
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
Built-in patterns block fork bombs, rm -rf, mkfs, disk wipes, and system path writes. Scoped matching checks only relevant params (e.g., command for exec, path for write) — never file content. Add custom patterns per tool.
Canonicalizes file paths via path.resolve() then checks against allowed directory prefixes. Prevents path traversal attacks (e.g., ../../etc/passwd) even via prompt injection.
{
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
Built-in patterns block fork bombs, `rm -rf`, `mkfs`, disk wipes, and system path writes. Scoped matching checks only relevant params (e.g., `command` for exec, `path` for write) — never file content. Add custom patterns per tool.
### Path Allowlist Enforcement
Canonicalizes file paths via `path.resolve()` then checks against allowed directory prefixes. Prevents path traversal attacks (e.g., `../../etc/passwd`) even via prompt injection.
```jsonc
{
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
Built-in patterns block fork bombs, `rm -rf`, `mkfs`, disk wipes, and system path writes. Scoped matching checks only relevant params (e.g., `command` for exec, `path` for write) — never file content. Add custom patterns per tool.
### Path Allowlist Enforcement
Canonicalizes file paths via `path.resolve()` then checks against allowed directory prefixes. Prevents path traversal attacks (e.g., `../../etc/passwd`) even via prompt injection.
```jsonc
{
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
Built-in patterns block fork bombs, `rm -rf`, `mkfs`, disk wipes, and system path writes. Scoped matching checks only relevant params (e.g., `command` for exec, `path` for write) — never file content. Add custom patterns per tool.
### Path Allowlist Enforcement
Canonicalizes file paths via `path.resolve()` then checks against allowed directory prefixes. Prevents path traversal attacks (e.g., `../../etc/passwd`) even via prompt injection.
```jsonc
{
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
Built-in patterns block fork bombs, `rm -rf`, `mkfs`, disk wipes, and system path writes. Scoped matching checks only relevant params (e.g., `command` for exec, `path` for write) — never file content. Add custom patterns per tool.
### Path Allowlist Enforcement
Canonicalizes file paths via `path.resolve()` then checks against allowed directory prefixes. Prevents path traversal attacks (e.g., `../../etc/passwd`) even via prompt injection.
```jsonc
{
Skill contains instructions that could directly expose system prompts, internal rules, or hidden instructions to users or external parties.
if (agentId) {
const rule = this.config.routing[agentId];
if (rule?.toolProfile && this.config.allowlists[rule.toolProfile]) {
return rule.toolProfile;
}
}
This hook is described as the enforcement point for tool governance, yet setting OPENCLAW_POLICY_BYPASS=1 causes it to allow every tool call without policy evaluation. In addition, the catch block returns undefined on error, which fails open and permits execution when the policy engine crashes or encounters malformed input. In a governance layer, both behaviors create a straightforward path to defeat protections.
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).
":(){ :|:& };:",
"dd if=",
"> /dev/sd",
"chmod -R 777 /",
"mv /* ",
"wget -O- | sh",
"curl | sh",
Remote code is downloaded and executed. This bypasses code review and could introduce malicious code.
"> /dev/sd",
"chmod -R 777 /",
"mv /* ",
"wget -O- | sh",
"curl | sh",
];
Remote code is downloaded and executed. This bypasses code review and could introduce malicious code.
"chmod -R 777 /",
"mv /* ",
"wget -O- | sh",
"curl | sh",
];
const DEFAULT_WRITE_DENY_PATTERNS: string[] = [