CyborgShell - Architecture and Security

Table of Contents

Overview

CyborgShell is a browser-first AI platform with a fundamentally different architecture than traditional cloud AI tools. This document explains how it works and why it matters for your privacy and security.

Architecture Design

What Runs Where

Your Browser (Client)

CyborgShell Server (Minimal)

Key Principle: Client-Side Execution

Your browser does all the work:

The server only handles:

Security Model

API Key Storage

Your API keys are stored in browser local storage:

* unless you use the Cyborg Shell's optional CORS proxy server

Coming Soon: ZOSCII Information Theoretic Security (ITS) Encoding

Important: Local storage is tied to the browser/device. If using a public computer:

  1. Use private/incognito mode, OR
  2. Clear your config after use: csconfig → Delete service details

Data Flow

Architecture Traditional Cloud AI CyborgShell
API Keys Stored on vendor servers Browser local storage only
Code Execution On vendor servers In your browser
AI Calls Through vendor server Direct from browser
Data Privacy Vendor sees everything Only file operations

Why This Matters

Privacy:

    * unless you use the Cyborg Shell's optional CORS proxy server

Security:

Control:

The CORS Proxy

Why It Exists

Browsers have a security feature called CORS (Cross-Origin Resource Sharing) that prevents JavaScript from making requests to different domains. Some AI providers also require authentication tokens in specific formats.

What It Actually Does

The proxy is minimal PHP code (~200 lines) included in the GitHub repository:

// Source/Destination Whitelists
$arrSourceWhitelist = array('cyborgshell.com', 'cyborgdesktop.com', 'localhost');
$arrDestinationWhitelist = array(); // Empty = allow all (you can restrict)

// Logging (OFF by default)
DEFINE('LOG_OUTPUT', 'FALSE');

// Bearer Token Extraction
// Extract bearer token from JSON body
// Remove it from payload before sending to API
// Add proper Authorization: Bearer header
// Forward request to AI provider

Process:

  1. Receives request from browser with API key in JSON body
  2. Extracts bearer or api_key field from JSON
  3. Removes it from the payload
  4. Adds proper Authorization: Bearer header
  5. Forwards request to AI provider
  6. Returns response unchanged

What It Doesn't Do

The Reality of Proxies

Any proxy sees data in transit - that's how proxies work. The critical questions are:

  1. What does it do with the data? (This one: passes through, doesn't store)
  2. Can you verify that? (Yes: ~200 lines of open source PHP)
  3. Can you trust it? (Self-host = you control it completely)

The Truth: If you're using ANY platform with closed-source code, you're trusting them with your API keys whether they admit it or not. CyborgShell's difference:

Simple Decision Guide

API key visibility through proxy matters to you?
Self-host it. Then you control everything. Problem solved.

Don't want to deal with any proxy at all?
Use Ollama. Zero external calls, zero proxy needed.

Using cyborgshell.com for convenience?
→ Our server follows best practices. Code is open source. You decide your trust level.

Bottom line: You have options. Choose what fits your security requirements.

Deployment Scenarios

1. Public Cloud (cyborgshell.com)

Architecture: User Browser → cyborgshell.com (file ops) → AI Provider APIs

Use Case: Quick start, multi-device access, cloud storage

Security: API keys in browser, direct API calls to providers

Internet: Required for AI providers, file sync

2. Self-Hosted + Cloud AI

Architecture: User Browser → Your Server (file ops) → Cloud AI APIs

Use Case: Corporate deployment with cloud AI

Security: Full control of server, API keys stay client-side

Setup: Clone from GitHub, host on internal/external server

3. Self-Hosted + Local AI (Complete Privacy)

Architecture: User Browser → Your Server (file ops) → Ollama (localhost)

Use Case: Maximum security, HIPAA/SOC2, air-gapped environments

Security: Zero external data transmission

Perfect For: Healthcare, legal, financial, classified work

4. Distributed Processing (Horizontal Scaling)

Architecture: Shared Network Drive → Multiple PCs with Ollama processing in parallel

Use Case: Batch processing, render farms, massive throughput

Benefits:

Compliance & Enterprise

HIPAA (Healthcare)

Requirements: PHI must not leave network

CyborgShell Solution:

SOC 2 (Service Organizations)

CyborgShell Solution:

GDPR (Privacy)

CyborgShell Solution:

Technical Details

Server Requirements (Self-Hosting)

Minimal:

No Special Requirements:

Network Requirements

Deployment Requirements
Public Cloud Internet access for AI provider APIs, HTTPS
Self-Hosted + Cloud AI Outbound access to AI providers, inbound for users
Self-Hosted + Local AI No internet required at all, internal network only

Security Best Practices

API Key Management

DO:

DON'T:

Proxy Configuration

Advantages of This Architecture

For Users

For Organizations

For Developers

Source Code and Open Source License

GitHub: https://github.com/PrimalNinja/cyborgshell

License: MIT (free, open source)

Components:

Conclusion

CyborgShell's browser-first architecture provides unique security and privacy benefits:

  1. Your API keys stay local (browser storage, not servers)
  2. Your code executes in your browser (not on servers)
  3. Your AI calls go direct (browser → AI provider)
  4. Complete self-hosting possible (MIT license)
  5. Air-gap capable (with Ollama)

Whether you use the public cloud version for convenience, self-host for control, or deploy air-gapped for maximum security - the choice is yours.

Your code. Your AI. Your control. 🔒