security-sweep

👤 rhombusmaximus 📦 v1.1.2 ⭐ 4.5 ⬇️ 624 下载
🔒 IT运维与安全 免费

📖 技能介绍


name: security-sweep description: 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. version: 1.1.1


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:

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 ~/.openclaw/workspace/skills/security-sweep/scripts/quick-scan.sh \
  --dir "$HOME/.openclaw/workspace/skills"

Single Skill Scan

bash ~/.openclaw/workspace/skills/security-sweep/scripts/skill-scan.sh \
  --skill /path/to/skill

NPM Audit (workspace skills with package.json)

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

7w4.net小葱技能站收录全网优质技能,值得收藏。

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:

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

🤖 AI 评测

这个安全扫描工具功能比较全面,能自动检测代码中的秘密泄露、危险命令执行、依赖漏洞等问题,文档写得清晰详细,操作也不复杂。但检测的准确度还有提升空间,有时候会把正常内容误判为安全问题,而且使用某些高级功能需要先做一些额外配置。总体质量中上,适合需要定期检查代码安全性的用户使用。

📊 多维度评分

适应性4.8
规范性4.4
有效性4.5
可靠性4.5
可信度4.3

📁 包含文件 (8 个)

📄 README.md 4.6 KB
📄 SKILL.md 3.7 KB
📄 _meta.json 133 B
📄 references/notion-encryption.md 4.7 KB
📄 scripts/full-scan.sh 12.9 KB
📄 scripts/npm-audit.sh 1.8 KB
📄 scripts/quick-scan.sh 2.3 KB
📄 scripts/skill-scan.sh 3.8 KB