Install
openclaw skills install skll-scanSecurity scanning tool for OpenClaw Skills. Detects malicious code patterns, extracts domains, and checks threat intelligence APIs. Use when: installing new...
openclaw skills install skll-scanSkill Scan is a security tool that analyzes OpenClaw Skills for potentially malicious code and threat intelligence indicators before installation or during audits.
python3 ~/.openclaw/skills/skill-scan/scripts/skill-scan.py <skill-path>
# Scan a specific Skill
python3 ~/.openclaw/skills/skill-scan/scripts/skill-scan.py ~/.openclaw/extensions/mem9
# Scan all installed Skills
for skill in ~/.openclaw/extensions/*/; do
echo "Scanning: $skill"
python3 ~/.openclaw/skills/skill-scan/scripts/skill-scan.py "$skill"
done
# Scan before installation
tar -xzf new-skill.tgz -C /tmp/skill-check/
python3 ~/.openclaw/skills/skill-scan/scripts/skill-scan.py /tmp/skill-check/
| Level | Meaning | Action |
|---|---|---|
| 🟢 low | Only routine network requests | Safe to install |
| 🟡 medium | Contains exec/system calls | Review code manually |
| 🔴 high | Suspicious domains/malicious patterns | ⚠️ Do NOT install |
============================================================
📊 Skill Security Scan Report
============================================================
Skill Path: /path/to/skill
Risk Level: low
Total Findings: 2
Domains Checked: 1
📋 Findings by Category:
- network: 2
📝 Details:
[network] /path/to/file.ts:30
const resp = await fetch(this.baseUrl + "/v1alpha1/mem9s", {
============================================================
exec(), execSync(), spawn()child_process, subprocess.*os.system(), shell_exec()fetch(), axios.*http.get, https.getrequests.*, urllib.requestXMLHttpRequestfs.writeFile, fs.readFile, fs.unlinkopen(..., 'w')shutil.(copy|move|remove)process.env, process.argvos.environsecret=, password=, token=, api_key=| Source | Type | API |
|---|---|---|
| Abuse.ch URLhaus | Malicious domains/IPs | https://urlhaus-api.abuse.ch/ |
| AbuseIPDB | IP reputation | https://www.abuseipdb.com/api |
| Local Blacklist | Known malicious domains | Built-in |
| Source | Type | API |
|---|---|---|
| VirusTotal | Files/URLs/Domains | https://www.virustotal.com/api/ |
| AlienVault OTX | Threat intelligence | https://otx.alienvault.com/api |
| Google Safe Browsing | Malicious websites | https://safebrowsing.googleapis.com/ |
To enable additional threat intelligence APIs, edit the script and add your API keys:
THREAT_INTEL_APIS = {
"virustotal": {
"url": "https://www.virustotal.com/api/v3/domains/",
"key_param": "x-apikey",
"api_key": "YOUR_API_KEY" # Add your key here
}
}
Add to your CI/CD pipeline:
#!/bin/bash
# Pre-installation security check
SKILL_PATH=$1
REPORT=$(python3 ~/.openclaw/skills/skill-scan/scripts/skill-scan.py "$SKILL_PATH")
if echo "$REPORT" | grep -q "Risk Level: high"; then
echo "❌ Security check failed: High risk detected"
exit 1
fi
echo "✅ Security check passed"
Create a cron job for weekly audits:
# /etc/cron.d/skill-scan
0 2 * * 1 niuqun python3 ~/.openclaw/skills/skill-scan/scripts/skill-scan.py ~/.openclaw/extensions/* >> /var/log/skill-scan.log
Solution: Ensure Python 3 is installed and script has execute permission
chmod +x ~/.openclaw/skills/skill-scan/scripts/skill-scan.py
Solution: Check network connection or API key validity
curl -I https://urlhaus-api.abuse.ch/
Solution: Adjust detection patterns in the script or add domains to whitelist
Contributions welcome! Please:
MIT License - See LICENSE file for details
Remember: This tool is a first line of defense. Always combine with manual code review and other security measures for critical systems.