https://clawsec.bot
Overview
Clawsec is an open-source security plugin for OpenClaw (an AI agent framework) that provides real-time security guardrails to prevent AI agents from executing dangerous commands, leaking secrets, or causing system damage.
What It Does
Clawsec operates as middleware that intercepts every tool call an AI agent makes before execution, running it through a rules engine in under 5ms to determine if the action should be blocked, require human confirmation, or be allowed with audit logging.
The Problem It Solves
AI agents like OpenClaw run with full system accessβthey can delete files, access secrets, make purchases, and execute shell commands. Most AI frameworks ship with zero security defaults, leaving agents exposed to:
- Prompt injection attacks
- Secret leakage and credential exposure
- Unauthorized purchases and API calls
- Data exfiltration to external endpoints
- Destructive file operations (rm -rf /)
- Privilege escalation attempts
How It Works
Three-Stage Protection:
- Intercept - Catches all tool calls (shell commands, HTTP requests, file operations) before execution
- Analyze - Pattern matches against built-in rulesets in <5ms
- Enforce - Takes configured action: block, require human confirmation, or allow with logging
Built-In Security Rulesets
- Destructive Commands - Blocks file deletion, database drops, process kills (rm -rf, DROP TABLE, kill -9)
- Secret Exposure - Prevents API keys, tokens, credentials from being exposed in output
- Data Exfiltration - Stops unauthorized uploads to external endpoints
- Unauthorized Purchases - Blocks payment APIs and subscription changes
- Privilege Escalation - Prevents root access and permission changes (sudo, chmod 777)
- Prompt Injection - Detects system prompt leaks and instruction override attempts
Key Features
- One-command installation:
openclaw plugins install clawsec - Zero configuration required - Auto-generates clawsec.yaml with sensible defaults
- Configurable YAML rules - Extend or customize any ruleset
- <5ms latency - No noticeable performance impact
- MIT licensed - Fully open source
- Framework agnostic - Works with any agent framework
- Active audit trail - Full logging of all actions
Who Uses It
- AI agent developers securing their autonomous systems
- DevOps teams running AI agents with system access
- Security teams implementing guardrails for AI deployments
- Enterprises protecting against AI-related security incidents
- Researchers building safe autonomous agent systems
Technical Specs
- Built specifically for OpenClaw but framework-extensible
- Pattern matching rules engine
- Configurable actions per rule (block/confirm/allow)
- Agent confirmation parameter support
- Extensible ruleset library
- Active community with new rules every release