Documentation Index
Fetch the complete documentation index at: https://mintlify.com/nearai/ironclaw/llms.txt
Use this file to discover all available pages before exploring further.
Defense in Depth
IronClaw implements multiple security layers that work together to protect your data and prevent misuse.Each layer operates independently. Even if one layer fails, others provide protection.
WASM Sandbox
All untrusted tools run in isolated WebAssembly containers.Security Constraints
CPU Exhaustion Protection
CPU Exhaustion Protection
Threat: Infinite loops or CPU-intensive operationsMitigation:
- Fuel metering (Wasmtime’s gas system)
- Epoch interruption for long-running tasks
- Per-tool execution timeout
- Automatic termination on fuel exhaustion
Memory Exhaustion Protection
Memory Exhaustion Protection
Threat: Unbounded memory allocationMitigation:
- ResourceLimiter enforces hard memory cap
- Default 10MB limit per tool
- Memory growth tracking
- Automatic instance cleanup on overflow
Filesystem Access Isolation
Filesystem Access Isolation
Threat: Reading sensitive files, path traversalMitigation:
- No WASI filesystem access
- Only host-provided
workspace_readfunction - Path validation (no
.., no/prefix) - Scoped to user’s workspace only
Network Access Control
Network Access Control
Threat: Unauthorized API calls, data exfiltrationMitigation:
- Endpoint allowlisting (opt-in per tool)
- Host/path pattern matching
- Query parameter validation
- Rate limiting per endpoint
Credential Exposure Prevention
Credential Exposure Prevention
Threat: Secrets leaked to WASM code or logsMitigation:
- Credentials never exposed to WASM
- Injection at host boundary only
- Leak detection scans all outputs
- Automatic redaction of detected secrets
Capability-Based Security
Features are opt-in via explicit capability grants:Prompt Injection Defense
External content passes through multiple protection layers.Safety Layer
Detection Patterns
- Instruction Injection
- Goal Hijacking
- Credential Extraction
Pattern: External data attempting to override system instructionsDetection:
- System keyword patterns (
SYSTEM:,ADMIN:,OVERRIDE:) - Command-like phrases in unexpected positions
- Role confusion attempts
- Wrap external content with security notice
- XML/delimiters for structural separation
- Explicit warning in LLM context
Content Wrapping
External data is wrapped with security context:Policy Enforcement
Configurable rules with severity levels:Credential Protection
Secrets are never exposed to untrusted code.Storage
- System keychain (macOS Keychain, Windows Credential Manager, Linux Secret Service)
- Encrypted database storage (AES-256-GCM)
- Environment variables (for CI/CD)
Injection Boundary
Credentials are injected at the orchestrator boundary, never passed to tools:Leak Detection
All outputs are scanned for accidentally leaked secrets:- API key formats (OpenAI, Anthropic, AWS, etc.)
- JWT tokens
- Private keys (PEM, SSH)
- Database connection strings
- OAuth tokens
Endpoint Allowlisting
HTTP requests are restricted to approved destinations.Pattern Matching
Validation Logic
- Parse request URL
- Check host against allowlist
- Validate path prefix (if specified)
- Verify HTTP method (if specified)
- Scan for suspicious query params
- Allow or deny
Rate Limiting
Prevents abuse through request throttling.Per-Tool Limits
Shared Rate Limiter
All tools share a global rate limiter:Data Protection
All data stays local and encrypted.Local Storage
PostgreSQL
- Job history
- Workspace documents
- Vector embeddings
- User sessions
Keychain
- API keys
- OAuth tokens
- Encrypted secrets
- Per-tool credentials
Encryption
Audit Logging
All tool executions are logged:Audit logs contain tool calls and results, but never contain raw credentials.
Docker Sandbox Security
Container isolation for code execution.Container Constraints
| Feature | Configuration |
|---|---|
| Network | Isolated bridge (no internet by default) |
| Filesystem | Ephemeral, no host mounts |
| Memory | 512MB limit |
| CPU | 1.0 CPU limit |
| Timeout | 30 minute max |
| User | Non-root (uid 1000) |
Per-Job Authentication
- Orchestrator creates job
- Generate random bearer token
- Store in memory (never persisted)
- Pass to container via environment
- Container uses for all API calls
- Token auto-expires after job completion
Credential Grants
Fine-grained permission model:Security Best Practices
Minimal Capabilities
Grant only the capabilities a tool needs. Start with
Capabilities::none() and add incrementally.Threat Model
In Scope
Prompt injection from external sources
Malicious WASM tools
Credential theft/leakage
Data exfiltration attempts
Resource exhaustion (CPU, memory, network)
Unauthorized API access
Out of Scope
Next Steps
WASM Sandbox
Deep dive into WASM security model
Credential Management
Managing secrets and API keys