Skip to main content

Security scanner for OpenClaw skills

Project description

๐Ÿ”’ Crabukit

Python 3.9+ License: MIT Code style: black

A security scanner for OpenClaw skills.

Crabukit analyzes OpenClaw skills for security vulnerabilities, malicious code patterns, prompt injection attempts, and supply chain risks before installation.

๐Ÿš€ Quick Start

# Install crabukit
pip install crabukit

# ๐Ÿ”’ Safely install a skill (downloads, scans, installs if safe)
crabukit install youtube-summarize

# Scan a skill before installing
crabukit scan ./my-skill/

# Scan an installed skill
crabukit scan /opt/homebrew/lib/node_modules/clawdbot/skills/suspicious-skill

# CI mode - fail on high severity
crabukit scan ./skill --fail-on=high

# JSON output for automation
crabukit scan ./skill --format=json

โœจ Features

๐Ÿ” Comprehensive Detection

Category Detections
Prompt Injection Direct, indirect, encoded, typoglycemia attacks
Code Vulnerabilities eval(), exec(), shell injection, path traversal
Secrets AWS keys, GitHub tokens, OpenAI keys, JWTs, private keys
AI Malware Self-modifying code, LLM API abuse (PROMPTFLUX patterns)
Supply Chain Typosquatting, homoglyphs, hidden files
Tool Misuse Dangerous tool combinations (Confused Deputy attacks)
Backdoors Cron jobs, SSH keys, persistent execution

๐Ÿ›ก๏ธ Unique Protections

  • Typoglycemia Detection: Catches scrambled-word attacks (ignroe โ†’ ignore)
  • Tool Combination Analysis: Detects browser + exec download-and-execute chains
  • Confused Deputy Protection: Prevents ReAct agent injection attacks
  • AI Malware Patterns: Identifies PROMPTFLUX-style self-modifying code

๐Ÿ“Š Example Output

๐Ÿ”’ Crabukit Security Report
โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”
Skill: malicious-skill
Files scanned: 3

  ๐Ÿ”ด CRITICAL   13
  ๐ŸŸ  HIGH        5
  ๐ŸŸก MEDIUM      6
  โšช INFO        1

Risk Level: CRITICAL
Score: 100/100

[CRITICAL] Dangerous tool combination: browser, exec
  Combination enables download-and-execute attack chains
  Fix: Remove unnecessary tools; implement confirmation

[CRITICAL] curl | bash pattern
  Downloads and executes remote code without verification
  Fix: Download to file, verify checksum, then execute

Recommendation: Do not install this skill.

๐Ÿ”Œ Clawdex Integration

Crabukit automatically detects and uses Clawdex when installed:

# Install Clawdex for database-based protection
clawdhub install clawdex

Defense in depth:

  • Layer 1: Clawdex checks 824+ known malicious skills (instant)
  • Layer 2: Crabukit behavior analysis catches zero-days

Example with both scanners:

โœ“ External scanners: Clawdex

โšช INFO
  โ†’ โœ… Clawdex: Verified safe
    Database reports 'skill-name' as BENIGN

๐ŸŸก MEDIUM
  โ†’ Destructive operation without warning
    (Crabukit behavior analysis)

๐Ÿ”ง Installation

Via pip

pip install crabukit

Via Homebrew (macOS/Linux)

brew tap moltatron/crabukit
brew install crabukit

As OpenClaw Skill

clawdbot install crabukit

Development

git clone https://github.com/troy/crabukit.git
cd crabukit
pip install -e ".[dev]"

๐Ÿ”’ Safe Install Wrapper (Recommended)

For the safest installation experience, use our wrapper script that combines Clawdex + Crabukit:

# Copy wrapper to your home directory
cp scripts/claw-safe-install.sh ~/.claw-safe-install.sh

# Add to your shell config
echo "source ~/.claw-safe-install.sh" >> ~/.zshrc

# Use it
claw-safe-install youtube-summarize
# or
csi youtube-summarize

Works with or without Clawdex installed. See scripts/README.md for details.

๐Ÿงช CI/CD Integration

GitHub Actions

name: Security Scan
on: [push, pull_request]

jobs:
  scan:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: troy/crabukit-action@v1
        with:
          skill-path: ./my-skill
          fail-on: high

Pre-commit Hook

repos:
  - repo: https://github.com/troy/crabukit
    rev: v0.2.0
    hooks:
      - id: crabukit-scan
        args: ['--fail-on=medium']

๐Ÿ“š Research-Based Detection

Crabukit's detection rules are based on:

  • OWASP Top 10 for LLM Applications (LLM01-LLM10)
  • Lakera AI Q4 2025 Research - Agent attack patterns
  • Google Threat Intelligence - PROMPTFLUX/PROMPTSTEAL malware
  • WithSecure Research - ReAct Confused Deputy attacks
  • arXiv:2410.01677 - Typoglycemia attacks on LLMs

See RESEARCH_SUMMARY.md for detailed references.

๐ŸŽฏ Use Cases

Before Installing a Skill

# Download and scan before installing
clawdbot download some-skill --to ./temp
crabukit scan ./temp/some-skill
# Review results, then decide to install

Auditing Installed Skills

# Scan all installed skills
for skill in /opt/homebrew/lib/node_modules/clawdbot/skills/*/; do
    crabukit scan "$skill" --fail-on=critical || echo "Issues in $skill"
done

CI/CD Security Gate

# Block PRs with critical/high issues
crabukit scan ./my-skill --fail-on=high
# Exit code 1 if issues found

๐Ÿ“– Documentation

๐Ÿค Contributing

We welcome contributions! Please see CONTRIBUTING.md for guidelines.

๐Ÿ›ก๏ธ Security

For security issues, please email security@crabukit.dev or see SECURITY.md.

๐Ÿ“œ License

MIT License - see LICENSE file.

๐Ÿ™ Acknowledgments

  • OpenClaw community for the skill ecosystem
  • OWASP GenAI Security Project
  • Researchers at Lakera AI, WithSecure, and Google Threat Intelligence

Built with ๐Ÿฆ€ by @tnbradley

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

crabukit-0.1.0.tar.gz (42.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

crabukit-0.1.0-py3-none-any.whl (39.0 kB view details)

Uploaded Python 3

File details

Details for the file crabukit-0.1.0.tar.gz.

File metadata

  • Download URL: crabukit-0.1.0.tar.gz
  • Upload date:
  • Size: 42.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.2

File hashes

Hashes for crabukit-0.1.0.tar.gz
Algorithm Hash digest
SHA256 ca3c9dc73c88f0e6bf901d74bb72fdc290c7fd4f4e9e7f094173f06d8e20fc97
MD5 45f657750427cefd352ea5bd8d5def45
BLAKE2b-256 26129c9ead6fd45ae38d03e90c53e2c5067290c98e1039cc560f325dd4876a87

See more details on using hashes here.

File details

Details for the file crabukit-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: crabukit-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 39.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.2

File hashes

Hashes for crabukit-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 47ce47ec91151a57ef6a666bca99ce7d99f13d6f6f1257796878cb23078c8c19
MD5 c9c893fa00953dd11667be90964647ff
BLAKE2b-256 dca2e90577488538434f3d4a26cfac8bc45509c3f992bb042d49ab98a328b23d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page