Rules of the Claw: Open Source Security Rule Set for OpenClaw Agents

Production Security Rule Set for OpenClaw Agents
Rules of the Claw is a JSON rule set that acts as a hard deny layer on top of agent tool calls in OpenClaw. It addresses the security risk of agents with broad tool access being vulnerable to bad skill installations or prompt injections that could cause real damage.
Key Security Features
- Blocks destructive executions including
rm -rfon workspace/config directories, pipe-to-shell operations, and curl to unknown executables - Protects credential files from reads and writes:
openclaw.json,auth-profiles.json, and files in.secrets/directory - Guards instruction files (
SOUL.md,AGENTS.md) from unauthorized agent edits - Denylists network reconnaissance tools including nmap, masscan, and netcat
- Blocks agent reads of other agents' auth profiles
Technical Implementation
The rule set contains 139 total rules with three preset configurations: minimal, standard, and strict. It ships with a JSON schema, validation scripts, and a one-command install skill. The key design decision is zero LLM dependency - rules execute at the tool layer via regex patterns, providing microsecond latency. Unlike LLM-based guardrails, regex patterns cannot be socially engineered or prompt-injected.
Availability and Licensing
The project is available at github.com/Bahuleyandr/rules-of-the-claw and is MIT licensed. The creator welcomes pull requests for new rule patterns.
📖 Read the full source: r/openclaw
👀 See Also

ClawVault Security Enhancement Adds Sensitive Data Detection for OpenClaw
A new enhancement to ClawVault adds real-time sensitive data detection and automatic sanitization for OpenClaw API traffic, intercepting plaintext passwords, API keys, and tokens before they reach LLM providers.

Snowflake Cortex Code CLI vulnerability allowed sandbox escape and malware execution
A vulnerability in Snowflake Cortex Code CLI version 1.0.25 and earlier allowed arbitrary command execution without human approval via process substitution bypass, enabling malware installation and sandbox escape through indirect prompt injection.

Anthropic's Claude Desktop App Installs Undisclosed Native Messaging Bridge
Claude Desktop silently installs a preauthorized browser extension that enables native messaging, raising security concerns.

Smart Bash Permission Hook for Claude Code Prevents Compound Command Bypass
A Python PreToolUse hook addresses a security gap in Claude Code's permission system where compound bash commands could bypass allow/deny patterns. The script decomposes commands into sub-commands and checks each individually against existing permission rules.