OpenClaw Security Guard
简介
OpenClaw Security Guard
原始描述
This skill should be used when the user asks to harden agent workflows, audit prompts/commands/URLs/paths, scan a third-party skill before install or publish...
通过你的 Agent 添加
安装目录:openclaw-security-guard/(目录名取自 SKILL.md 的 frontmatter name,不是 URL 里的 slug)。
点「快速安装」复制一段指令贴给你的 Agent:它会先下载到 /tmp、把文件清单和校验值给你看,你确认之后才解压安装。不会一步装完、也不改系统其它位置。
或者手动安装
包是「根级 SKILL.md + 作者附带的文件」,解压到上面的 <slug>/ 目录即可;
目录名不用换,也不要把包直接解压到 skills 根目录。
技能申请的权限由作者决定:装之前先看清单里有没有脚本、它会读写什么。
技能正文
name: openclaw-security-guard
description: Lightweight OpenClaw security guard for auditing prompts, commands, URLs, file paths, outbound content, and skill folders for prompt injection, command injection, SSRF, path traversal, hardcoded secrets, exfiltration patterns, and unsafe installer/publish scripts. Use when hardening agent workflows, reviewing third-party skills, scanning a skill before ClawHub publish/install, checking user-provided content for dangerous patterns, or adding a minimal local security layer without a heavy external security suite.
OpenClaw Security Guard
Use this skill to run fast local security checks before trusting or publishing automation.
What this skill is for
Run this skill when you need to:
- scan suspicious text for prompt injection / secret leakage patterns
- validate shell commands before automation or publishing
- validate URLs for SSRF / localhost / metadata access risks
- validate file paths for traversal / sensitive file access
- audit a skill folder for dangerous scripts, hardcoded secrets, exfiltration patterns, or unsafe install/publish flows
- add a lightweight self-defense layer before using external skills
Workflow
- Choose the narrowest check needed.
- Run one of the bundled scripts.
- Treat
BLOCK as stop-work until reviewed.
- Treat
WARN as requiring human review or a narrower sandbox.
- For skill audits, review the flagged file lines before install/publish.
Bundled scripts
1) Quick text / command / URL / path checks
node {baseDir}/scripts/security-check.mjs text "<content>"
node {baseDir}/scripts/security-check.mjs command "<shell command>"
node {baseDir}/scripts/security-check.mjs url "<url>"
node {baseDir}/scripts/security-check.mjs path "<path>"
2) Skill / folder audit
BLOCK as stop-work until reviewed.WARN as requiring human review or a narrower sandbox.1) Quick text / command / URL / path checks
node {baseDir}/scripts/security-check.mjs text "<content>"
node {baseDir}/scripts/security-check.mjs command "<shell command>"
node {baseDir}/scripts/security-check.mjs url "<url>"
node {baseDir}/scripts/security-check.mjs path "<path>"
node {baseDir}/scripts/audit-skill-dir.mjs /absolute/or/relative/path/to/skill
3) Write audit into Obsidian vault
node {baseDir}/scripts/write-obsidian-audit.mjs /tmp/audit.json "Skill Audit - my-skill"
node {baseDir}/scripts/write-obsidian-audit.mjs /tmp/audit.json "Skill Audit - my-skill"
This writes a markdown audit note into the ClawLite Obsidian vault under Security Audits/.
4) Install lightweight local hook wrapper
bash {baseDir}/scripts/install-hooks.sh
bash {baseDir}/scripts/install-hooks.sh
This installs a reusable workspace script for prepublish checks.
This audits for:
- hardcoded secrets / tokens
- curl|bash / wget|sh installers
- destructive shell patterns
- risky exfiltration / webhook / netcat usage
- suspicious file targets like
~/.ssh,/etc/passwd,.env,id_rsa
Verdicts
ALLOW — no high-risk pattern found in this lightweight pass
WARN — review manually before proceeding
BLOCK — do not trust / run / publish until reviewed
Important limits
- This is a lightweight guard, not a full sandbox.
- Regex-based detection catches common dangerous patterns, not all attacks.
- A clean result does not prove safety.
- For high-risk code, still prefer human review and runtime isolation.
Publishing / install guard
ALLOW — no high-risk pattern found in this lightweight passWARN — review manually before proceedingBLOCK — do not trust / run / publish until reviewed- This is a lightweight guard, not a full sandbox.
- Regex-based detection catches common dangerous patterns, not all attacks.
- A clean result does not prove safety.
- For high-risk code, still prefer human review and runtime isolation.
Publishing / install guard
Before publishing or installing a skill from GitHub / ClawHub:
- run
audit-skill-dir.mjs - inspect every
WARN/BLOCK - only proceed when the remaining risk is understood
References
If you need the audit categories / philosophy, read:
{baseDir}/references/checklist.md
正文来自原始发布页, 版权归作者所有,许可未标注。 权利人认为有不妥,可申请下架。