Skill Differ
Compare two versions of an OpenClaw skill to find security-relevant changes before updating.
Why This Exists
A skill that was clean at v1.0 could add credential stealing in v1.1. The skill scanner catches known bad patterns in a single version. The differ catches new capabilities between versions — things a skill couldn't do before but can do now.
Commands
Diff two skill directories
CODEBLOCK0
Diff with JSON output
CODEBLOCK1
Quick summary only (no file details)
CODEBLOCK2
What It Detects
New Capabilities Added
- - Network access (skill didn't make HTTP requests before, now it does)
- Credential access (didn't read env vars or API keys before, now it does)
- File system access (wasn't touching home directory, now it is)
- Code execution patterns (eval/exec that didn't exist before)
- Data exfiltration (new outbound POST requests)
- Obfuscation (new encoded/obfuscated content)
File Changes
- - New files added (especially in scripts/)
- Deleted files (could remove safety checks)
- Modified files with security-relevant diffs
Recommendations
- - SAFE — No new security-relevant capabilities. Update freely.
- REVIEW — New capabilities detected. Read the changes before updating.
- BLOCK — Critical new capabilities (code execution, credential access). Manual audit required.
Tips
- - Always diff before updating any third-party skill
- Pair with skill-scanner: scan before first install, diff before every update
- Pay attention to new files — attackers add payloads in new scripts
- If a "bug fix" update adds network access, that's suspicious
技能差异分析工具
在更新前,比较OpenClaw技能的两个版本,以发现与安全相关的变更。
存在原因
一个在v1.0版本中安全的技能可能在v1.1版本中添加凭证窃取功能。技能扫描器能检测单个版本中的已知不良模式,而差异分析工具能发现版本间的新能力——即技能之前无法做到但如今可以做到的事情。
命令
对比两个技能目录
bash
python3 {baseDir}/scripts/differ.py diff --old ~/.openclaw/skills/some-skill/ --new /tmp/some-skill-v2/
输出JSON格式的差异结果
bash
python3 {baseDir}/scripts/differ.py diff --old ./v1/ --new ./v2/ --json
仅显示快速摘要(不包含文件详情)
bash
python3 {baseDir}/scripts/differ.py diff --old ./v1/ --new ./v2/ --summary
检测内容
新增能力
- - 网络访问(技能之前不发起HTTP请求,现在可以)
- 凭证访问(之前不读取环境变量或API密钥,现在可以)
- 文件系统访问(之前不触碰主目录,现在可以)
- 代码执行模式(之前不存在的eval/exec)
- 数据外泄(新的出站POST请求)
- 混淆处理(新的编码/混淆内容)
文件变更
- - 新增文件(尤其在scripts/目录下)
- 删除文件(可能移除安全检查)
- 包含安全相关差异的修改文件
建议
- - 安全——未发现新的安全相关能力。可自由更新。
- 需审查——检测到新能力。更新前请阅读变更内容。
- 阻止——关键新能力(代码执行、凭证访问)。需进行手动审计。
提示
- - 更新任何第三方技能前务必进行差异分析
- 与技能扫描器配合使用:首次安装前扫描,每次更新前进行差异分析
- 注意新增文件——攻击者会在新脚本中添加恶意载荷
- 如果bug修复更新增加了网络访问功能,这很可疑