OpenClaw Integration
Rafter integrates seamlessly with OpenClaw to add security to autonomous coding agents.Setup
1. Install Rafter CLI
Install globally:2. Initialize Agent Security
Run initialization (auto-detects OpenClaw):- ✓ Install skill to
~/.openclaw/skills/rafter-security.md - ✓ Enable agent integration in config
- ✓ Set up security policies
3. Restart OpenClaw
Restart OpenClaw to load the Rafter skill:How It Works
Once integrated, OpenClaw agents automatically use Rafter for security-sensitive operations:Example Flow
User request:- Generates commit message
- Calls Rafter:
rafter agent exec "git commit -m '...'" - Rafter scans staged files for secrets
- If clean: Executes commit
- If secrets found: Blocks and alerts user
Skill Commands
The Rafter skill provides these commands to OpenClaw:/rafter-scan
Scan files for secrets before operations.
When OpenClaw uses it:
- Before git commits
- When reading sensitive files
- After generating code with credentials
/rafter-bash
Execute shell commands with validation.
When OpenClaw uses it:
- For any shell command execution
- Before destructive operations
- When using sudo
/rafter-audit
View security event logs.
When OpenClaw uses it:
- After blocked commands
- When reviewing security events
- For compliance reporting
Configuration
Risk Levels for OpenClaw
Choose based on your use case:Minimal (Development)
Minimal (Development)
Best for: Local development, prototyping
- Allows most commands
- Basic secret detection
- Minimal interruption to workflow
Moderate (Recommended)
Moderate (Recommended)
Best for: General use, team environments
- Blocks critical commands
- Requires approval for high-risk operations
- Secret scanning on all git operations
- Default setting
Aggressive (Production)
Aggressive (Production)
Best for: Sensitive environments, compliance requirements
- Maximum security checks
- Requires approval for most operations
- Comprehensive audit logging
- Best for production agents
Command Policy
Control how commands are handled:Usage Examples
Safe Development Workflow
Blocked Dangerous Operation
Approval Required
Best Practices
Recommended Setup
- Start with moderate risk level: Adjust based on experience
- Review audit logs daily:
rafter agent audit --last 20 - Train agents on Rafter commands: Ensure agents know when to use security checks
- Test policies in development: Before deploying to production
- Keep Rafter updated:
npm update -g @rafter-security/cli
Monitoring
View Agent Activity
Check what your agent is doing:Audit Reports
Generate reports for compliance:Troubleshooting
Skill Not Loading
If OpenClaw doesn’t recognize Rafter commands:-
Check skill file exists:
-
Reinstall skill:
-
Restart OpenClaw:
Commands Not Being Validated
If commands bypass Rafter:-
Check config:
-
Verify policy mode:
-
Enable if disabled:
False Positives
If safe commands are being blocked:-
Check audit log:
-
Adjust risk level:
- Report issue: rafter-cli/issues
Advanced Configuration
Custom Blocked Patterns
Add organization-specific patterns: Edit~/.rafter/config.json:
Approval Patterns
Require approval for specific commands:Multi-Agent Setup
Running multiple OpenClaw instances:Support
Need Help?
- Documentation: docs.rafter.so
- OpenClaw Docs: openclaw.com/docs
- Issues: rafter-cli/issues
- Community: OpenClaw Discord

