Skip to content

mladjan/Sclawhub

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

1 Commit
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ¦žπŸ›‘οΈ SClawHub - Security Scanner for OpenClaw Skills

Open source security scanner and browser extension for OpenClaw AI agent skills

License: MIT Website

The Problem

OpenClaw skills have full access to your system, files, APIs, and credentials. Installing an untrusted skill could result in:

  • 🚨 Data exfiltration
  • πŸ”‘ Stolen API keys
  • πŸ’Ύ Unauthorized file access
  • ⚑ Arbitrary code execution

Trust, but verify.

The Solution

SClawHub provides automated security scanning for OpenClaw skills:

βœ… Pattern Matching - Semgrep rules for known vulnerabilities
βœ… AI Analysis - Claude AI for context-aware security review
βœ… Trust Scores - 0-100 rating based on findings
βœ… Browser Extension - Instant trust badges on ClawHub

Visit sclawhub.com to see scanned skills and detailed reports.


πŸ“ What's Included

This open source repository contains:

1. Scanner (scanner/)

Core security scanning engine that analyzes skill code for vulnerabilities.

2. Browser Extension (extension/)

Chrome extension that shows trust badges directly on ClawHub pages.

3. Security Rules (scanner/rules/)

Semgrep patterns for detecting common security issues.

4. Demo Skills (demo-skills/)

Example skills for testing the scanner.

Note: The web application (sclawhub.com) is not included in this repository.


πŸš€ Quick Start

Prerequisites

  • Node.js 18+
  • Semgrep: pip3 install semgrep
  • Anthropic API key (for Claude AI analysis)

1. Scanner Setup

cd scanner
npm install

# Set your API key
export ANTHROPIC_API_KEY="your-key-here"

# Scan a skill
node scan.js "https://raw.githubusercontent.com/user/repo/main/skill.js" "Skill Name"

Results are saved to scanner/reports/{skill-name}.json

2. Browser Extension Setup

cd extension

# Load in Chrome:
1. Open chrome://extensions/
2. Enable "Developer mode"
3. Click "Load unpacked"
4. Select the extension/ directory

# Package for distribution:
zip -r sclawhub-extension.zip extension/

πŸ” What the Scanner Checks

The scanner looks for:

Category Description
🌐 Network Calls Unknown endpoints, data exfiltration attempts
πŸ”‘ Credentials Hardcoded API keys, tokens, passwords
πŸ“ File Operations Unsafe read/write/delete operations
⚑ Code Execution eval(), exec(), spawn() patterns
πŸ”’ Obfuscation Base64 encoding, minification attempts
πŸ’‰ Injection SQL injection, command injection patterns

πŸ› οΈ Usage

Scan a Skill from URL

cd scanner
node scan.js "https://github.com/example/skill/blob/main/index.js" "Example Skill"

Scan Local Code

node scan.js ./path/to/skill.js "My Skill"

Example Output

{
  "id": "example-skill",
  "trustScore": 85,
  "riskLevel": "low",
  "summary": "Minimal risk detected. Follows security best practices.",
  "findings": [
    {
      "severity": "info",
      "category": "network",
      "description": "Makes HTTP call to api.example.com",
      "recommendation": "Verify endpoint ownership"
    }
  ]
}

🎨 Browser Extension

The extension injects trust badges on ClawHub:

  • πŸ›‘οΈ 90-100 - Excellent security
  • βœ… 70-89 - Good, minor concerns
  • ⚠️ 50-69 - Moderate risk, review needed
  • 🚨 0-49 - High risk, do not install

Click any badge to see the full security report on sclawhub.com.


πŸ“Š Trust Score Calculation

Trust scores are calculated based on:

  1. Semgrep Findings - Pattern matching results
  2. Claude AI Analysis - Context-aware security review
  3. Severity Weighting - Critical > High > Medium > Low
  4. Code Complexity - Simpler code = higher trust
  5. Best Practices - Following OpenClaw conventions

