Skill Sandbox
Sandboxed installation pipeline for ClawHub skills. Install → Stage → Scan → Promote or Quarantine.
Quick Start
# Install a skill (stages, scans, auto-promotes if clean)
bash {baseDir}/scripts/skill-sandbox.sh <skill-name>
# Install a specific version
bash {baseDir}/scripts/skill-sandbox.sh <skill-name> --version 1.2.0
# Force install (bypass VirusTotal flags from clawhub)
bash {baseDir}/scripts/skill-sandbox.sh <skill-name> --force
# Re-scan a staged skill
bash {baseDir}/scripts/skill-sandbox.sh <skill-name> --scan-only
# Promote a quarantined skill after manual review
bash {baseDir}/scripts/skill-sandbox.sh <skill-name> --promote
# List all quarantined skills
bash {baseDir}/scripts/skill-sandbox.sh --list-staged
How It Works
- Stage — Skill is installed to
skills/_staging/<name> (never directly to live)
- Scan — 5-layer automated security scan runs:
- File inventory (hidden files, symlinks, binaries)
- Code pattern analysis (eval, exec, network calls, secret access, obfuscation)
- SKILL.md instruction review (dangerous agent directives)
- Dependency check (package.json install scripts, known-risky deps)
- Publisher verification (metadata, origin registry)
- Verdict:
- ✅ PASS (0 findings) → auto-promoted to
skills/
- ⚠️ WARN (warnings only) → quarantined, manual review recommended
- ❌ FAIL (critical findings) → quarantined, deep audit required
Scan Details
Critical Findings (auto-quarantine)
eval(), new Function() — dynamic code execution
- Symlinks — path traversal risk
postinstall / preinstall scripts in package.json — npm supply chain vector
- Dangerous SKILL.md instructions (disable security, exfiltrate, reverse shells, chmod 777)
Warning Findings (review recommended)
- Network calls (
fetch, curl, axios, http)
- Shell execution (
child_process, exec, spawn, subprocess)
- Environment/secret access (
process.env, API_KEY, TOKEN)
- Base64 encoding patterns (potential obfuscation)
- File system writes
- Hidden files (excluding
.clawhub/)
- Non-text binary files
Integration with Agent Workflows
For teams using security auditor agents (like Sentinel), the recommended flow:
- Run
skill-sandbox.sh for the fast automated scan
- If WARN or FAIL → spawn your security agent for a deep LLM-powered audit of the staged files
- After agent clears it →
skill-sandbox.sh <name> --promote
Directory Structure
skills/
├── _staging/ ← quarantine area (gitignored)
│ └── <skill>/ ← flagged skills live here until promoted
├── skill-sandbox/ ← this skill
│ ├── SKILL.md
│ └── scripts/
│ └── skill-sandbox.sh
└── <other-skills>/ ← promoted (live) skills
Notes
- The
_staging/ directory should be added to .gitignore
- Clean skills auto-promote — no manual step needed for safe installs
- The script returns exit codes: 0 (pass/warn), 2 (fail) for CI integration
- All scan patterns are static regex — no network calls, no external dependencies
1---2name: skill-sandbox3description: Sandboxed ClawHub skill installation with automated security scanning. Use when: (1) Installing any new skill from ClawHub, (2) Auditing an already-installed skill, (3) Promoting a quarantined skill after review. Installs skills to a staging area, runs a multi-layer static security scan (file inventory, code patterns, dangerous instructions, dependency analysis, publisher verification), then auto-promotes clean skills or quarantines flagged ones for manual review. Prevents supply chain attacks from untrusted skill publishers.4---56# Skill Sandbox78Sandboxed installation pipeline for ClawHub skills. Install → Stage → Scan → Promote or Quarantine.910## Quick Start1112```bash13# Install a skill (stages, scans, auto-promotes if clean)14bash {baseDir}/scripts/skill-sandbox.sh <skill-name>1516# Install a specific version17bash {baseDir}/scripts/skill-sandbox.sh <skill-name> --version 1.2.01819# Force install (bypass VirusTotal flags from clawhub)20bash {baseDir}/scripts/skill-sandbox.sh <skill-name> --force2122# Re-scan a staged skill23bash {baseDir}/scripts/skill-sandbox.sh <skill-name> --scan-only2425# Promote a quarantined skill after manual review26bash {baseDir}/scripts/skill-sandbox.sh <skill-name> --promote2728# List all quarantined skills29bash {baseDir}/scripts/skill-sandbox.sh --list-staged30```3132## How It Works33341. **Stage** — Skill is installed to `skills/_staging/<name>` (never directly to live)352. **Scan** — 5-layer automated security scan runs:36 - File inventory (hidden files, symlinks, binaries)37 - Code pattern analysis (eval, exec, network calls, secret access, obfuscation)38 - SKILL.md instruction review (dangerous agent directives)39 - Dependency check (package.json install scripts, known-risky deps)40 - Publisher verification (metadata, origin registry)413. **Verdict:**42 - ✅ **PASS** (0 findings) → auto-promoted to `skills/`43 - ⚠️ **WARN** (warnings only) → quarantined, manual review recommended44 - ❌ **FAIL** (critical findings) → quarantined, deep audit required4546## Scan Details4748### Critical Findings (auto-quarantine)49- `eval()`, `new Function()` — dynamic code execution50- Symlinks — path traversal risk51- `postinstall` / `preinstall` scripts in package.json — npm supply chain vector52- Dangerous SKILL.md instructions (disable security, exfiltrate, reverse shells, chmod 777)5354### Warning Findings (review recommended)55- Network calls (`fetch`, `curl`, `axios`, `http`)56- Shell execution (`child_process`, `exec`, `spawn`, `subprocess`)57- Environment/secret access (`process.env`, `API_KEY`, `TOKEN`)58- Base64 encoding patterns (potential obfuscation)59- File system writes60- Hidden files (excluding `.clawhub/`)61- Non-text binary files6263## Integration with Agent Workflows6465For teams using security auditor agents (like Sentinel), the recommended flow:66671. Run `skill-sandbox.sh` for the fast automated scan682. If WARN or FAIL → spawn your security agent for a deep LLM-powered audit of the staged files693. After agent clears it → `skill-sandbox.sh <name> --promote`7071## Directory Structure7273```74skills/75├── _staging/ ← quarantine area (gitignored)76│ └── <skill>/ ← flagged skills live here until promoted77├── skill-sandbox/ ← this skill78│ ├── SKILL.md79│ └── scripts/80│ └── skill-sandbox.sh81└── <other-skills>/ ← promoted (live) skills82```8384## Notes8586- The `_staging/` directory should be added to `.gitignore`87- Clean skills auto-promote — no manual step needed for safe installs88- The script returns exit codes: 0 (pass/warn), 2 (fail) for CI integration89- All scan patterns are static regex — no network calls, no external dependencies