ClawSec for NanoClaw
Security advisory monitoring that protects your WhatsApp bot from known vulnerabilities in skills and dependencies.
Overview
ClawSec provides MCP tools that check installed skills against a curated feed of security advisories. It prevents installation of vulnerable skills, includes exploitability context for triage, and alerts you to issues in existing ones.
Core principle: Check before you install. Monitor what's running.
When to Use
Use ClawSec tools when:
- - Installing a new skill (check safety first)
- User asks "are my skills secure?"
- Investigating suspicious behavior
- Regular security audits
- After receiving security notifications
Do NOT use for:
- - Code review (use other tools)
- Performance issues (different concern)
- General debugging
MCP Tools Available
Pre-Installation Check
CODEBLOCK0
Security Audit
CODEBLOCK1
Browse Advisories
CODEBLOCK2
Quick Reference
| Task | Tool | Key Parameter |
|---|
| Pre-install check | INLINECODE0 | INLINECODE1 |
| Audit all skills |
clawsec_check_advisories |
installRoot (optional) |
| Browse feed |
clawsec_list_advisories |
severity,
type,
exploitabilityScore (optional) |
| Verify package signature |
clawsec_verify_skill_package |
packagePath |
| Refresh advisory cache |
clawsec_refresh_cache | (none) |
| Check file integrity |
clawsec_check_integrity |
mode,
autoRestore (optional) |
| Approve file change |
clawsec_approve_change |
path |
| View baseline status |
clawsec_integrity_status |
path (optional) |
| Verify audit log |
clawsec_verify_audit | (none) |
Common Patterns
Pattern 1: Safe Skill Installation
CODEBLOCK3
Pattern 2: Periodic Security Check
CODEBLOCK4
Pattern 3: User Security Query
CODEBLOCK5
Common Mistakes
❌ Installing without checking
CODEBLOCK6
CODEBLOCK7
❌ Ignoring exploitability context
CODEBLOCK8
CODEBLOCK9
❌ Skipping critical severity
CODEBLOCK10
CODEBLOCK11
Implementation Details
Feed Source: https://clawsec.prompt.security/advisories/feed.json
Update Frequency: Every 6 hours (automatic)
Signature Verification: Ed25519 signed feeds
Package Verification Policy: pinned key only, bounded package/signature paths
Cache Location: INLINECODE19
See INSTALL.md for setup and docs/ for advanced usage.
Real-World Impact
- - Prevents installation of skills with known RCE vulnerabilities
- Alerts to supply chain attacks in dependencies
- Provides actionable remediation steps
- Zero false positives (curated feed only)
技能名称: clawsec-nanoclaw
详细描述:
NanoClaw 的 ClawSec 安全监控
安全公告监控,保护您的 WhatsApp 机器人免受技能和依赖项中已知漏洞的影响。
概述
ClawSec 提供 MCP 工具,可根据精选的安全公告源检查已安装的技能。它能阻止安装存在漏洞的技能,提供可利用性上下文用于分类,并提醒您现有技能中的问题。
核心原则: 安装前先检查。监控正在运行的内容。
使用时机
在以下情况下使用 ClawSec 工具:
- - 安装新技能时(先检查安全性)
- 用户询问“我的技能安全吗?”
- 调查可疑行为时
- 定期安全审计时
- 收到安全通知后
不要在以下情况下使用:
- - 代码审查(使用其他工具)
- 性能问题(属于不同关注点)
- 常规调试
可用的 MCP 工具
预安装检查
typescript
// 在安装任何技能之前
const safety = await tools.clawseccheckskill_safety({
skillName: new-skill,
skillVersion: 1.0.0 // 可选
});
if (!safety.safe) {
// 在继续之前向用户展示风险
console.warn(安全问题: ${safety.advisories.map(a => a.id)});
}
安全审计
typescript
// 检查所有已安装的技能(默认为容器中的 ~/.claude/skills)
const result = await tools.clawseccheckadvisories({
installRoot: /home/node/.claude/skills // 可选
});
if (result.matches.some((m) =>
m.advisory.severity === critical || m.advisory.exploitability_score === high
)) {
// 立即提醒用户
console.error(发现紧急公告!);
}
浏览公告
typescript
// 使用过滤器列出公告
const advisories = await tools.clawseclistadvisories({
severity: high, // 可选
exploitabilityScore: high // 可选
});
快速参考
| 任务 | 工具 | 关键参数 |
|---|
| 预安装检查 | clawseccheckskillsafety | skillName |
| 审计所有技能 |
clawseccheck_advisories | installRoot(可选) |
| 浏览源 | clawsec
listadvisories | severity、type、exploitabilityScore(可选) |
| 验证包签名 | clawsec
verifyskill_package | packagePath |
| 刷新公告缓存 | clawsec
refreshcache | (无) |
| 检查文件完整性 | clawsec
checkintegrity | mode、autoRestore(可选) |
| 批准文件更改 | clawsec
approvechange | path |
| 查看基线状态 | clawsec
integritystatus | path(可选) |
| 验证审计日志 | clawsec
verifyaudit | (无) |
常见模式
模式 1:安全技能安装
typescript
// 安装前务必检查
const safety = await tools.clawseccheckskill_safety({
skillName: userRequestedSkill
});
if (safety.safe) {
// 继续安装
await installSkill(userRequestedSkill);
} else {
// 向用户展示风险并获取确认
await showSecurityWarning(safety.advisories);
if (await getUserConfirmation()) {
await installSkill(userRequestedSkill);
}
}
模式 2:定期安全检查
typescript
// 添加到计划任务
schedule_task({
prompt: 使用 clawseccheckadvisories 检查公告,并在出现严重或高可利用性匹配时发出警报,
schedule_type: cron,
schedule_value: 0 9 * // 每天上午 9 点
});
模式 3:用户安全查询
用户: 我的技能安全吗?
您: 我将检查已安装技能是否存在已知漏洞。
[使用 clawseccheckadvisories]
响应:
✅ 未发现紧急问题。
- - 2 个低严重性/低可利用性公告
- 所有技能均为最新版本
常见错误
❌ 未检查即安装
typescript
// 不要这样做
await installSkill(untrusted-skill);
typescript
// 应该这样做
const safety = await tools.clawseccheckskill_safety({
skillName: untrusted-skill
});
if (safety.safe) await installSkill(untrusted-skill);
❌ 忽略可利用性上下文
typescript
// 不要这样做:仅使用严重性
if (advisory.severity === high) {
notifyNow(advisory);
}
typescript
// 应该这样做:使用可利用性 + 严重性
if (
advisory.exploitability_score === high ||
advisory.severity === critical
) {
notifyNow(advisory);
}
❌ 跳过严重级别
typescript
// 不要这样做:忽略中等严重性公告中的高可利用性
if (advisory.severity === critical) alert();
typescript
// 应该这样做:同时优先考虑可利用性和严重性
if (advisory.exploitability_score === high || advisory.severity === critical) {
// 立即发出警报
}
实现细节
源地址: https://clawsec.prompt.security/advisories/feed.json
更新频率: 每 6 小时(自动)
签名验证: Ed25519 签名源
包验证策略: 仅固定密钥,限定包/签名路径
缓存位置: /workspace/project/data/clawsec-advisory-cache.json
有关设置,请参阅 INSTALL.md;有关高级用法,请参阅 docs/。
实际影响
- - 阻止安装具有已知 RCE 漏洞的技能
- 对依赖项中的供应链攻击发出警报
- 提供可操作的修复步骤
- 零误报(仅限精选源)