$npx -y skills add prompt-security/clawsec --skill clawsec-nanoclawUse when checking for security vulnerabilities in NanoClaw skills, before installing new skills, or when asked about security advisories affecting the bot
| 1 | # ClawSec for NanoClaw |
| 2 | |
| 3 | Security advisory monitoring that protects your WhatsApp bot from known vulnerabilities in skills and dependencies. |
| 4 | |
| 5 | ## Vercel Skills Installation |
| 6 | |
| 7 | Install with the Vercel Skills CLI for this harness: |
| 8 | |
| 9 | ```bash |
| 10 | npx skills add prompt-security/clawsec --skill clawsec-nanoclaw -a openclaw -y |
| 11 | ``` |
| 12 | |
| 13 | ## Overview |
| 14 | |
| 15 | 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. |
| 16 | |
| 17 | **Core principle:** Check before you install. Monitor what's running. |
| 18 | |
| 19 | ## When to Use |
| 20 | |
| 21 | Use ClawSec tools when: |
| 22 | - Installing a new skill (check safety first) |
| 23 | - User asks "are my skills secure?" |
| 24 | - Investigating suspicious behavior |
| 25 | - Regular security audits |
| 26 | - After receiving security notifications |
| 27 | |
| 28 | Do NOT use for: |
| 29 | - Code review (use other tools) |
| 30 | - Performance issues (different concern) |
| 31 | - General debugging |
| 32 | |
| 33 | ## MCP Tools Available |
| 34 | |
| 35 | ### Pre-Installation Check |
| 36 | |
| 37 | ```typescript |
| 38 | // Before installing any skill |
| 39 | const safety = await tools.clawsec_check_skill_safety({ |
| 40 | skillName: 'new-skill', |
| 41 | skillVersion: '1.0.0' // optional |
| 42 | }); |
| 43 | |
| 44 | if (!safety.safe) { |
| 45 | // Show user the risks before proceeding |
| 46 | console.warn(`Security issues: ${safety.advisories.map(a => a.id)}`); |
| 47 | } |
| 48 | ``` |
| 49 | |
| 50 | ### Security Audit |
| 51 | |
| 52 | ```typescript |
| 53 | // Check all installed skills (defaults to ~/.claude/skills in the container) |
| 54 | const result = await tools.clawsec_check_advisories({ |
| 55 | installRoot: '/home/node/.claude/skills' // optional |
| 56 | }); |
| 57 | |
| 58 | if (result.matches.some((m) => |
| 59 | m.advisory.severity === 'critical' || m.advisory.exploitability_score === 'high' |
| 60 | )) { |
| 61 | // Alert user immediately |
| 62 | console.error('Urgent advisories found!'); |
| 63 | } |
| 64 | ``` |
| 65 | |
| 66 | ### Browse Advisories |
| 67 | |
| 68 | ```typescript |
| 69 | // List advisories with filters |
| 70 | const advisories = await tools.clawsec_list_advisories({ |
| 71 | severity: 'high', // optional |
| 72 | exploitabilityScore: 'high' // optional |
| 73 | }); |
| 74 | ``` |
| 75 | |
| 76 | ## Quick Reference |
| 77 | |
| 78 | | Task | Tool | Key Parameter | |
| 79 | |------|------|---------------| |
| 80 | | Pre-install check | `clawsec_check_skill_safety` | `skillName` | |
| 81 | | Audit all skills | `clawsec_check_advisories` | `installRoot` (optional) | |
| 82 | | Browse feed | `clawsec_list_advisories` | `severity`, `type`, `exploitabilityScore` (optional) | |
| 83 | | Verify package signature | `clawsec_verify_skill_package` | `packagePath` | |
| 84 | | Refresh advisory cache | `clawsec_refresh_cache` | (none) | |
| 85 | | Check file integrity | `clawsec_check_integrity` | `mode`, `autoRestore` (optional) | |
| 86 | | Approve file change | `clawsec_approve_change` | `path` | |
| 87 | | View baseline status | `clawsec_integrity_status` | `path` (optional) | |
| 88 | | Verify audit log | `clawsec_verify_audit` | (none) | |
| 89 | |
| 90 | ## Common Patterns |
| 91 | |
| 92 | ### Pattern 1: Safe Skill Installation |
| 93 | |
| 94 | ```typescript |
| 95 | // ALWAYS check before installing |
| 96 | const safety = await tools.clawsec_check_skill_safety({ |
| 97 | skillName: userRequestedSkill |
| 98 | }); |
| 99 | |
| 100 | if (safety.safe) { |
| 101 | // Proceed with installation |
| 102 | await installSkill(userRequestedSkill); |
| 103 | } else { |
| 104 | // Show user the risks and get confirmation |
| 105 | await showSecurityWarning(safety.advisories); |
| 106 | if (await getUserConfirmation()) { |
| 107 | await installSkill(userRequestedSkill); |
| 108 | } |
| 109 | } |
| 110 | ``` |
| 111 | |
| 112 | ### Pattern 2: Periodic Security Check |
| 113 | |
| 114 | ```typescript |
| 115 | // Add to scheduled tasks |
| 116 | schedule_task({ |
| 117 | prompt: "Check advisories using clawsec_check_advisories and alert when critical or high-exploitability matches appear", |
| 118 | schedule_type: "cron", |
| 119 | schedule_value: "0 9 * * *" // Daily at 9am |
| 120 | }); |
| 121 | ``` |
| 122 | |
| 123 | ### Pattern 3: User Security Query |
| 124 | |
| 125 | ``` |
| 126 | User: "Are my skills secure?" |
| 127 | |
| 128 | You: I'll check installed skills for known vulnerabilities. |
| 129 | [Use clawsec_check_advisories] |
| 130 | |
| 131 | Response: |
| 132 | ✅ No urgent issues found. |
| 133 | - 2 low-severity/low-exploitability advisories |
| 134 | - All skills up to date |
| 135 | ``` |
| 136 | |
| 137 | ## Common Mistakes |
| 138 | |
| 139 | ### ❌ Installing without checking |
| 140 | ```typescript |
| 141 | // DON'T |
| 142 | await installSkill('untrusted-skill'); |
| 143 | ``` |
| 144 | |
| 145 | ```typescript |
| 146 | // DO |
| 147 | const safety = await tools.clawsec_check_skill_safety({ |
| 148 | skillName: 'untrusted-skill' |
| 149 | }); |
| 150 | if (safety.safe) await installSkill('untrusted-skill'); |
| 151 | ``` |
| 152 | |
| 153 | ### ❌ Ignoring exploitability context |
| 154 | ```typescript |
| 155 | // DON'T: Use severity only |
| 156 | if (advisory.severity === 'high') { |
| 157 | notifyNow(advisory); |
| 158 | } |
| 159 | ``` |
| 160 | |
| 161 | ```typescript |
| 162 | // DO: Use exploitability + severity |
| 163 | if ( |
| 164 | advisory.exploitability_score === 'high' || |
| 165 | advisory.severity === 'critical' |
| 166 | ) { |
| 167 | notifyNow(advisory); |
| 168 | } |
| 169 | ``` |
| 170 | |
| 171 | ### ❌ Skipping critical severity |
| 172 | ```typescript |
| 173 | // DON'T: Ignore high exploitability in medium severity advisories |
| 174 | if (advisory.severity === 'critical') alert(); |
| 175 | ``` |
| 176 | |
| 177 | ```typescript |
| 178 | // DO: Prioritize exploitability and severity together |
| 179 | if (advisory.exploitability_score === 'high' || advisory.severity === 'critical') { |
| 180 | // Alert immediately |
| 181 | } |
| 182 | ``` |
| 183 | |
| 184 | ## Implementation Details |