OpenClaw Security Hardening
Protect OpenClaw installations from prompt injection, data exfiltration, malicious skills, and workspace tampering
Protect OpenClaw installations from prompt injection, data exfiltration, malicious skills, and workspace tampering
Real data. Real impact.
Emerging
Developers
Per week
Open source
Skills give you superpowers. Install in 30 seconds.
A comprehensive security toolkit for protecting OpenClaw installations from attacks via malicious skill files, prompt injection, data exfiltration, and workspace tampering.
This skill protects against:
| Threat | Description | Tool |
|---|---|---|
| Prompt Injection | Malicious skills containing instructions to override system prompts, ignore safety rules, or manipulate agent behavior | |
| Data Exfiltration | Skills that instruct the agent to send sensitive data (credentials, memory, config) to external endpoints | |
| Skill Tampering | Unauthorized modification of installed skills after initial review | |
| Workspace Exposure | Sensitive files with wrong permissions, missing .gitignore rules, insecure gateway config | |
| Supply Chain | Installing a new skill that contains hidden malicious patterns | |
# Run a full security scan of all installed skills ./scripts/scan-skills.shAudit outbound data flow patterns
./scripts/audit-outbound.sh
Initialize integrity baseline
./scripts/integrity-check.sh --init
Harden your workspace
./scripts/harden-workspace.sh --fix
Check a new skill before installing
./scripts/install-guard.sh /path/to/new-skill/
scan-skills.sh — Skill File ScannerScans all installed skill files for malicious patterns including prompt injection, data exfiltration attempts, suspicious URLs, hidden unicode, obfuscated commands, and social engineering.
Usage:
# Scan all skill directories ./scripts/scan-skills.shScan a specific directory only
./scripts/scan-skills.sh --path /path/to/skills/
Output as JSON for automation
./scripts/scan-skills.sh --json
Show help
./scripts/scan-skills.sh --help
What it detects:
Severity levels:
integrity-check.sh — Skill Integrity MonitorCreates SHA256 hash baselines of all skill files and detects unauthorized modifications.
Usage:
# Initialize baseline (first run) ./scripts/integrity-check.sh --initCheck for changes (run periodically)
./scripts/integrity-check.sh
Update baseline after reviewing changes
./scripts/integrity-check.sh --update
Check specific directory
./scripts/integrity-check.sh --path /path/to/skills/
Show help
./scripts/integrity-check.sh --help
Reports:
Automation: Add to your heartbeat or cron to run daily:
# In HEARTBEAT.md or cron 0 8 * * * /path/to/scripts/integrity-check.sh 2>&1 | grep -E '(MODIFIED|NEW|REMOVED)'
audit-outbound.sh — Outbound Data Flow AuditorScans skill files for patterns that could cause data to leave your machine.
Usage:
# Audit all skills ./scripts/audit-outbound.shAudit specific directory
./scripts/audit-outbound.sh --path /path/to/skills/
Show whitelisted domains
./scripts/audit-outbound.sh --show-whitelist
Add domain to whitelist
./scripts/audit-outbound.sh --whitelist example.com
Show help
./scripts/audit-outbound.sh --help
Detects:
harden-workspace.sh — Workspace HardenerChecks and fixes common security misconfigurations in your OpenClaw workspace.
Usage:
# Check only (report issues) ./scripts/harden-workspace.shAuto-fix safe issues
./scripts/harden-workspace.sh --fix
Show help
./scripts/harden-workspace.sh --help
Checks:
install-guard.sh — Pre-Install Security GateRun before installing any new skill to check for malicious content.
Usage:
# Check a skill before installing ./scripts/install-guard.sh /path/to/new-skill/Strict mode (fail on warnings too)
./scripts/install-guard.sh --strict /path/to/new-skill/
Show help
./scripts/install-guard.sh --help
Checks:
Copy
assets/security-rules-template.md into your AGENTS.md to add runtime security rules for your agent. These rules instruct the agent to refuse prompt injection attempts and protect sensitive data.
cat assets/security-rules-template.md >> /path/to/AGENTS.md
Initial setup:
./scripts/scan-skills.sh # Scan existing skills ./scripts/audit-outbound.sh # Audit outbound patterns ./scripts/integrity-check.sh --init # Create baseline ./scripts/harden-workspace.sh --fix # Fix workspace issues
Add security rules to AGENTS.md from the template
Before installing new skills:
./scripts/install-guard.sh /path/to/new-skill/
Periodic checks (add to heartbeat or cron):
./scripts/integrity-check.sh # Detect tampering ./scripts/scan-skills.sh # Re-scan for new patterns
No automatic installation available. Please visit the source repository for installation instructions.
View Installation Instructions1,500+ AI skills, agents & workflows. Install in 30 seconds. Part of the Torly.ai family.
© 2026 Torly.ai. All rights reserved.