360 Secure SkillHub
360 安全技能中心

SafeHub

SafeHub 是面向 OpenClaw Skill 的安全扫描器:对技能名称、本地路径或 GitHub 仓库运行 Semgrep 静态分析,并在 Docker 可用时执行沙箱行为观察,汇总网络、文件系统、eval/exec、环境变量与混淆类发现,给出 0-100 信任分及安装建议;另支持回看历史报告和更新规则。

sumeetghimire
sumeetghimire
热度 56.89
最近更新 2026-05-18 12:17:31
分类:安全依赖:代码执行 / 读写文件 / 第三方 API应用场景:代码审查 / DevOps / 自动化脚本 / 报告撰写

安装技能

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

执行命令安装此 skill: npx secure-skills-cli add safehub
Metadata
name
safehub
description
Scan OpenClaw skills for malware and security issues before installation. Use when the user wants to verify a skill is safe, audit a ClawHub skill, or check a local or GitHub skill.
version
1.0.2
author
sumeetghimire
metadata
{"openclaw":{"emoji":"🛡️","requires":{"bins":["node","semgrep","git"]},"os":["darwin","linux","win32"]}}

SafeHub

SafeHub is a security scanner for OpenClaw skills. It runs static analysis (Semgrep) and optional sandbox execution (Docker) on any skill—by name, local path, or GitHub URL—and returns a trust score and a clear recommendation: safe to install, install with caution, or not safe.

Requirements

These binaries must be on your PATH (declared in registry metadata):

  • Node.js (18+) — required to run the CLI.
  • Semgrep — required for the scan command (static analysis). Install with brew install semgrep or npm install -g semgrep.
  • git — required when the scan target is a GitHub URL (used to clone the repo).

Optional:

  • Docker — used for sandbox execution. If Docker is not available, use --no-sandbox for static-only scanning.

Environment variables

All of these are optional. No secrets or API tokens are required by default.

Variable Default Effect
SAFEHUB_RULES_REPO safehub/safehub GitHub repo (owner/repo) used by safehub update to fetch and overwrite local rule files in ./rules. Setting this to another repo makes the updater pull rules from that repo — use only repos you trust.
SAFEHUB_RULES_BRANCH main Branch name used when fetching rules (with SAFEHUB_RULES_REPO).
SAFEHUB_DATA_DIR ~/.safehub Directory for cached scan reports (e.g. ~/.safehub/reports).
SAFEHUB_SANDBOX_IMAGE node:18-alpine Docker image used for the sandbox when scanning.
SAFEHUB_SANDBOX_TIMEOUT_MS 30000 Timeout (ms) for the sandbox run before the container is killed.
SAFEHUB_NO_TYPING (unset) Set to 1 to disable the typing-effect output (e.g. in CI or pipes).

Important: SAFEHUB_RULES_REPO controls where safehub update downloads rules from and overwrites local ./rules; only point it at a repo you trust.

Commands

All commands are run via the safehub CLI (e.g. safehub scan <target> or node index.js scan <target> from the skill directory).

scan

Scan a skill by ClawHub name, local path, or GitHub URL.

Examples:

safehub scan web-scraper
safehub scan ./my-local-skill
safehub scan https://github.com/user/their-skill
safehub scan https://github.com/BenedictKing/tavily-web --no-sandbox

Options:

  • --no-sandbox — Skip Docker sandbox; run static analysis only (use when Docker is not installed).

report

Show the last scan report for a skill without rescanning.

Examples:

safehub report web-scraper
safehub report risky-skill

update

Pull the latest Semgrep scanner rules from the SafeHub GitHub repo (or your fork via SAFEHUB_RULES_REPO).

Examples:

safehub update
SAFEHUB_RULES_REPO=owner/repo safehub update

Example output

After running safehub scan <target>, you’ll see:

  • Static analysis — Findings from Semgrep (network, filesystem, eval/exec, env, obfuscation).
  • Sandbox behavior — Whether the skill attempted network access or suspicious actions (when Docker is used).
  • Trust score (0–100) and recommendation: SAFE TO INSTALL, INSTALL WITH CAUTION, or NOT SAFE TO INSTALL.

Installation (users)

Install from ClawHub:

clawhub install safehub

Or install the CLI globally from npm:

npm install -g safehub

Then run safehub scan <target> (if the CLI is on PATH) or node index.js scan <target> from the skill directory.