Overview
Plugins extend profClaw with new tools, providers, and integrations. Because plugins run as JavaScript in the same process, they have significant power. The plugin security system enforces a permission model, scans code for dangerous patterns, and requires explicit trust grants before plugins can run.Permission Model
Every plugin declares the permissions it needs in its manifest. profClaw only grants the minimum permissions required.network and tools cannot access the filesystem or run shell commands.
Plugin Manifest
Code Scanning
Before a plugin is loaded, the AuditScanner analyzes its code for dangerous patterns:| Pattern | Risk | Action |
|---|---|---|
child_process, exec(), spawn() | CRITICAL | Block unless exec permission declared |
eval(), new Function("code") | CRITICAL | Always blocked |
net.connect(), raw sockets | CRITICAL | Always blocked |
fetch(), axios | HIGH | Block unless network permission declared |
process.env.API_KEY | HIGH | Warn - may be leaking credentials |
writeFileSync | MEDIUM | Block unless filesystem permission declared |
process.exit() | HIGH | Always blocked |
CRITICAL patterns that do not match declared permissions, the plugin is rejected at load time.
Trust Levels
Plugins are assigned one of three trust levels:- Trusted
- Sandboxed
- Blocked
Plugin has been explicitly reviewed and approved. All declared permissions are granted immediately.Only grant
trusted to plugins you have reviewed yourself or that come from verified ClawHub publishers.Installing Plugins
Plugin Allowlist
Inallowlist security mode, plugins must also be on the plugin allowlist:
Managing Plugins
Writing Secure Plugins
When developing plugins, follow these rules:Declare minimum permissions
Only request the permissions your plugin actually needs. Users will see and approve each permission.
Use the plugin SDK
Always use profClaw’s SDK for tool execution rather than calling shell commands directly. The SDK applies security policies.
Never hardcode credentials
Use
context.env to access configuration values. Never embed API keys in code.