่ทณ่‡ณไธป่ฆๅ†…ๅฎน
ๅฐ้พ™่™พๅฐ้พ™่™พAI
๐Ÿค–

ClawScan

Security scanner for ClawHub skills. Vet third-party skills before installation โ€” detect dangerous patterns, suspicious code, and risky dependencies.

ไธ‹่ฝฝ2.4k
ๆ˜Ÿๆ ‡2
็‰ˆๆœฌ2.0.0
general
ๅฎ‰ๅ…จ้€š่ฟ‡
โš™๏ธ่„šๆœฌ

ๆŠ€่ƒฝ่ฏดๆ˜Ž


name: skillguard version: 2.0.0 description: Security scanner for ClawHub skills. Vet third-party skills before installation โ€” detect dangerous patterns, suspicious code, and risky dependencies. author: PaxSwarm license: MIT keywords: [security, audit, scan, vet, clawhub, skills, safety, moderation, vulnerability] triggers: ["skill security", "vet skill", "scan skill", "is this skill safe", "skillguard", "audit skill", "clawscan"]

๐Ÿ›ก๏ธ SkillGuard โ€” ClawHub Security Scanner

"Trust, but verify."

ClawHub has no moderation process. Any agent can publish any skill. SkillGuard provides the security layer that's missing โ€” scanning skills for dangerous patterns, vulnerable dependencies, and suspicious behaviors before they touch your system.


๐Ÿšจ Why This Matters

Third-party skills can:

RiskImpact
Execute arbitrary codeFull system compromise
Access your filesystemData theft, ransomware
Read environment variablesAPI key theft ($$$)
Exfiltrate data via HTTPPrivacy breach
Install malicious dependenciesSupply chain attack
Persist backdoorsLong-term compromise
Escalate privilegesRoot access

One malicious skill = game over.

SkillGuard helps you catch threats before installation.


๐Ÿ“ฆ Installation

clawhub install clawscan

Or manually:

git clone https://github.com/G0HEAD/skillguard
cd skillguard
chmod +x scripts/skillguard.py

Requirements

  • Python 3.8+
  • clawhub CLI (for remote scanning)

๐Ÿš€ Quick Start

# Scan a skill BEFORE installing
python3 scripts/skillguard.py scan some-random-skill

# Scan a local folder (your own skills or downloaded)
python3 scripts/skillguard.py scan-local ./path/to/skill

# Audit ALL your installed skills
python3 scripts/skillguard.py audit-installed

# Generate detailed security report
python3 scripts/skillguard.py report some-skill --format markdown

# Check dependencies for known vulnerabilities
python3 scripts/skillguard.py deps ./path/to/skill

๐Ÿ” What SkillGuard Detects

๐Ÿ”ด CRITICAL โ€” Block Installation

These patterns indicate serious security risks:

CategoryPatternsRisk
Code Executioneval(), exec(), compile()Arbitrary code execution
Shell Injectionsubprocess(shell=True), os.system(), os.popen()Command injection
Child Processchild_process.exec(), child_process.spawn()Shell access (Node.js)
Credential TheftAccess to ~/.ssh/, ~/.aws/, ~/.config/Private key/credential theft
System Files/etc/passwd, /etc/shadowSystem compromise
Recursive Deleterm -rf, shutil.rmtree('/')Data destruction
Privilege Escalationsudo, setuid, chmod 777Root access
Reverse ShellSocket + subprocess patternsRemote access
Crypto MiningMining pool URLs, stratum://Resource theft

๐ŸŸก WARNING โ€” Review Before Installing

These patterns may be legitimate but warrant inspection:

CategoryPatternsConcern
Network Requestsrequests.post(), fetch() POSTWhere is data going?
Environment Accessos.environ, process.envWhich variables?
File Writesopen(..., 'w'), writeFile()What's being saved?
Base64 Encodingbase64.encode(), btoa()Obfuscated payloads?
External IPsHardcoded IP addressesExfiltration endpoints?
Bulk File Opsshutil.copytree(), globMass data access?
Persistencecrontab, systemctl, .bashrcAuto-start on boot?
Package Installpip install, npm installSupply chain risk

๐ŸŸข INFO โ€” Noted But Normal

CategoryPatternsNote
File Readsopen(..., 'r'), readFile()Expected for skills
JSON Parsingjson.load(), JSON.parse()Data handling
Loggingprint(), console.log()Debugging
Standard Importsimport os, import sysCommon libraries

๐Ÿ“Š Scan Output Example

