360 Secure SkillHub
360 安全技能中心

Openclaw Skill Scanner

该技能用于在安装前扫描本地或暂存的 ClawHub 技能,通过 cisco-ai-defense/skill-scanner 报告 High/Critical 发现,并可选地将高风险技能隔离到受管目录之外。支持文件系统扫描和通过 OpenClaw CLI 的目录扫描,提供 systemd 监视器模板。

jason-allen-oneal
jason-allen-oneal
热度 69.60
最近更新 2026-09-18 11:57:36
分类:安全依赖:代码执行 / 读写文件 / 第三方 API应用场景:工作流 / 自动化脚本 / 报告撰写

安装技能

复制下面的话术发给你的 Agent,它会通过 secure-skills 检索并安装该技能。

执行命令安装此 skill: npx secure-skills-cli add skill-scanner-guard
Metadata
name
openclaw-skill-scanner
description
Scan local or staged ClawHub skills before installation; report High/Critical findings and optionally quarantine managed skills. A scan is not proof of safety.
metadata
{"openclaw":{"requires":{"bins":["bash","python3","uv"]}}}

Skill Scanner Guard

Use a separately reviewed installation of cisco-ai-defense/skill-scanner. The default scanner checkout is <workspace>/skill-scanner; override it with SKILL_SCANNER_DIR. These scripts do not establish that a scanner checkout, OpenClaw installation, or candidate skill is trustworthy. Do not execute a candidate skill as part of review.

Scan before installing

bash {baseDir}/scripts/scan_and_add_skill.sh /absolute/path/to/skill
bash {baseDir}/scripts/clawhub_scan_install.sh publisher/skill --version VERSION

ClawHub staging additionally requires npx. Downloads stay in a private staging directory outside the default skill roots. Existing destination folders are not replaced. High/Critical findings block; Medium/Low/Info findings allow with a warning. --force overrides findings only, never scanner errors or incomplete severity summaries. --tag is rejected rather than silently ignored.

These are explicit wrappers, not an interception hook for openclaw skills install, ClawHub installs performed elsewhere, skill updates, or Workshop apply. Never describe a successful scan as a safety guarantee.

Scan installed skills

bash {baseDir}/scripts/scan_openclaw_skills.sh
bash {baseDir}/scripts/scan_openclaw_skills.sh --only-roots /path/to/skill/root
bash {baseDir}/scripts/scan_openclaw_skills.sh --catalog --agent main

Filesystem-only mode checks managed, default workspace, project .agents, default-state personal .agents, workshop, and discoverable bundled sources. Grouped skills are discovered up to six levels deep, stopping at SKILL.md. Symlink skill directories require explicit review; discovery errors are not reported as a successful complete scan.

--catalog explicitly executes the installed OpenClaw CLI. Use it only with an installation you trust. It uses skills list --json and skills info --json to include configured agent workspaces and extra/plugin/bundled sources. It does not inspect every user's private library, disconnected nodes, remote hosts, or shadowed skills outside the selected roots. Unavailable local manifests fail inventory creation. No candidate skill code is executed by discovery.

Paths

OPENCLAW_HOME, OPENCLAW_STATE_DIR, OPENCLAW_PROFILE, and OPENCLAW_WORKSPACE_DIR select the layout. Named profiles do not inherit the default personal .agents/skills root. The legacy .clawdbot state fallback is retained when neither an explicit state nor a named profile is selected.

Wrapper overrides: OPENCLAW_SKILLS_DIR, OPENCLAW_QUARANTINE_DIR, OPENCLAW_STAGE_DIR, SKILL_SCANNER_DIR, SKILL_SCANNER_REPORT_DIR, OPENCLAW_BUNDLED_SKILLS_DIR, and OPENCLAW_BIN (one executable, not a shell command). Per-agent configuration is resolved through explicit catalog mode, not by guessing or evaluating OpenClaw configuration files.

Reports default to <workspace>/skill_scans; managed installs to <state>/skills; quarantine to <state>/skills-quarantine.

Optional systemd watcher

The units in references/ are templates for the default Linux user layout. Review the ExecStart and watched paths before enabling them, especially with a profile, custom workspace, or renamed installation directory. Environment variables are not expanded inside systemd path directives. A path unit is not a recursive watcher and does not guarantee interception before a skill loads.

auto_scan_user_skills.sh scans grouped managed skills individually and quarantines High/Critical results outside the managed skill tree. It never accepts quarantine paths from report text. Failed scans and malformed reports return nonzero without declaring skills safe. Cross-filesystem quarantine is refused rather than performed as a non-atomic copy/delete.

See COMPATIBILITY.md for the upstream reference and test scope.