name: openclaw-skill-scanner description: Security gate for OpenClaw AgentSkills. Scans folder/ClawHub skills with cisco-ai-defense/skill-scanner before installation. Supports manual scans, staged installs, and auto-quarantine of high-risk skills via systemd. binaries: - uv - npx - git - systemctl env: - OPENCLAW_STATE_DIR - OPENCLAW_WORKSPACE_DIR
Harden OpenClaw’s skill supply chain:
- Scan skills with cisco-ai-defense/skill-scanner
- Block only on High/Critical
- Allow Medium/Low/Info but warn
- Auto-scan on changes to ~/.openclaw/skills
- Quarantine failing skills to ~/.openclaw/skills-quarantine
cd "$HOME/.openclaw/workspace"
# or wherever you keep repos
git clone https://github.com/cisco-ai-defense/skill-scanner
cd skill-scanner
CC=gcc uv sync --all-extras
Note: some environments try gcc-12 while building yara-python; forcing CC=gcc avoids that.
User skills live at:
- ~/.openclaw/skills
Run:
$HOME/.openclaw/skills/skill-scanner-guard/scripts/scan_openclaw_skills.sh7w4.net小蔥技能。
Outputs go to:
- /home/rev/.openclaw/workspace/skill_scans/
Use the wrapper instead of copying directly:
$HOME/.openclaw/skills/skill-scanner-guard/scripts/scan_and_add_skill.sh /path/to/skill-dir
Policy:
- Block only if High/Critical exist (unless --force)
- Still installs if only Medium/Low/Info exist, but prints a warning summary
Install to a staging dir, scan, then copy into ~/.openclaw/skills only if allowed:
$HOME/.openclaw/skills/skill-scanner-guard/scripts/clawhub_scan_install.sh <slug>
# optionally
$HOME/.openclaw/skills/skill-scanner-guard/scripts/clawhub_scan_install.sh <slug> --version <version>
Install the units (templates are in references/):
mkdir -p ~/.config/systemd/user
cp -a "$HOME/.openclaw/skills/skill-scanner-guard/references/openclaw-skill-scan."* ~/.config/systemd/user/
systemctl --user daemon-reload
systemctl --user enable --now openclaw-skill-scan.path
Behavior:
- Any change under ~/.openclaw/skills/ triggers scripts/auto_scan_user_skills.sh
- If High/Critical findings exist, the script moves failing skill directories to:
~/.openclaw/skills-quarantine/<skillname>-<timestamp>
- Reports are written to:
/home/rev/.openclaw/workspace/skill_scans/auto/
Inspect:
systemctl --user status openclaw-skill-scan.path
journalctl --user -u openclaw-skill-scan.service -n 100 --no-pager
ls -la ~/.openclaw/skills-quarantine
scan_openclaw_skills.sh: generate markdown reports for user + bundled skillsscan_and_add_skill.sh: scan candidate folder skill; install only if allowedclawhub_scan_install.sh: stage-install from ClawHub, scan, then installauto_scan_user_skills.sh: scan-all on ~/.openclaw/skills changes; quarantine High/Critical failuresopenclaw-skill-scan.path / openclaw-skill-scan.service: systemd --user path trigger units這是一個質量不錯且非常實用的 OpenClaw 安全工具。它能在安裝 skills 前自動掃描風險,對高危問題進行阻斷或隔離,保護系統安全。文件完善、流程清晰、使用簡單。稍有不佳的是腳本里有些硬編碼路徑可能在不同環境下出問題,以及依賴外部掃描工具。不過整體而言,這是一個值得信賴的安全加固工具。