OpenClaw Security Audit
Run a comprehensive security audit on your local OpenClaw installation. Covers 6 security domains mapped to MITRE ATLAS threat categories.
When to Use
- User asks to "check security", "audit my openclaw", "is my config secure?"
- User mentions concerns about API key leaks, exposed ports, or privacy
- After changing OpenClaw configuration (gateway, channels, tools, etc.)
- User wants a security report (HTML or JSON)
When NOT to Use
- General system security questions unrelated to OpenClaw
- User is asking about a different application
- User just wants to know what OpenClaw is
Setup
Check if the audit tool is installed:
ls ~/openclaw-security-audit/audit.sh 2>/dev/null || echo "NOT_INSTALLED"
If not installed, clone it:
git clone https://github.com/sunt23310-ops/openclaw-security-audit.git ~/openclaw-security-audit
Running Checks
AUDIT_DIR="$HOME/openclaw-security-audit"
Quick Check (critical items only, ~5 seconds)
bash "$AUDIT_DIR/checks/gateway.sh" && bash "$AUDIT_DIR/checks/credentials.sh"
Full Audit (all 6 modules)
for check in gateway credentials channels tools network system; do
bash "$AUDIT_DIR/checks/${check}.sh"
done
Individual Checks
Match the user's concern to the right module:
| User asks about |
Command |
| Gateway, ports, binding, auth, TLS |
bash "$AUDIT_DIR/checks/gateway.sh" |
| API keys, passwords, file permissions, history leaks |
bash "$AUDIT_DIR/checks/credentials.sh" |
| WhatsApp, Telegram, DM policy, allowFrom |
bash "$AUDIT_DIR/checks/channels.sh" |
| Sandbox, denyCommands, tool restrictions |
bash "$AUDIT_DIR/checks/tools.sh" |
| IP leak, exposed ports, firewall, Shodan/Censys |
bash "$AUDIT_DIR/checks/network.sh" |
| macOS SIP, FileVault, TCC, iCloud sync |
bash "$AUDIT_DIR/checks/system.sh" |
Auto-Fix (requires explicit user confirmation for each fix)
bash "$AUDIT_DIR/fixes/interactive-fix.sh"
Specific fixes:
bash "$AUDIT_DIR/fixes/gateway-fix.sh" — bind gateway to localhost, generate strong token
bash "$AUDIT_DIR/fixes/permission-fix.sh" — fix file/directory permissions
bash "$AUDIT_DIR/fixes/channel-fix.sh" — fix DM policy, allowFrom, requireMention
Generate Report
bash "$AUDIT_DIR/audit.sh"
Then select option 5 for HTML or JSON report output.
Output Format
Each check outputs lines prefixed with:
[PASS] — check passed, no action needed
[WARN] — potential issue, review recommended
[FAIL] — security issue found, fix recommended
[SKIP] — check skipped (component not installed or not applicable)
After running checks, summarize results clearly. If there are FAIL items, recommend the appropriate fix script and explain what it will do before the user confirms.
Important Notes
- This tool is read-only by default. Fix scripts require explicit user confirmation for each change.
- The IP leak check (network module) will ask before sending your IP to external services (Shodan, Censys).
- All checks gracefully skip if OpenClaw is not installed or a component is missing.
- On Linux, macOS-specific checks (SIP, FileVault, TCC) are automatically skipped.
1---2name: security-audit-73description: Comprehensive OpenClaw security audit — checks gateway binding, credential exposure, channel policies, tool sandboxing, network/IP leaks, and macOS system security (SIP, FileVault, TCC).4---5
6# OpenClaw Security Audit
7
8Run a comprehensive security audit on your local OpenClaw installation. Covers 6 security domains mapped to MITRE ATLAS threat categories.
9
10## When to Use
11
12- User asks to "check security", "audit my openclaw", "is my config secure?"
13- User mentions concerns about API key leaks, exposed ports, or privacy
14- After changing OpenClaw configuration (gateway, channels, tools, etc.)
15- User wants a security report (HTML or JSON)
16
17## When NOT to Use
18
19- General system security questions unrelated to OpenClaw
20- User is asking about a different application
21- User just wants to know what OpenClaw is
22
23## Setup
24
25Check if the audit tool is installed:
26
27```bash
28ls ~/openclaw-security-audit/audit.sh 2>/dev/null || echo "NOT_INSTALLED"
29```
30
31If not installed, clone it:
32
33```bash
34git clone https://github.com/sunt23310-ops/openclaw-security-audit.git ~/openclaw-security-audit
35```
36
37## Running Checks
38
39```bash
40AUDIT_DIR="$HOME/openclaw-security-audit"
41```
42
43### Quick Check (critical items only, ~5 seconds)
44
45```bash
46bash "$AUDIT_DIR/checks/gateway.sh" && bash "$AUDIT_DIR/checks/credentials.sh"
47```
48
49### Full Audit (all 6 modules)
50
51```bash
52for check in gateway credentials channels tools network system; do
53 bash "$AUDIT_DIR/checks/${check}.sh"
54done
55```
56
57### Individual Checks
58
59Match the user's concern to the right module:
60
61| User asks about | Command |
62|----------------|---------|
63| Gateway, ports, binding, auth, TLS | `bash "$AUDIT_DIR/checks/gateway.sh"` |
64| API keys, passwords, file permissions, history leaks | `bash "$AUDIT_DIR/checks/credentials.sh"` |
65| WhatsApp, Telegram, DM policy, allowFrom | `bash "$AUDIT_DIR/checks/channels.sh"` |
66| Sandbox, denyCommands, tool restrictions | `bash "$AUDIT_DIR/checks/tools.sh"` |
67| IP leak, exposed ports, firewall, Shodan/Censys | `bash "$AUDIT_DIR/checks/network.sh"` |
68| macOS SIP, FileVault, TCC, iCloud sync | `bash "$AUDIT_DIR/checks/system.sh"` |
69
70### Auto-Fix (requires explicit user confirmation for each fix)
71
72```bash
73bash "$AUDIT_DIR/fixes/interactive-fix.sh"
74```
75
76Specific fixes:
77- `bash "$AUDIT_DIR/fixes/gateway-fix.sh"` — bind gateway to localhost, generate strong token
78- `bash "$AUDIT_DIR/fixes/permission-fix.sh"` — fix file/directory permissions
79- `bash "$AUDIT_DIR/fixes/channel-fix.sh"` — fix DM policy, allowFrom, requireMention
80
81### Generate Report
82
83```bash
84bash "$AUDIT_DIR/audit.sh"
85```
86
87Then select option 5 for HTML or JSON report output.
88
89## Output Format
90
91Each check outputs lines prefixed with:
92- `[PASS]` — check passed, no action needed
93- `[WARN]` — potential issue, review recommended
94- `[FAIL]` — security issue found, fix recommended
95- `[SKIP]` — check skipped (component not installed or not applicable)
96
97After running checks, summarize results clearly. If there are FAIL items, recommend the appropriate fix script and explain what it will do before the user confirms.
98
99## Important Notes
100
101- This tool is **read-only by default**. Fix scripts require explicit user confirmation for each change.
102- The **IP leak check** (network module) will ask before sending your IP to external services (Shodan, Censys).
103- All checks gracefully skip if OpenClaw is not installed or a component is missing.
104- On Linux, macOS-specific checks (SIP, FileVault, TCC) are automatically skipped.