隔离执行环境确保Agent操作安全
OpenClaw通过`elevated`权限、`security`配置和`allowlists`实现安全沙箱。敏感操作需要用户显式批准(/approve命令),所有操作记录在审计日志中。
```yaml
# OpenClaw安全沙箱配置
security:
sandbox:
enabled: true
filesystem:
allowedPaths:
- "/var/www/miaoquai/"
- "/tmp/"
deniedPaths:
- "/etc/"
- "/root/.ssh/"
network:
allowedDomains:
- "api.openclaw.ai"
- "github.com"
commands:
whitelist:
- "ls"
- "cat"
- "git"
blacklist:
- "rm -rf"
- "chmod 777"
approval:
required:
- "elevated"
- "destructive"
timeout: 300
```