Security
Understanding Akira's security model and isolation guarantees.
Threat Model
Akira is designed for one primary threat: running untrusted code safely.
This includes:
- AI-generated code that might be malicious or buggy
- User-submitted code in multi-tenant environments
- Third-party scripts and tools
- Experimental code during development
Isolation Layers
Akira provides multiple layers of isolation:
┌─────────────────────────────────────────────────────┐
│ Your Infrastructure │
├─────────────────────────────────────────────────────┤
│ Akira Platform │
│ ┌───────────────────────────────────────────────┐ │
│ │ Hardware Virtualization │ │
│ │ ┌─────────┐ ┌─────────┐ ┌─────────┐ │ │
│ │ │ Sandbox │ │ Sandbox │ │ Sandbox │ │ │
│ │ │ (VM) │ │ (VM) │ │ (VM) │ │ │
│ │ │ │ │ │ │ │ │ │
│ │ │ Process │ │ Process │ │ Process │ │ │
│ │ │ + Code │ │ + Code │ │ + Code │ │ │
│ │ └─────────┘ └─────────┘ └─────────┘ │ │
│ └───────────────────────────────────────────────┘ │
└─────────────────────────────────────────────────────┘Layer 1: Hardware Virtualization
Each sandbox runs in its own micro-VM with hardware-level isolation:
| Isolation Type | Protection |
|---|---|
| CPU | Separate virtual CPUs, no shared execution |
| Memory | Isolated address spaces, no shared RAM |
| Storage | Separate virtual disks |
| Network | Isolated network namespaces |
Layer 2: Minimal Attack Surface
Micro-VMs have a tiny attack surface compared to traditional VMs:
- Minimal device emulation
- No legacy hardware support
- Reduced hypervisor interface
- Purpose-built for sandboxing
Layer 3: Resource Limits
Bounded resources prevent abuse:
- CPU limits - Maximum cores allocated
- Memory limits - Maximum RAM available
- Time limits - Automatic termination after timeout
- Storage limits - Bounded disk space
What Sandboxes CAN'T Do
A sandbox cannot:
| Action | Protection |
|---|---|
| Access host filesystem | Hardware isolation |
| Access other sandboxes | Network isolation |
| Exhaust host resources | Resource limits |
| Run indefinitely | Timeout enforcement |
| Access cloud credentials | No credential injection |
| Make unlimited network requests | Rate limiting |
What Sandboxes CAN Do
By default, sandboxes can:
- Execute arbitrary code
- Make outbound network requests
- Read/write their own filesystem
- Use allocated CPU and memory
- Access sandbox storage
Network Security
Default Configuration
- Outbound: Allowed (can reach internet)
- Inbound: Blocked (cannot be reached)
- Inter-sandbox: Blocked
Network Isolation
Sandboxes cannot:
- Communicate with other sandboxes
- Access internal network services
- Scan or probe your infrastructure
⚠️
Outbound Access
By default, sandboxes can make outbound requests. If running truly untrusted code, consider network restrictions.
API Security
Authentication
All API requests require authentication via x-api-key header:
curl -H "x-api-key: YOUR_API_KEY" https://api.akiralabs.ai/v1/sandboxes/listKey Management
- Keys are scoped to your organization
- Rotate keys regularly
- Never commit keys to version control
- Use environment variables
// Good: Environment variable
const client = new SandboxSDK({
apiKey: process.env['AKIRA_API_KEY'],
});
// Bad: Hardcoded key
const client = new SandboxSDK({
apiKey: 'sk_live_abc123', // Never do this!
});Best Practices
For AI Agent Developers
- Always use sandboxes - Never run AI-generated code directly
- Set timeouts - Prevent infinite loops and runaway processes
- Validate outputs - Don't trust sandbox outputs blindly
- Clean up - Delete sandboxes when done
For Platform Operators
- Rotate API keys - Regular key rotation
- Monitor usage - Watch for anomalous patterns
- Set resource limits - Appropriate CPU/memory bounds
- Review audit logs - Track sandbox operations
For Security-Sensitive Workloads
- Disable network - Block outbound if not needed
- Use ephemeral sandboxes - Don't persist state
- Limit storage access - Minimize data exposure
- Implement timeouts - Short execution limits
Comparison: Containers vs Akira
| Feature | Containers | Akira Sandboxes |
|---|---|---|
| Isolation | Process-level | Hardware-level |
| Kernel | Shared | Separate |
| Escape risk | Container escapes possible | VM escape required |
| Startup time | Fast | Fast (micro-VM) |
| Resource overhead | Low | Low (minimal VM) |
Security Guarantees
Akira provides:
- Confidentiality - Sandboxes cannot read other sandboxes
- Integrity - Sandboxes cannot modify host or other sandboxes
- Availability - Resource limits prevent DoS
Akira does NOT protect against:
- Malicious use of your own API keys
- Data exfiltration via network (if enabled)
- Side-channel attacks (theoretical)
Incident Response
If you suspect a security issue:
- Revoke affected API keys immediately
- Delete suspicious sandboxes
- Review audit logs
- Contact security@akiralabs.ai
Next Steps
- Learn about sandbox configuration
- Explore use cases for coding agents
- Review the API reference