โ•”โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•—
โ•‘              ๐Ÿ›ก๏ธ  SKILLGUARD SECURITY REPORT                  โ•‘
โ• โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•ฃ
โ•‘  Skill:       suspicious-helper v1.2.0                       โ•‘
โ•‘  Author:      unknown-user                                   โ•‘
โ•‘  Files:       8 analyzed                                     โ•‘
โ•‘  Scan Time:   2024-02-03 05:30:00 UTC                        โ•‘
โ•šโ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•

๐Ÿ“ FILES SCANNED
โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
  โœ“ SKILL.md                    (541 bytes)
  โœ“ scripts/main.py             (2.3 KB)
  โœ“ scripts/utils.py            (1.1 KB)
  โœ“ scripts/network.py          (890 bytes)
  โœ“ config.json                 (234 bytes)
  โœ“ requirements.txt            (89 bytes)
  โœ“ package.json                (312 bytes)
  โœ“ install.sh                  (156 bytes)

๐Ÿ”ด CRITICAL ISSUES (3)
โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
  [CRIT-001] scripts/main.py:45
  โ”‚ Pattern:  eval() with external input
  โ”‚ Risk:     Arbitrary code execution
  โ”‚ Code:     result = eval(user_input)
  โ”‚
  [CRIT-002] scripts/utils.py:23
  โ”‚ Pattern:  subprocess with shell=True
  โ”‚ Risk:     Command injection vulnerability
  โ”‚ Code:     subprocess.run(cmd, shell=True)
  โ”‚
  [CRIT-003] install.sh:12
  โ”‚ Pattern:  Recursive delete with variable
  โ”‚ Risk:     Potential data destruction
  โ”‚ Code:     rm -rf $TARGET_DIR/*

๐ŸŸก WARNINGS (5)
โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
  [WARN-001] scripts/network.py:15  โ€” HTTP POST to external URL
  [WARN-002] scripts/main.py:78     โ€” Reads OPENAI_API_KEY
  [WARN-003] requirements.txt:3     โ€” Unpinned dependency: requests
  [WARN-004] scripts/utils.py:45    โ€” Base64 encoding detected
  [WARN-005] config.json            โ€” Hardcoded IP: 192.168.1.100

๐ŸŸข INFO (2)
โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
  [INFO-001] scripts/main.py:10     โ€” Standard file read operations
  [INFO-002] requirements.txt       โ€” 3 dependencies declared

๐Ÿ“ฆ DEPENDENCY ANALYSIS
โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
  requirements.txt:
    โš ๏ธ  requests        (unpinned - specify version!)
    โœ“  json            (stdlib)
    โœ“  pathlib         (stdlib)

  package.json:
    โš ๏ธ  axios@0.21.0   (CVE-2021-3749 - upgrade to 0.21.2+)

โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•
                        VERDICT: ๐Ÿšซ DANGEROUS
โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•
  
  โ›” DO NOT INSTALL THIS SKILL
  
  3 critical security issues found:
  โ€ข Arbitrary code execution via eval()
  โ€ข Command injection via shell=True
  โ€ข Dangerous file deletion pattern
  
  Manual code review required before any use.
  
โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•

๐ŸŽฏ Commands Reference

scan <skill-name>

Fetch and scan a skill from ClawHub before installing.

skillguard scan cool-automation-skill
skillguard scan cool-automation-skill --verbose
skillguard scan cool-automation-skill --json > report.json

scan-local <path>

Scan a local skill directory.

skillguard scan-local ./my-skill
skillguard scan-local ~/downloads/untrusted-skill --strict

audit-installed

Scan all skills in your workspace.

skillguard audit-installed
skillguard audit-installed --fix  # Attempt to fix issues

deps <path>

Analyze dependencies for known vulnerabilities.

skillguard deps ./skill-folder
skillguard deps ./skill-folder --update-db  # Refresh vuln database

report <skill> [--format]

Generate detailed security report.

skillguard report suspicious-skill --format markdown > report.md
skillguard report suspicious-skill --format json > report.json
skillguard report suspicious-skill --format html > report.html

allowlist <skill>

Mark a skill as manually reviewed and trusted.

skillguard allowlist my-trusted-skill
skillguard allowlist --list  # Show all trusted skills
skillguard allowlist --remove old-skill

watch

Monitor for new skill versions and auto-scan updates.

skillguard watch --interval 3600  # Check every hour

โš™๏ธ Configuration

Create ~/.skillguard/config.json:

{
  "severity_threshold": "warning",
  "auto_scan_on_install": true,
  "block_critical": true,
  "trusted_authors": [
    "official",
    "PaxSwarm",
    "verified-publisher"
  ],
  "allowed_domains": [
    "api.openai.com",
    "api.anthropic.com",
    "api.github.com",
    "clawhub.ai"
  ],
  "ignored_patterns": [
    "test_*.py",
    "*_test.js",
    "*.spec.ts"
  ],
  "custom_patterns": [
    {
      "regex": "my-internal-api\\.com",
      "severity": "info",
      "description": "Internal API endpoint"
    }
  ],
  "vuln_db_path": "~/.skillguard/vulns.json",
  "report_format": "markdown",
  "color_output": true
}

๐Ÿ” Security Levels

After scanning, skills are assigned a security level:

LevelBadgeMeaningRecommendation
Verifiedโœ…Trusted author, no issuesSafe to install
Clean๐ŸŸขNo issues foundLikely safe
Review๐ŸŸกWarnings onlyRead before installing
Suspicious๐ŸŸ Multiple warningsCareful review needed
Dangerous๐Ÿ”ดCritical issuesDo not install
Maliciousโ›”Known malware patternsBlock & report

๐Ÿ”„ Integration Workflows

Pre-Install Hook

# Add to your workflow
skillguard scan $SKILL && clawhub install $SKILL

CI/CD Pipeline

# GitHub Actions example
- name: Security Scan
  run: |
    pip install skillguard
    skillguard scan-local ./my-skill --strict --exit-code

Automated Monitoring

# Cron job for daily audits
0 9 * * * /path/to/skillguard audit-installed --notify

๐Ÿ“ˆ Vulnerability Database

SkillGuard maintains a local database of known vulnerabilities:

# Update vulnerability database
skillguard update-db

# Check database status
skillguard db-status

# Report a new vulnerability
skillguard report-vuln --skill bad-skill --details "Description..."

Sources:

  • CVE Database (Python packages)
  • npm Advisory Database
  • GitHub Security Advisories
  • Community reports

๐Ÿšซ Limitations

SkillGuard is a first line of defense, not a guarantee:

LimitationExplanation
ObfuscationDetermined attackers can hide malicious code
Dynamic codeRuntime-generated code is harder to analyze
False positivesLegitimate code may trigger warnings
Zero-daysNew attack patterns won't be detected
DependenciesDeep transitive dependency scanning is limited

Defense in depth: Use SkillGuard alongside:

  • Sandboxed execution environments
  • Network monitoring
  • Regular audits
  • Principle of least privilege

๐Ÿค Contributing

Found a dangerous pattern we missed? Help improve SkillGuard:

Add a Pattern

{
  "id": "CRIT-XXX",
  "regex": "dangerous_function\\(",
  "severity": "critical",
  "category": "code_execution",
  "description": "Dangerous function call",
  "cwe": "CWE-94",
  "remediation": "Use safe_alternative() instead",
  "file_types": [".py", ".js"]
}

Report False Positives

skillguard report-fp --pattern "WARN-005" --reason "Legitimate use case"

๐Ÿ“œ Changelog

v2.0.0 (Current)

  • Comprehensive pattern database (50+ patterns)
  • Dependency vulnerability scanning
  • Multiple output formats (JSON, Markdown, HTML)
  • Configuration file support
  • Trusted author system
  • Watch mode for monitoring updates
  • Improved reporting with CWE references

v1.0.0

  • Initial release
  • Basic pattern detection
  • Local and remote scanning
  • Audit installed skills

๐Ÿ“„ License

MIT License โ€” Use freely, contribute back.


๐Ÿ›ก๏ธ Stay Safe

"In the agent ecosystem, trust is earned through transparency. Every skill you install is code you're choosing to run. Choose wisely. Verify always."

Built by PaxSwarm โ€” protecting the swarm, one skill at a time ๐Ÿฆโ€โฌ›


Links:

ๅฆ‚ไฝ•ไฝฟ็”จใ€ŒClawScanใ€๏ผŸ

  1. ๆ‰“ๅผ€ๅฐ้พ™่™พAI๏ผˆWeb ๆˆ– iOS App๏ผ‰
  2. ็‚นๅ‡ปไธŠๆ–นใ€Œ็ซ‹ๅณไฝฟ็”จใ€ๆŒ‰้’ฎ๏ผŒๆˆ–ๅœจๅฏน่ฏๆก†ไธญ่พ“ๅ…ฅไปปๅŠกๆ่ฟฐ
  3. ๅฐ้พ™่™พAI ไผš่‡ชๅŠจๅŒน้…ๅนถ่ฐƒ็”จใ€ŒClawScanใ€ๆŠ€่ƒฝๅฎŒๆˆไปปๅŠก
  4. ็ป“ๆžœๅณๆ—ถๅ‘ˆ็Žฐ๏ผŒๆ”ฏๆŒ็ปง็ปญๅฏน่ฏไผ˜ๅŒ–

็›ธๅ…ณๆŠ€่ƒฝ