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 (Recommended)

pip install crabukit

As OpenClaw Skill

clawdbot install crabukit

Development

git clone https://github.com/tnbradley/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
      - name: Install crabukit
        run: pip install crabukit
      - name: Scan skill
        run: crabukit scan ./my-skill --fail-on=high

Pre-commit Hook

repos:
  - repo: https://github.com/tnbradley/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 use GitHub's private vulnerability reporting:
https://github.com/tnbradley/crabukit/security/advisories
Or see SECURITY.md for details.

๐Ÿ“œ 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.3.tar.gz (45.0 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.3-py3-none-any.whl (39.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: crabukit-0.1.3.tar.gz
  • Upload date:
  • Size: 45.0 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.3.tar.gz
Algorithm Hash digest
SHA256 5b89220068a8ad62315d656ee4ddad63f36718ecaa90784d1ec6bda8280aa46b
MD5 616c3d25fefd9c129edfe9431fbac537
BLAKE2b-256 65e2f24945d6478ac53a13793980152cfcf236d26fcb64a905f280aefcbb78c0

See more details on using hashes here.

File details

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

File metadata

  • Download URL: crabukit-0.1.3-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.3-py3-none-any.whl
Algorithm Hash digest
SHA256 be36f458f5812a91bebde77898c44851e157104e8a4884c7719035b3f3f2ae87
MD5 b2674f67cd541f3128f55e02a1cdffb3
BLAKE2b-256 d851ce9cd579377cd421dedff2f5438607e1b42ecb49a4679600b9334cf5a09b

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