OpenClaw Audit is a security configuration scanner for OpenClaw AI agents. It analyzes your openclaw.json configuration file to identify security misconfigurations that could leave your agent vulnerable to unauthorized access or remote control.
⚠️ DISCLAIMER: This tool modifies system-level configurations and file permissions. Use at your own risk. The author is not responsible for any data loss, system instability, or locked-out accounts. Always test in a non-production environment first.
- Linux (Ubuntu, Debian, Fedora, CentOS, etc.) - ✅ Full Support
- macOS - ✅ Full Support
- Windows (10/11) -
⚠️ Partial Support- Note: File permission automation (
chmod 600) is not available on Windows. The tool will skip this check and provide instructions for manual verification via File Explorer.
- Note: File permission automation (
Non-destructive scanner that reports vulnerabilities.
Interactive script that fixes vulnerabilities found by the auditor.
- Backs up your config (
.json.bak.security) before touching it. - Locks down file permissions (
chmod 600) (Linux/macOS). - Binds Gateway to localhost.
- Enables Token Authentication (and generates strong tokens).
- Sets Channel Policies to
pairing(prevents random DM access).
To get started, clone the repository and navigate into the project directory.
# Clone the repository
git clone https://github.com/ca7ai/openclaw-audit.git
# Enter the directory
cd openclaw-audit
## Usage
No external dependencies required. Runs with standard Python 3.
### Audit Mode (Check Only)
```bash
python3 audit.pypython3 harden.pyFollow the interactive prompts to apply fixes.
- Gateway Binding: Never bind to
0.0.0.0unless you are behind a VPN. - Authentication: Ensure the Gateway has a strong token.
- Channel Policy: Use
pairingorallowlist.openpolicies allow strangers to use your bot. - API Keys: Use environment variables, not hardcoded keys in
openclaw.json.
This tool audits your configuration, not your capabilities.
If your bot has the exec tool enabled (which allows running shell commands), you must ensure your Channel Policies are strict (allowlist).
- Risk: If
execis on + Channel isopen= Anyone can delete your files. - Check: Look in your
tools/directory. Ifexecis present, be extra careful.
This tool is designed to support the OpenClaw Project. Special thanks to the OpenClaw contributors for creating a powerful, MIT-licensed framework for AI agents.
This project is Source Available under the PolyForm Noncommercial License 1.0.0.
✅ Permitted: Personal use, research, hobby projects, and non-commercial organizations.
❌ Prohibited: Any use with an anticipated commercial application without explicit permission from the author.