CrabShield Security Overview
CrabShield is the built-in security layer for CrabShack. It monitors every conversation and action your AI agents take, detecting and preventing threats in real time — no setup required.
Defense in Depth
CrabShield uses 18 independent security guards, each focused on a different type of threat. Because they work independently, a problem with one guard never compromises the others. And if anything unexpected happens, CrabShield automatically switches to its strictest settings rather than leaving you unprotected.
How It Works
CrabShield watches your agents at every stage:
- Incoming messages are checked for manipulation attempts, unauthorized access, and sensitive data
- Agent actions like tool usage, file access, and network requests are validated against your security policies
- Agent responses are scanned for potentially dangerous content and data leaks
- System integrity is continuously monitored to ensure nothing has been tampered with
When a threat is detected, CrabShield takes action based on your settings — blocking it, cleaning it up, or flagging it for review.
Guards at a Glance
| Guard | What It Protects Against |
|---|---|
| Prompt Injection | Attempts to hijack or manipulate your agent's behavior |
| System Prompt Leakage | Attempts to extract your agent's instructions |
| Tool Gate | Unauthorized or dangerous tool usage |
| Filesystem Fence | Unauthorized file access outside allowed areas |
| Credential Vault | API keys, passwords, and personal information appearing in conversations |
| Escalation Detection | Commands that try to gain elevated system access |
| Input Validator | Oversized messages and message flooding |
| Output Scanner | Dangerous code patterns in AI-generated responses |
| Memory Guard | Tampering with agent memory and conversation context |
| MCP Hardening | Unauthorized external tool server connections |
| Network Policy | Unauthorized network requests to internal or sensitive destinations |
| Skill Verification | Tampered or unauthorized agent skills |
| Config Tamper Detection | Unauthorized changes to critical configuration files |
| Auth Enforcement | Messages from unauthorized channels or users |
| Audit & Alerts | Complete security event logging and real-time alerts |
| RAG Scanner | Hidden manipulation attempts in uploaded Knowledge Base documents |
| Anomaly Detection | Unusual agent behavior compared to its normal pattern |
| Exemption Engine | Not a threat detector — lets you exempt known-safe skills, jobs, or channels from other guards |
| Policy Compliance | Gaps or accidental weakening of your own CrabShield settings |
Guards by Category
Not every guard is relevant to every user. Here's how they break down:
Core Protection
These guards are relevant to everyone using CrabShack:
- Prompt Injection — stops attempts to manipulate your agent's behavior
- System Prompt Leakage — prevents extraction of your agent's instructions
- Credential Vault — redacts API keys, passwords, and personal information
- Input Validator — enforces message size limits and rate limiting
- Output Scanner — catches dangerous code patterns in agent responses
- Escalation Detection — detects commands that try to gain elevated access
- RAG Scanner — scans uploaded Knowledge Base documents for hidden manipulation attempts
Infrastructure Controls
Primarily relevant to administrators and self-hosters:
- Tool Gate — controls which tools your agent can use
- Filesystem Fence — restricts file access to authorized areas
- Network Policy — controls where your agent can make network requests
- Memory Guard — protects against poisoned memories and session limits
- Auth Enforcement — ensures messages come from authorized channels
Advanced / Developer
Primarily relevant to developers and teams using MCP servers or custom skills:
- MCP Hardening — controls external tool server connections
- Skill Verification — ensures agent skills haven't been tampered with
- Config Tamper Detection — monitors critical files for unauthorized changes
- Exemption Engine — lets you exempt specific skills, scheduled jobs, or channels from other guards
Operational
Relevant to everyone:
- Audit & Alerts — complete security event logging and real-time alerts
- Anomaly Detection — flags unusual agent behavior compared to its own normal pattern
- Policy Compliance — checks that your own security settings haven't drifted or been weakened
Secure by Default
CrabShield is active from the moment you start using CrabShack. All guards are enabled with balanced defaults that protect against the most common threats without getting in the way of normal use. If you need more or less protection, you can adjust everything from the dashboard — see the Configuration page to learn how.