返回顶部
s

security-sweep

Security scanner for OpenClaw skills and plugins. Scans for hardcoded secrets, dangerous exec patterns, dependency vulnerabilities, and network egress. Use when auditing installed skills/plugins, before publishing to ClawHub, or when a user requests a security review of skills or plugins.

作者: admin | 来源: ClawHub
源自
ClawHub
版本
V 1.1.2
安全检测
已通过
96
下载量
0
收藏
概述
安装方式
版本历史

security-sweep

# Security Sweep — Skill & Plugin Auditor Scans OpenClaw skills and plugins for: 1. **Hardcoded secrets** — API keys, tokens, passwords in code 2. **Dangerous exec patterns** — shell injection, eval, unsanitized child_process calls 3. **Dependency vulnerabilities** — npm audit failures 4. **Network egress** — unexpected outbound connections 5. **Input injection** — unsanitized user input reaching exec/file/eval ## Scan Scope **Built-in skills** (read-only, bundled with OpenClaw CLI): ``` $(brew --prefix)/Cellar/openclaw-cli/<version>/libexec/lib/node_modules/openclaw/skills/ ``` **Workspace skills** (user-installed): ``` ~/.openclaw/workspace/skills/ ``` ## Workflow ### Full Sweep Run the comprehensive scan script: ```bash SKILLS_DIR="$(brew --prefix)/Cellar/openclaw-cli/2026.3.24/libexec/lib/node_modules/openclaw/skills" WS_DIR="$HOME/.openclaw/workspace/skills" REPORT_DATE=$(date +%Y%m%d_%H%M%S) REPORT_FILE="$HOME/.openclaw/security-sweep-${REPORT_DATE}.txt" bash ~/.openclaw/workspace/skills/security-sweep/scripts/full-scan.sh \ --builtin "$SKILLS_DIR" \ --workspace "$WS_DIR" \ --output "$REPORT_FILE" ``` ### Quick Scan (fast patterns only) ```bash bash ~/.openclaw/workspace/skills/security-sweep/scripts/quick-scan.sh \ --dir "$HOME/.openclaw/workspace/skills" ``` ### Single Skill Scan ```bash bash ~/.openclaw/workspace/skills/security-sweep/scripts/skill-scan.sh \ --skill /path/to/skill ``` ### NPM Audit (workspace skills with package.json) ```bash bash ~/.openclaw/workspace/skills/security-sweep/scripts/npm-audit.sh \ --workspace "$HOME/.openclaw/workspace/skills" ``` ## Risk Categories | Level | Finding | Action | |-------|---------|--------| | 🔴 CRITICAL | Hardcoded secret (api_key, token, password) | Remove immediately, rotate credential | | 🔴 CRITICAL | `eval()` on untrusted input | Replace with safe alternative | | 🟠 HIGH | `exec()`, `spawn()` with string concatenation | Use execFile with array args | | 🟠 HIGH | Shell injection surface (bash -c, ${var} in shell) | Sanitize or use execFile | | 🟡 MEDIUM | npm audit findings (any severity) | Review and update dependencies | | 🟡 MEDIUM | Unexpected network egress | Verify necessity, document purpose | | 🟢 LOW | File permission too broad (0o777) | Restrict to 0o644/0o755 | | 🟢 INFO | process.env leak in logs | Ensure logs redact env vars | ## Reporting Reports are saved to `~/.openclaw/security-sweep-<date>.txt`. Include report path in memory after each scan. ## Periodic Scanning Offer to schedule weekly security sweeps via cron: ```bash openclaw cron add \ --name "security-sweep" \ --every 604800 \ --sessionTarget isolated \ --payload '{"kind":"agentTurn","message":"Run security sweep on all skills. Report findings. Save report to ~/.openclaw/security-sweep-<date>.txt and note in memory/YYYY-MM-DD.md if any critical issues found."}' ``` ## Sharing / ClawHub Publishing Before publishing a skill to ClawHub: 1. Run full sweep 2. Fix all CRITICAL/HIGH findings 3. Verify no secrets in SKILL.md or any scripts 4. Confirm npm audit passes with 0 vulnerabilities 5. Document all required env vars in SKILL.md ## Notes - Bundled skills (read-only, no write during scan) - Workspace skills are editable — fix findings directly - Some `execFile` usage is legitimate (openclaw CLI calls) — review context - `process.env` access is fine; concern is env vars *leaking* to untrusted processes

标签

skill ai

通过对话安装

该技能支持在以下平台通过对话安装:

OpenClaw WorkBuddy QClaw Kimi Claude

方式一:安装 SkillHub 和技能

帮我安装 SkillHub 和 security-sweep-1776028981 技能

方式二:设置 SkillHub 为优先技能安装源

设置 SkillHub 为我的优先技能安装源,然后帮我安装 security-sweep-1776028981 技能

通过命令行安装

skillhub install security-sweep-1776028981

下载 Zip 包

⬇ 下载 security-sweep v1.1.2

文件大小: 12.47 KB | 发布时间: 2026-4-13 11:54

v1.1.2 最新 2026-4-13 11:54
Fix set -u crash: scan_skill output now captured via tail -1 to isolate return values from progress printf. Fixes unbound variable error on command-center and other complex skills.

Archiver·手机版·闲社网·闲社论坛·羊毛社区· 多链控股集团有限公司 · 苏ICP备2025199260号-1

Powered by Discuz! X5.0   © 2024-2025 闲社网·线报更新论坛·羊毛分享社区·http://xianshe.com

p2p_official_large
返回顶部