Loading...
Loading...
Audit your OpenClaw environment for credential leaks, unsafe defaults, and missing sandbox configuration. Wizard-style: answers questions about your setup and produces a fix checklist.
npx skill4agent add useai-pro/openclaw-skills-security setup-auditorfileReadQ1: What's your workspace path?
→ I'll scan for .env, .aws, .ssh, credentials
Q2: What host agent do you use? (Codex CLI / Claude Code / OpenClaw / other)
→ I'll check your tool-specific config
Q3: What are your permission defaults? (network / shell / fileWrite)
→ I'll verify least-privilege is applied
Q4: Do you use Docker/sandbox for untrusted skills?
→ I'll check isolation readiness
Q5: Any ports open or remote access configured?
→ I'll check exposure surfacefileRead.env.env.local.env.production.env.*docker-compose.ymlconfig.jsonsettings.jsonsecrets.json*.pem*.key*.p12*.pfx~/.aws/credentials~/.aws/config~/.ssh/id_rsa~/.ssh/id_ed25519~/.ssh/config~/.netrc~/.npmrc~/.pypircAKIA[0-9A-Z]{16} # AWS Access Key
sk-[a-zA-Z0-9]{48} # OpenAI API Key
sk-ant-[a-zA-Z0-9-]{80,} # Anthropic API Key
ghp_[a-zA-Z0-9]{36} # GitHub Personal Token
gho_[a-zA-Z0-9]{36} # GitHub OAuth Token
glpat-[a-zA-Z0-9-_]{20} # GitLab Personal Token
xoxb-[0-9]{10,}-[a-zA-Z0-9]{24} # Slack Bot Token
SG\.[a-zA-Z0-9-_]{22}\.[a-zA-Z0-9-_]{43} # SendGrid API Key
-----BEGIN (RSA |EC |DSA |OPENSSH )?PRIVATE KEY-----
-----BEGIN PGP PRIVATE KEY BLOCK-----
(postgres|mysql|mongodb)://[^\s'"]+:[^\s'"]+@
(password|secret|token|api_key|apikey)\s*[:=]\s*['"][^\s'"]{8,}['"]node_modules/.git/dist/build/████████j***@example.com~/[internal-host]~/.ssh~/.aws~/.envnetwork: noneshell: prompt*docker run --rm \
--network none \
--read-only \
--tmpfs /tmp:size=64m \
--cap-drop ALL \
--security-opt no-new-privileges \
-v "$(pwd):/workspace:ro" \
openclaw-sandboxdocker run --rm \
--network none \
--cap-drop ALL \
--security-opt no-new-privileges \
--memory 512m \
--cpus 1 \
--pids-limit 100 \
-v "$(pwd):/workspace" \
openclaw-sandbox| Flag | Purpose |
|---|---|
| Remove all Linux capabilities |
| Prevent privilege escalation |
| Disable network (default) |
| Limit memory |
| Limit CPU |
| Limit processes |
| Run as non-root |
--privileged~/.ssh~/.aws/etc~/.bashrc~/.zshrc~/.profile~/.ssh/authorized_keyscrontab -l.git/hooks/node_modulesSETUP AUDIT REPORT
==================
Workspace: <path>
Host agent: <tool>
VERDICT: READY / RISKY / NOT_READY
CHECKS:
[1] Credentials: <count> secrets found / clean
[2] Config: <issues found> / hardened
[3] Sandbox: ready / not configured
[4] Persistence: clean / suspicious
FINDINGS:
[CRITICAL] .env:3 — OpenAI API Key exposed
Action: Move to secret manager, add .env to .gitignore
[HIGH] mDNS broadcasting enabled
Action: Set gateway.mdns.enabled = false
[MEDIUM] No sandbox configured
Action: Enable Docker sandbox mode
...
FIX CHECKLIST (do these, re-run until READY):
[ ] Add .env to .gitignore
[ ] Rotate exposed API key sk-proj-...████
[ ] Create AGENTS.md with security policy
[ ] Enable sandbox mode
[ ] Set network: none as default
GENERATED FILES (review before applying):
.openclaw/sandbox/Dockerfile
.openclaw/sandbox/docker-compose.yml
AGENTS.md (template).gitignorenetwork.openclaw/sandbox/