Corvus implements a defense-in-depth security model with multiple overlapping layers. Security is a first-class concern, built into every component from the ground up.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/dallay/corvus/llms.txt
Use this file to discover all available pages before exploring further.
Security Layers
Corvus provides multiple overlapping security boundaries:Layer 5: Gateway Pairing
The Gateway provides HTTP/WebSocket access to Corvus with mandatory authentication.Pairing Flow
- Startup - Gateway generates a 6-digit pairing code
- Display - Code printed to terminal (not logged)
- Client pairing - Client sends
POST /pairwith code - Token generation - Gateway returns bearer token
- Authenticated requests - Client includes token in
Authorizationheader
clients/agent-runtime/src/security/pairing.rs
- One-time pairing codes - 6-digit numeric codes with CSPRNG
- Token hashing - Tokens stored as SHA-256 hashes
- Brute-force protection - 5 failed attempts → 5-minute lockout
- Constant-time comparison - Timing attack resistant
Token Management
Token generation:Layer 4: Security Policy
The SecurityPolicy defines what agents are allowed to do. Location:clients/agent-runtime/src/security/policy.rs
Autonomy Levels
| Operation | ReadOnly | Supervised | Full |
|---|---|---|---|
| Read files | ✅ | ✅ | ✅ |
| Write files | ❌ | ⚠️ Approval | ✅ |
| Shell (low risk) | ❌ | ✅ | ✅ |
| Shell (medium risk) | ❌ | ⚠️ Approval | ✅ |
| Shell (high risk) | ❌ | ❌ | ❌ |
| Network access | ❌ | ⚠️ Approval | ✅ |
Command Allowlists
Only explicitly allowed commands can execute:Path Blocklists
Critical paths are always forbidden:Risk Assessment
Rate Limiting
Action tracking:Layer 3: Runtime Sandboxing
See Runtime Model for detailed sandbox information. Docker isolation:- Process namespace (
--pid) - Network namespace (
--network none) - Mount namespace (read-only rootfs)
- Resource limits (
--memory,--cpus)
- Landlock - Filesystem access control
- Firejail - Namespace isolation + seccomp
- Bubblewrap - Lightweight containers
Layer 2: Filesystem Scoping
Workspace-Only Mode
Network Isolation
Docker:Layer 1: Input Validation
Parameter Validation
All tool inputs are validated against JSON schemas:Secret Management
Secrets are encrypted at rest using XChaCha20-Poly1305. Location:clients/agent-runtime/src/security/secrets.rs
Logging & Audit
NEVER log sensitive data:Threat Model
Threats We Defend Against
Malicious Prompt Injection
Malicious Prompt Injection
Attack: User tricks agent into executing harmful commandsDefense:
- Command allowlists
- Risk assessment
- Approval workflows for risky operations
- Sandbox isolation
Path Traversal
Path Traversal
Attack: Agent accesses files outside workspaceDefense:
- Path canonicalization
- Workspace boundary checks
- Forbidden path enforcement
- Docker mount restrictions
Command Injection
Command Injection
Attack: Malicious shell metacharacters in parametersDefense:
- Input validation and sanitization
- No string concatenation for shell commands
- Use of
Command::arg()(no shell parsing) - Sandbox isolation
Resource Exhaustion
Resource Exhaustion
Attack: Agent consumes excessive CPU/memory/diskDefense:
- Docker resource limits
- Rate limiting (actions per hour)
- Execution timeouts
- Memory budgets
Credential Theft
Credential Theft
Attack: Agent leaks API keys or secretsDefense:
- Encrypted secret storage
- No secrets in logs
- Redaction in observability
- Environment variable isolation
Unauthorized Gateway Access
Unauthorized Gateway Access
Container Escape
Container Escape
Attack: Agent breaks out of Docker containerDefense:
- No privileged containers
- Read-only root filesystem
- Minimal Linux capabilities
- No host mounts of sensitive paths
Threats We Don’t Defend Against
- Physical access to host machine
- Kernel exploits (rely on OS patches)
- Side-channel attacks (timing, cache)
- Social engineering of human operators
- Supply chain attacks (use dependency scanning)
Security Checklist
Before deploying Corvus to production:Configuration
Configuration
Set
autonomy = "supervised" (default)Enable
require_pairing = true for public gatewayUse Docker runtime for untrusted workloads
Enable
read_only_rootfs = true in Docker configSet
network = "none" unless network access requiredConfigure resource limits (memory, CPU)
Set
workspace_only = trueReview and minimize
allowed_commandsExpand
forbidden_paths for your environmentNetwork
Network
Bind gateway to
127.0.0.1 for localhost onlyUse firewall rules to restrict public access
Enable TLS/HTTPS with valid certificates
Use a reverse proxy (nginx, Caddy) in production
Implement rate limiting at proxy level
Secrets
Secrets
Enable
paranoid_mode = true for secret encryptionStore config files with restrictive permissions (600)
Use environment variables for sensitive config
Never commit secrets to version control
Rotate bearer tokens periodically
Monitoring
Monitoring
Enable audit logging
Monitor failed authentication attempts
Alert on high-risk command executions
Track resource usage (CPU, memory)
Set up security event notifications
Operations
Operations
Keep Corvus and dependencies updated
Run vulnerability scanning on Docker images
Review audit logs regularly
Test incident response procedures
Document security policies
Best Practices
Principle of Least Privilege
Grant only the minimum permissions required. Start restrictive and relax as needed.
Defense in Depth
Don’t rely on a single security layer. Multiple boundaries increase resilience.
Secure by Default
Default configuration should be secure. Require explicit opt-in for risky features.
Fail Securely
On error, fail closed (deny access) not open (allow access).
Security Research
We welcome responsible security research:Report vulnerabilities to: security@corvus.devPlease include:
- Description of the vulnerability
- Steps to reproduce
- Potential impact
- Suggested fix (if applicable)
Next Steps
Runtime Model
Understand sandboxing and isolation
Configuration
Configure security policies
Deployment Guide
Deploy securely to production
Architecture
See how security fits into the system