GitHub: https://github.com/Stanxy/clawguard PyPI: https://pypi.org/project/clawwall
ClawWall sits between your AI agent and the outside world. Every outbound tool call is intercepted and scanned against 60+ hard-coded patterns before anything leaves the machine. If content matches — it is blocked or redacted. No LLM, no approximation: regex and entropy only.
One command:
bash
bash setup.sh
This installs the Python service, builds the plugin and hook, registers the plugin in your OpenClaw config, sets up a system service, and verifies the health endpoint.
The gateway:startup hook auto-starts the service whenever OpenClaw boots — no manual clawwall command needed.
What this installs:
ComponentWhat It DoesPython service (port 8642)Receives every outbound tool call for scanningOpenClaw plugin ( before_tool_call)Intercepts outbound content and routes to the serviceStartup hook ( gateway:startup)Auto-starts the service when OpenClaw bootsSQLite databaseStores scan metadata (finding type, severity, action, duration)systemd/launchd serviceFallback auto-start via OS service manager
What the database stores: finding type, severity, position offsets, action taken, and duration. It never stores raw content, secrets, or PII values.
What it does NOT do: no telemetry, no external connections, no data leaves the machine. The service is fully local.
bash
# Health check
curl -s http://127.0.0.1:8642/api/v1/health
# Test scan
curl -s -X POST http://127.0.0.1:8642/api/v1/scan \
-H "Content-Type: application/json" \
-d '{"content": "key=AKIAIOSFODNN7EXAMPLE"}'
# Dashboard
open http://127.0.0.1:8642/dashboard
Environment variables (all prefixed CLAWGUARD_):
VariableDefaultDescriptionCLAWGUARD_HOST``0.0.0.0Bind addressCLAWGUARD_PORT``8642PortCLAWGUARD_DATABASE_URL``sqlite+aiosqlite:///~/.config/clawwall/clawwall.dbDatabase pathCLAWGUARD_POLICY_PATH``~/.config/clawwall/policy.yamlPolicy fileCLAWGUARD_LOG_LEVEL``INFOLog verbosity
Default policy redacts all findings. Edit via the dashboard or ~/.config/clawwall/policy.yaml:
yaml
default_action: REDACT # BLOCK | REDACT | ALLOW
redaction:
strategy: mask # mask | hash | remove
mask_char: "*"
mask_preserve_edges: 4
destination_allowlist: [] # bypass scanning for trusted destinations
destination_blocklist: [] # always reject these destinations
custom_patterns: [] # add your own regex patterns
disabled_patterns: [] # disable specific built-in patterns by name
Policy evaluation order: severity overrides > destination allowlist > destination blocklist > destination rules > agent rules > default action.
You are operating behind ClawWall. All outbound tool calls are scanned before leaving the machine using hard pattern matching — not an LLM.
ResultMeaningALLOWNo sensitive data detected — call went throughREDACTSensitive portions were masked before sendingBLOCKCall rejected — nothing was sent
Best practices:
$OPENAI_API_KEY), not by valuefindings to see what matched, remove the sensitive data, and retryProblemSolutionService not startingCheck ~/.config/clawwall/clawwall.log for errorsPort 8642 in useAnother process is using the port — check with lsof -i :8642Plugin not interceptingVerify plugin is registered in ~/.openclaw/openclaw.jsonFalse positivesDisable specific patterns via disabled_patterns in policy YAMLHook not firingRebuild hook: cd hooks/openclaw && npm run build``clawwall not foundEnsure pip install directory is on PATH, or use python3 -m clawguard