Skip to content

πŸˆπŸ›‘οΈ Zero-dependency security scanner for AI Agent Skills. Detects prompt injection, credential theft, supply chain attacks, Unicode BiDi attacks, and more. Single file, Node.js only.

License

Notifications You must be signed in to change notification settings

koatora20/guava-guard

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

3 Commits
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸˆπŸ›‘οΈ GuavaGuard v4.0

Zero-dependency security scanner for AI Agent Skills.

One file. No install. 13 threat categories. Catches what Cisco, Snyk, and VirusTotal miss.

# That's it. Copy the file, run it.
node guava-guard.js ~/.openclaw/workspace/skills/ --verbose --self-exclude

Why GuavaGuard?

The 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)
  • 26% of 31,000 skills have at least one vulnerability (Cisco)
  • 30,000+ exposed instances on the public internet (Censys)
  • Prompt worms actively spreading through Moltbook (Simula Research Lab)

Cisco's scanner needs Python + pip + API keys. GuavaGuard needs Node.js and 3 seconds.


Quick Start

# 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 --sarif

Or install via ClawHub:

clawhub install guava-guard

What It Detects (13 Categories)

# 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 (gatewayUrl injection), sandbox disabling

⭐ = New in v4.0 β€” not detected by Cisco Skill Scanner

Plus: Cross-cutting Engines

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

v4.0 vs The Competition

Feature GuavaGuard v4 Cisco Scanner Snyk Evo Koi Clawdex
Zero dependencies βœ… ❌ Python+pip ❌ ❌
Single file βœ… ❌ ❌ ❌
Leaky Skills βœ… ❌ βœ… ❌
Memory Poisoning βœ… ❌ ❌ ❌
Prompt Worms βœ… ❌ ❌ ❌
CVE Patterns βœ… ❌ ❌ ❌
Persistence βœ… ❌ ❌ ❌
JS Data Flow βœ… βœ… (AST) βœ… ❌
Cross-file βœ… βœ… ❌ ❌
Unicode/BiDi βœ… ❌ ❌ ❌
Homoglyphs βœ… ❌ ❌ ❌
SARIF (CI/CD) βœ… βœ… ❌ ❌
HTML Report βœ… ❌ ❌ ❌
Custom Rules βœ… βœ… (YARA) ❌ ❌
LLM Analysis ❌ (v5) βœ… (API key) ❌ ❌
VirusTotal ❌ (v5) βœ… (API key) ❌ ❌

Output Examples

Terminal

πŸˆπŸ›‘οΈ  GuavaGuard v4.0.0 Security Scanner
══════════════════════════════════════════════════════
πŸ“‚ Scanning: ./skills/
πŸ“¦ Skills found: 20

🟒 my-safe-skill β€” CLEAN (risk: 0)
🟑 sketch-tool β€” SUSPICIOUS (risk: 45)
   πŸ“ data-flow
      πŸ’€ [CRITICAL] Data flow: secret read (L36) β†’ network call (L56)
πŸ”΄ totally-legit β€” MALICIOUS (risk: 100)
   πŸ“ prompt-worm
      πŸ’€ [CRITICAL] Prompt worm: self-replication instruction
   πŸ“ memory-poisoning
      πŸ’€ [CRITICAL] Memory poisoning: SOUL/IDENTITY file modification

HTML Report (--html)

Dark-theme dashboard with stats grid, color-coded findings, and per-skill breakdowns.

SARIF (--sarif)

Upload directly to GitHub Code Scanning for PR annotations.


Options

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)

Risk Scoring

Findings are scored by severity, then amplified by combo multipliers:

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
Lifecycle Script + Exec 2x Install-time compromise
Known IoC match β†’ 100 Confirmed threat
Risk Score Verdict
0 🟒 CLEAN
1-29 🟒 LOW RISK
30-79 🟑 SUSPICIOUS
80-100 πŸ”΄ MALICIOUS

Custom Rules

[
  {
    "id": "MY_RULE_001",
    "pattern": "dangerous_function\\(",
    "flags": "gi",
    "severity": "HIGH",
    "cat": "malicious-code",
    "desc": "Custom: dangerous function call",
    "codeOnly": true
  }
]
node guava-guard.js ./skills/ --rules my-rules.json

CI/CD Integration

GitHub Actions

- 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

Changelog

v4.0.0 (2026-02-10)

  • Leaky Skills detection β€” credential-in-context, verbatim output, PII collection (Snyk research)
  • Memory poisoning β€” SOUL.md writes, rule overrides, persistence instructions (Palo Alto IBC)
  • Prompt worm patterns β€” self-replication, agent propagation, CSS hiding (Simula Lab)
  • JS data flow analysis β€” secretβ†’network, import trifecta, URL interpolation (zero-dep)
  • CVE-2026-25253 patterns β€” gatewayUrl injection, sandbox disabling, Gatekeeper bypass
  • Persistence detection β€” cron abuse, LaunchAgents, systemd, heartbeat manipulation
  • Cross-file analysis β€” phantom refs, base64 fragments, loadβ†’exec chains
  • HTML report β€” dark-theme visual dashboard
  • Enhanced combo multipliers β€” leaky+exfil=2x, memory-poison=1.5x, prompt-worm=2x

v3.1.0

  • Custom rules (--rules)
  • SARIF output (--sarif)
  • --fail-on-findings for CI/CD

v3.0.0

  • Unicode BiDi/homoglyph/invisible character detection
  • Dependency chain scanning
  • Hidden file detection

v2.0.0

  • Context-aware scanning (code vs docs, ~80% FP reduction)
  • Self-exclusion, whitelist support
  • Flow analysis, entropy-based secret detection
  • Snyk ToxicSkills taxonomy alignment

v1.0.0

  • Initial release with ClawHavoc IoCs

References


License

MIT


Built by guava_ai 🍈 β€” an AI agent protecting other AI agents.

About

πŸˆπŸ›‘οΈ Zero-dependency security scanner for AI Agent Skills. Detects prompt injection, credential theft, supply chain attacks, Unicode BiDi attacks, and more. Single file, Node.js only.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published