Overview
buntime.sh provides secure, isolated execution environments for untrusted code. Each session runs in its own container with strict security boundaries.Isolation Model
Container Isolation
Each session gets:- Separate Linux container
- Isolated filesystem
- Isolated network namespace
- Resource limits enforced by kernel
Network Access
Sessions can make outbound requests:- Accept inbound connections (except via preview URL)
- Access other sessions
- Scan internal networks
What Code Can Do
✅ Allowed:- Execute JavaScript/TypeScript
- Install npm packages
- Make HTTP/HTTPS requests
- Write files to /workspace
- Use databases (SQLite, etc.)
- Run web servers on port 8080
- Access other sessions
- Mine cryptocurrency (CPU throttled)
- Port scanning
- DOS attacks (rate limited)
- Access host system
Authentication
API requests require Bearer tokens:Best Practices
Protect API keys
Protect API keys
Never expose keys in client-side code:
Isolate users
Isolate users
Create separate sessions per user/tenant:
Validate AI code
Validate AI code
Review AI-generated code before execution:
Data Security
At Rest
- Files encrypted in R2 storage
- Metadata encrypted in KV
- Automatic deletion on expiry
In Transit
- All API calls over HTTPS
- TLS 1.3 encryption
- No downgrade attacks
Abuse Prevention
- CPU throttling for sustained high usage
- Memory limits enforced
- Execution timeouts
- Rate limiting per API key
- Automatic session cleanup