Skip to content

IsaacOdeimor/claw-shield

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

claw-shield

claw-shield is a production-ready OpenClaw security scanner for skills downloaded from ClawHub or other untrusted sources. It parses JavaScript with Babel, applies an extensible pattern registry, analyzes SKILL.md, and produces a terminal safety report with a bounded risk score.

Install

npm install

Usage

npx claw-shield scan ./path-to-skill

Optional JSON output:

npx claw-shield scan ./path-to-skill --json

Risk Model

  • critical: +40 points
  • high: +20 points
  • medium: +10 points
  • low: +5 points

Scores cap at 100 and map to:

  • SAFE: 0-10
  • SUSPICIOUS: 11-49
  • DANGEROUS: 50-79
  • CRITICAL: 80-100

Recommendations map to:

  • SAFE: INSTALL
  • SUSPICIOUS: INSTALL WITH CAUTION
  • DANGEROUS or CRITICAL: DO NOT INSTALL

Coverage

The scanner detects:

  • Dynamic eval, new Function, base64 staging, executable string assembly, and escape-heavy strings
  • External fetch, axios, http, https, XMLHttpRequest, WebSocket, and DNS activity
  • Environment harvesting plus env-to-network flows
  • child_process, vm, dynamic require(), and suspicious filesystem access
  • Prototype pollution
  • SKILL.md permission mismatches, suspicious metadata requirements, and homepage/domain mismatch

Tests

npm test

The Jest suite covers malicious, clean, and suspicious fixtures, targeted rule validation, report formatting, and false-positive guards against popular npm packages.

About

Scans OpenClaw skills before installation. Detects obfuscation, exfiltration, prototype pollution, and ClawHavoc-style payloads using AST analysis.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors