Shield Commands
Interact with Shield using /shield commands in your bot's chat interface.
Available Commandsβ
/shield or /shield statusβ
Show current Shield status and statistics.
Output:
π‘οΈ SecureCheck Shield Status
Configuration:
- Enabled: β
- Inbound Mode: flag
- Outbound Mode: block
Statistics:
- Messages Scanned: 1,247
- Inbound: 834
- Outbound: 413
- Threats Blocked: 23
Top Channels:
- whatsapp:group123: 456 scanned, 12 blocked
- telegram:chat456: 378 scanned, 11 blocked
Top Accounts (by blocks):
- +15551234567: 234 scanned, 8 blocked
- telegram:@spammer: 45 scanned, 5 blocked
Use `/shield help` for commands.
/shield helpβ
List all available commands.
Output:
π‘οΈ SecureCheck Shield Commands
`/shield` or `/shield status` - Show status
`/shield help` - This help message
`/shield test <message>` - Test if message would be blocked
`/shield validate` - Validate configuration
`/shield health` - Check system health
`/shield pause <minutes>` - Temporarily disable (default: 5 min)
`/shield resume` - Re-enable Shield
Example:
`/shield test DROP TABLE users`
`/shield pause 10`
/shield test <message>β
Test if a message would be blocked without actually blocking it.
Examples:
/shield test DROP TABLE users
Output:
β οΈ Message would be BLOCKED
Threats detected:
- sql_injection
Test message: "DROP TABLE users"
/shield test Hello, how are you?
Output:
β
Message is SAFE
No threats detected in: "Hello, how are you?"
Use Cases:
- Test new rules before deploying
- Debug why messages are being blocked
- Verify allowlist is working
- Test custom patterns
/shield validateβ
Validate your Shield configuration for errors and warnings.
Output (Valid):
Configuration Validation
β
Status: Valid
No issues found.
Output (With Issues):
Configuration Validation
β Status: Invalid
Errors:
- β semanticThreshold must be between 0 and 1
- β rateLimit.maxMessages must be >= 1
Warnings:
- β οΈ semanticThreshold is very low (< 0.6) - may cause false positives
- β οΈ Admin notifications enabled but no channel specified
Checks:
- semanticThreshold in valid range (0-1)
- API key length
- Rate limit values
- Notification configuration
- Backend alert setup
/shield healthβ
Check system health and connectivity.
Output:
System Health Check
β
Rules Engine: ok (42 rules)
β
Semantic DB: ok (1,234 embeddings)
β οΈ Backend API: slow (2,300ms)
β
Rate Limiter: active (5 users tracked)
Status Icons:
- β
ok- Working normally - β οΈ
slow- Working but performance degraded - β
error- Not working, needs attention - βΉοΈ
not configured- Optional feature disabled
What's Checked:
- Rules engine initialization
- Semantic database connection
- Backend API connectivity
- Rate limiter status
/shield pause <minutes>β
Temporarily disable Shield for troubleshooting or maintenance.
Examples:
/shield pause # Pause for 5 minutes (default)
/shield pause 10 # Pause for 10 minutes
/shield pause 60 # Pause for 1 hour
Output:
βΈοΈ Shield paused for 10 minute(s)
Use `/shield resume` to re-enable early.
Use Cases:
- Troubleshooting false positives
- Allowing emergency messages through
- Testing bot behavior without Shield
- Maintenance windows
Shield will automatically resume after the time expires. All messages are allowed during pause.
Limits:
- Minimum: 1 minute
- Maximum: 1440 minutes (24 hours)
/shield resumeβ
Re-enable Shield immediately (cancel pause).
Output:
βΆοΈ Shield resumed
If Shield is already active:
βΉοΈ Shield is already active
Best Practicesβ
During Incidentsβ
-
Check health first
/shield health -
Validate config
/shield validate -
Test specific message
/shield test <problematic message> -
Pause if needed
/shield pause 10
Regular Monitoringβ
Run daily health checks:
# Morning check
/shield status
# Weekly health check
/shield health
# Monthly config review
/shield validate
Before Deploying Changesβ
- Validate new config locally
- Test with
/shield test - Deploy to staging bot first
- Monitor
/shield statusafter deploy - Keep
/shield pauseready for rollback
Troubleshootingβ
Commands Not Respondingβ
Problem: /shield status returns nothing
Solutions:
- Check Shield is enabled in config
- Restart bot
- Check logs for errors:
grep "\[Shield\]" bot.log
Permission Deniedβ
Problem: "You don't have permission to use this command"
Solution: Check OpenClaw role configuration. Bot owner should have access by default.
Test Command Always Says Safeβ
Problem: /shield test DROP TABLE returns "safe"
Solution: Rules engine may not be loaded. Check:
/shield health
If rules engine shows error, check API key and connectivity.
Next Stepsβ
- Configure rate limiting - Set up spam protection
- Set up backend - Centralized monitoring