360 Secure SkillHub
360 安全技能中心

SafeInstall

本地优先的安装前安全扫描器,可按 ClawHub slug 或本地目录扫描技能,运行依赖漏洞、静态分析、凭据泄露、YARA 恶意模式、IOC 匹配、行为分析和提示注入共 7 项检查,对照 9 个威胁情报源,输出 pass/warn/fail 判定与结构化 JSON 报告。

jchandler187
jchandler187
热度 20.70
最近更新 2026-05-24 06:18:31
分类:安全依赖:代码执行 / 读写文件 / 第三方 API应用场景:代码审查 / DevOps / 工作流 / 报告撰写

安装技能

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

执行命令安装此 skill: npx secure-skills-cli add safeinstall
Metadata
name
safeinstall
description
Pre-install security audit and vulnerability scanner for ClawHub skills -- scan by slug or local path, 9 threat intel sources, 7 checks including malware scanning, dependency vulnerabilities, and credential leak detection.
version
2.5.0
metadata
{"openclaw":{"emoji":"⚡","homepage":"https://github.com/jchandler187/clawsec","requires":{"bins":["python3","clawhub"],"anyBins":["gitleaks","semgrep","yara"]},"install":[{"kind":"node","package":"@lowwattlabs/clawsec","bins":["clawsec"]}],"envVars":[{"name":"CLAWSEC_HOME","required":false,"description":"Base directory for intel cache and reports (default: ~/.clawsec)"},{"name":"CLAWSEC_INTEL_DIR","required":false,"description":"Override intel cache directory (default: CLAWSEC_HOME/intel)"},{"name":"CLAWSEC_REPORTS_DIR","required":false,"description":"Override reports output directory (default: CLAWSEC_HOME/reports)"}]}}

⚡ SafeInstall

SafeInstall is a local-first security scanner for ClawHub skills. It runs 7 autonomous checks against 9 live threat intelligence feeds and returns a structured verdict -- pass, warn, or fail -- before you install.

Unlike instruction-card security skills that tell agents what to look for, SafeInstall actually runs the checks: dependency lookups against CISA KEV and OSV, credential scanning with Gitleaks, malware pattern matching with YARA, IOC matching against ThreatFox/URLhaus/MalwareBazaar/Feodo, behavioral analysis for eval and injection patterns, and prompt injection detection in SKILL.md files.

All scanning is offline. No telemetry. No phone-home. No data leaves your machine.

When to use

  • Before installing a skill from ClawHub -- verify it is safe
  • Before publishing your own skills -- catch issues early
  • When reviewing skills for your team or organization
  • As part of CI/CD or pipeline validation
  • When you want to verify a skill is safe before trusting it with your environment
  • Any time an agent encounters an untrusted skill and needs a security check

Quick start

safeinstall scan weather-forecast        # Scan by ClawHub slug
safeinstall scan ./my-skill              # Scan a local skill directory
safeinstall scan ./my-skill --checks dep-scan,secret-scan
safeinstall scan ./my-skill --json       # JSON output for pipelines

First run sets up a Python venv and syncs threat intel automatically. After that, scanning works with zero configuration.

How it works

SafeInstall downloads the skill to a sandboxed 0700 temp directory, strips execute bits from all files, suppresses npm install scripts, runs all enabled checks against the local intel cache, produces a structured JSON report with findings, and cleans up the downloaded skill.

Exit codes: 0 = pass, 1 = warn, 2 = fail

Checks

Check What it does
dep-scan Cross-references dependencies against CISA KEV and OSV databases
static-analysis Runs Semgrep rules for security anti-patterns (offline, no phone-home)
secret-scan Scans for hardcoded API keys, tokens, and credentials using Gitleaks
yara-scan Matches files against YARA rules for malware patterns
ioc-match Matches IPs, domains, URLs, and file hashes against ThreatFox, URLhaus, MalwareBazaar, and Feodo Tracker
behavioral Detects eval usage, shell injection, data exfiltration vectors, DNS tunneling
prompt-inject Detects prompt injection and instruction-hiding patterns in SKILL.md

Threat intel sources (9)

CISA KEV, OSV (npm + PyPI), EPSS, MalwareBazaar, URLhaus, ThreatFox, Feodo Tracker, YARA Rules, Semgrep Rules

Run clawsec sync to refresh the intel cache. First scan auto-syncs if no cache exists.

Parameters

When an agent invokes this skill through OpenClaw:

  • target (required) -- Local directory path or ClawHub skill slug. If a slug is given, the skill is downloaded to a sandboxed temp directory, scanned, and removed.
  • checks (optional) -- Comma-separated list: dep-scan, static-analysis, secret-scan, yara-scan, ioc-match, behavioral, prompt-inject. Default: all 7.
  • json (optional) -- Output results as JSON for programmatic use.

Security and Privacy

  • No telemetry, no phone-home, no analytics. All scanning is local.
  • During scan, zero network requests. All intel is read from the local cache.
  • During sync, only public threat intel feeds are contacted. No skill code or scan targets are ever transmitted externally.
  • Slug scans are sandboxed: 0700 temp dir, execute bits stripped, npm scripts suppressed, cleaned up after scanning.

Local files

  • Read: ~/.clawsec/intel/ (threat intel cache), skill directory passed as target
  • Written: ~/.clawsec/intel/, ~/.clawsec/reports/, ~/.clawsec/venv/, ~/.clawsec/clawsec.log
  • First sync downloads approximately 50-100 MB of threat intel data

Install

npm install -g @lowwattlabs/clawsec

Or let OpenClaw install it via the skill install spec above.

License

MIT-0