Score ranges:

  • 90-100: Excellent - Minimal risk
  • 70-89: Good - Minor concerns
  • 50-69: Moderate - Needs review
  • 30-49: High risk - Multiple issues
  • 0-29: Critical - Do not install

πŸ”§ Environment Variables

Create a .env file in the scanner/ directory:

# Required for AI-powered analysis
ANTHROPIC_API_KEY=your-claude-api-key-here

Get your API key from console.anthropic.com


🀝 Contributing

Contributions are welcome! Here's how you can help:

Report Issues

Found a bug or false positive? Open an issue

Improve Rules

Add new Semgrep patterns to scanner/rules/semgrep-rules.yaml

Test Skills

Submit skills for scanning and review results

Code Contributions

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

πŸ“ Adding New Security Rules

Edit scanner/rules/semgrep-rules.yaml:

rules:
  - id: custom-security-check
    pattern: dangerous_function($ARG)
    message: "Potentially unsafe function call detected"
    severity: WARNING
    languages: [javascript, typescript]
    metadata:
      category: security
      cwe: "CWE-78"

Run the scanner to test your new rule!


πŸ—οΈ Project Structure

sclawhub-opensource/
β”œβ”€β”€ scanner/              # Core security scanner
β”‚   β”œβ”€β”€ scan.js          # Main scanner script
β”‚   β”œβ”€β”€ lib/             # Claude AI integration
β”‚   β”‚   └── claude.js
β”‚   β”œβ”€β”€ rules/           # Semgrep security rules
β”‚   β”‚   └── semgrep-rules.yaml
β”‚   β”œβ”€β”€ reports/         # Scan results (JSON)
β”‚   └── package.json
β”‚
β”œβ”€β”€ extension/           # Browser extension
β”‚   β”œβ”€β”€ manifest.json   # Extension config
β”‚   β”œβ”€β”€ content.js      # Badge injection
β”‚   β”œβ”€β”€ popup.html      # Popup UI
β”‚   β”œβ”€β”€ popup.js
β”‚   └── background.js
β”‚
β”œβ”€β”€ demo-skills/        # Example skills for testing
β”‚   β”œβ”€β”€ safe-skill.js
β”‚   └── risky-skill.js
β”‚
β”œβ”€β”€ scripts/            # Utility scripts
β”œβ”€β”€ .gitignore
β”œβ”€β”€ LICENSE             # MIT License
└── README.md

πŸ§ͺ Testing

Test the scanner with demo skills:

cd scanner
node scan.js ../demo-skills/safe-skill.js "Safe Test"
node scan.js ../demo-skills/risky-skill.js "Risky Test"

Compare the trust scores and findings!


πŸ“š Resources


πŸ”’ Security

Reporting Vulnerabilities

Found a security issue? Please email: kondormit@gmail.com

Do not open public issues for security vulnerabilities.

False Positives

If the scanner reports a false positive:

  1. Review the finding details
  2. Check the Semgrep rule that triggered it
  3. Open an issue with the skill code and scan results
  4. We'll update the rules to improve accuracy

πŸ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.


πŸ‘¨β€πŸ’» Author

Mladjan Antic (@kondormit)


πŸ™ Acknowledgments

  • OpenClaw community for building amazing AI agents
  • Semgrep for powerful pattern matching
  • Anthropic for Claude AI
  • All contributors who help improve security

⭐ Show Your Support

If this project helped you, please consider:

  • ⭐ Starring the repository
  • 🐦 Sharing on Twitter
  • 🀝 Contributing improvements
  • πŸ“ Writing about it

Built with 🦞 for the OpenClaw community.


🚦 Status

  • βœ… Scanner: Production ready
  • βœ… Extension: Chrome Web Store (pending approval)
  • βœ… Security Rules: 20+ patterns
  • βœ… AI Analysis: Claude Sonnet 4.5
  • πŸ”„ Continuous improvement

Version: 1.0.0
Last Updated: February 2026

About

πŸ¦žπŸ›‘οΈ Security scanner for OpenClaw AI agent skills

Topics

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors