Skip to content

Security: viralcode/openwhale

Security

docs/security.md

Security

Production-ready security features built in.


Overview

FeatureSourceDescription
JWT Authenticationsrc/auth/Token-based auth with session management
Rate Limitingsrc/security/rate-limit.tsPrevents brute-force and abuse
Audit Logssrc/security/audit.tsTracks all actions
Sandboxed Executionsrc/security/sandbox.tsIsolates code execution
Command Filteringsrc/security/command-filter.tsFilters dangerous shell commands
Approval Systemsrc/security/approval.tsRequires approval for sensitive operations
Mobile Pairingsrc/security/pairing.tsSecure device pairing

Authentication

JWT-based authentication with session management.

  • Default credentials:admin / admin (change after first login!)
  • Session expiry: 7 days
  • Multi-user support: Admin can create additional users
  • Password change: Available in Settings

Rate Limiting

Two rate limiters protect the server:

ScopePurpose
Auth routesPrevents brute-force login attempts
API routesPrevents excessive API usage

Audit Logs

All significant actions are logged for accountability. View audit logs from the dashboard under Settings → Audit Logs.


Sandboxed Code Execution

When the AI runs code via the code_exec tool, it executes in a sandboxed environment to prevent unintended side effects.


Command Filtering

The command filter (src/security/command-filter.ts) inspects shell commands before execution, blocking dangerous operations like:

  • Destructive system commands
  • Unauthorized file access
  • Network operations outside allowed scope

Security Modes

Set via the SECURITY_MODE environment variable:

ModeDescription
localRelaxed security for local development
strictFull security for production deployment
# In .env
SECURITY_MODE=local # Development
SECURITY_MODE=strict # Production

API Key Management

Provider API keys and other credentials are stored securely in the SQLite database. Configure them via the dashboard or .env file.

There aren't any published security advisories