SenseGuard
Scans OpenClaw skills for natural language security threats — the kind that VirusTotal and traditional code scanners cannot detect.
Traditional scanners see SKILL.md as a text file. SenseGuard sees it as agent instructions and checks for prompt injection, data exfiltration, obfuscation, and persistence attacks.
How to Use
When the user asks to scan a skill:
CODEBLOCK0
Options:
- -
--target all — scan all installed skills - INLINECODE1 — force LLM semantic analysis (Layer 2)
- INLINECODE2 — skip cached results
- INLINECODE3 — output raw JSON for further processing
Layer 2 (Semantic Analysis)
When --json output contains a layer2_prompt field, process it as a security audit task, then feed the JSON result back to generate the final score. This is how the LLM analyzes intent beyond regex patterns.
Output
The scanner outputs a Markdown risk report with:
- - Score (0-100) and rating: SAFE / CAUTION / DANGEROUS / MALICIOUS
- Findings with rule IDs, evidence text, and line numbers
- Actionable recommendations
For CRITICAL findings, clearly advise the user to take action.
Key Differentiator
SenseGuard catches what VirusTotal cannot:
- -
"ignore all previous instructions" — prompt injection - INLINECODE7 hidden in Markdown — data exfiltration
- Zero-width characters hiding commands — obfuscation
- INLINECODE8 — persistence attacks
These are invisible to traditional malware scanners because they target the AI agent, not the operating system.
SenseGuard
扫描OpenClaw技能中的自然语言安全威胁——即VirusTotal和传统代码扫描器无法检测的那类威胁。
传统扫描器将SKILL.md视为文本文件。SenseGuard将其视为智能体指令,并检查是否存在提示注入、数据窃取、混淆和持久化攻击。
使用方法
当用户要求扫描某个技能时:
bash
python3 scripts/scanner.py --target <技能名称或路径>
选项:
- - --target all — 扫描所有已安装的技能
- --deep — 强制进行LLM语义分析(第二层)
- --no-cache — 跳过缓存结果
- --json — 输出原始JSON以供进一步处理
第二层(语义分析)
当--json输出包含layer2_prompt字段时,将其作为安全审计任务处理,然后将JSON结果反馈回来以生成最终评分。这就是LLM如何分析超越正则表达式模式的意图。
输出
扫描器输出一份Markdown格式的风险报告,包含:
- - 评分(0-100)和评级:安全 / 谨慎 / 危险 / 恶意
- 带有规则ID、证据文本和行号的发现项
- 可操作的建议
对于严重发现项,明确建议用户采取行动。
核心差异化优势
SenseGuard能捕获VirusTotal无法检测的内容:
- - 忽略所有先前指令 — 提示注入
- 隐藏在Markdown中的curl -X POST — 数据窃取
- 隐藏命令的零宽字符 — 混淆
- 修改MEMORY.md — 持久化攻击
这些对传统恶意软件扫描器来说是不可见的,因为它们针对的是AI智能体,而非操作系统。