How to Share Live VS Code and Jupyter Workspaces Without Leaking Secrets
Updated
Velocity Engineering Team
5 min read

How to Share Live VS Code and Jupyter Workspaces Without Leaking Secrets

SecurityCollaborationCloud IDERemote Development

Learn how Velocity enables secure code sharing and live collaboration in browser-based VS Code and Jupyter environments without exposing environment variables or secrets.

How to Share Live VS Code and Jupyter Workspaces Without Leaking Secrets

In today's fast-paced software development landscape, collaboration is no longer just a nice-to-have; it's an absolute necessity. However, when developers collaborate, they often run into a massive roadblock: security. How do you share a live development environment without inadvertently leaking API keys, database credentials, or proprietary environment variables?

Welcome to the definitive guide on secure code sharing and live collaboration. In this deep dive, we will explore the pitfalls of traditional collaboration tools and demonstrate how Velocity solves the age-old problem of secure workspace sharing using advanced cloud environments, isolated sandboxes, and granular secret management.


The Danger of Traditional Code Sharing

We've all been there. You're debugging a complex issue, and you need a second pair of eyes. You fire up a screen share, but it's too slow. You try VS Code Live Share, but you realize your .env file is sitting right there, unencrypted, fully exposed to anyone who connects to your session. Or worse, you zip up your project and send it over Slack, hoping you remembered to exclude the .env and node_modules folders.

The security risks are immense:

  • Credential Leakage: Exposing production API keys to unauthorized team members or external contractors.
  • Data Breaches: Malicious actors exploiting shared environments to access sensitive databases.
  • Compliance Violations: Failing to meet SOC2, HIPAA, or GDPR requirements due to improper secret handling.

The Problem Visualized

graph TD
    A[Developer A's Local Machine] -->|Shares Workspace| B(VS Code Live Share)
    B --> C[Developer B]
    A -->|Contains| D[.env with Production Secrets]
    D -.->|Exposed to| C
    style D fill:#ff4c4c,stroke:#333,stroke-width:2px
    style C fill:#f9f,stroke:#333,stroke-width:2px

As you can see, traditional sharing directly exposes the host's filesystem, including sensitive configuration files.


Enter Velocity: The Secure Cloud Workspace

Velocity reimagines remote development by decoupling the workspace from the local machine and centralizing it in a secure, isolated cloud environment. With Velocity, you aren't just sharing a screen or a local port; you are granting granular, role-based access to an ephemeral, cloud-hosted workspace.

Key Features of Velocity

  1. Browser-Based IDEs: Native integration with VS Code and Jupyter Lab, accessible directly from your browser. No local setup required.
  2. Zero-Trust Secret Management: Secrets are injected at runtime and are never accessible via the filesystem or standard output.
  3. Daytona Sandboxes: Under the hood, Velocity leverages Daytona's powerful sandboxing technology to ensure complete isolation between workspaces.
  4. Secure Repository Sharing: Share live access to specific repositories without giving access to the entire account or underlying infrastructure.

How Velocity Secures Your Secrets

Velocity employs a multi-layered approach to secret management. Instead of relying on .env files that live in the workspace, Velocity uses a secure vault that injects environment variables directly into the process memory of your application.

The Velocity Secret Flow

sequenceDiagram
    participant Dev as Developer
    participant VUI as Velocity UI
    participant Vault as Secret Vault
    participant Workspace as Velocity Workspace (Daytona Sandbox)
    
    Dev->>VUI: Defines Secrets (UI/CLI)
    VUI->>Vault: Encrypts and Stores Secrets
    Dev->>Workspace: Starts Workspace
    Workspace->>Vault: Requests Secrets (Runtime only)
    Vault-->>Workspace: Injects Secrets into Process Memory
    Note over Workspace: Filesystem never sees the secrets!

Code Snippet: Accessing Secrets Securely

When you write code in a Velocity workspace, you access environment variables just like you normally would. The magic happens behind the scenes.

// index.js (Running in a Velocity VS Code Workspace)
import express from 'express';
import { connectToDatabase } from './db.js';

const app = express();
const PORT = process.env.PORT || 3000;

// The DB_PASSWORD is injected at runtime and never stored in a .env file
const dbPassword = process.env.DB_PASSWORD;

if (!dbPassword) {
  console.error("CRITICAL: Database password is missing. Halting execution.");
  process.exit(1);
}

connectToDatabase(process.env.DB_USER, dbPassword)
  .then(() => {
    app.listen(PORT, () => {
      console.log(`Server is running securely on port ${PORT}`);
    });
  })
  .catch((error) => {
    console.error("Failed to connect to database:", error);
  });

Because the secrets are injected into the process memory, a collaborator joining your live session can run and debug the code without ever being able to read the raw DB_PASSWORD value.


Live Collaboration in VS Code & Jupyter Lab

Velocity seamlessly integrates both VS Code and Jupyter Lab into your browser. This dual-environment setup is perfect for cross-functional teams comprising software engineers and data scientists.

VS Code in the Browser

Imagine having the full power of VS Code—complete with extensions, integrated terminal, and debugging tools—running in a high-performance cloud instance.

  • Pair Programming: Invite a colleague to your workspace with a single click. They join instantly via their browser.
  • Granular Permissions: Assign "Read-Only", "Edit", or "Full Access" roles to collaborators. If they have "Edit" access, they can write code but cannot access the terminal or environment variables.

Jupyter Lab in the Browser

Data scientists often deal with sensitive datasets and credentials for data warehouses (like Snowflake or BigQuery).

  • Secure Data Exploration: Run Jupyter notebooks in an isolated environment where the data never leaves the cloud.
  • Collaborative Notebooks: Edit the same notebook simultaneously with your team, seeing their cursors in real-time.
# analysis.ipynb (Running in a Velocity Jupyter Workspace)
import pandas as pd
import os
from velocity_auth import get_secure_client

# Access BigQuery without exposing the service account key
bq_client = get_secure_client('bigquery')

query = """
    SELECT user_id, total_spent 
    FROM `secure-project.ecommerce.transactions`
    WHERE transaction_date >= '2026-01-01'
"""

# The query executes securely using the injected credentials
df = bq_client.query(query).to_dataframe()

df.describe()

Under the Hood: Daytona Sandboxes

To guarantee absolute security and performance, Velocity partners with Daytona to provide enterprise-grade sandboxing. Every workspace is spun up in an isolated, ephemeral container that is physically separated from other tenants.

Why Daytona?

  1. Instant Startup: Workspaces boot in seconds, not minutes.
  2. Resource Limits: Strict CPU and RAM quotas prevent noisy neighbor problems.
  3. Network Isolation: Workspaces cannot communicate with each other unless explicitly allowed.

When you close a Velocity workspace, the Daytona sandbox is gracefully terminated, and all ephemeral data is securely wiped. Only the committed code and explicitly saved state are preserved.


Benchmarks: Velocity vs. Traditional Local Development

Let's look at the numbers. We ran a series of benchmarks comparing a standard local development setup (MacBook Pro M3 Max) against a Velocity Cloud Workspace (16 vCPU, 32GB RAM).

TaskLocal (M3 Max)Velocity Cloud WorkspaceImprovement
npm install (Large Monorepo)42s18s2.3x Faster
Docker Build (Next.js App)55s21s2.6x Faster
Rust Project Compilation120s45s2.6x Faster
Initial Workspace LoadN/A< 5sInstant

Because Velocity environments sit on a massive cloud backbone, network-intensive tasks like downloading dependencies or pulling Docker images happen at blazing speeds.


The Competitive Landscape: Pricing and Features

How does Velocity stack up against the competition? Let's compare Velocity with GitHub Codespaces, Replit, and standalone Daytona.

Feature Comparison

FeatureVelocityGitHub CodespacesReplitDaytona (Self-Hosted)
VS Code in Browser✅ Yes✅ Yes❌ No (Custom IDE)✅ Yes
Jupyter Lab in Browser✅ Yes🟡 Partial❌ No✅ Yes
Zero-Trust Secret Injection✅ Yes❌ No (Exposed as env vars)❌ No (Replit Secrets are visible)🟡 Depends on setup
Granular Collaboration Roles✅ Yes❌ No (All or nothing)✅ Yes❌ No
Underlying TechDaytona SandboxesCustom VMsCustom ContainersDevcontainers

Pricing Comparison

Velocity offers a compelling pricing structure designed for both individual developers and enterprise teams.

PlanVelocityGitHub CodespacesReplit
Free Tier50 hours/month60 hours/monthLimited resources
Pro / Team$15/user/moPay-as-you-go (~$36/mo for 4 core)$20/user/mo
EnterpriseCustomCustomCustom

Velocity not only provides superior security features but also offers a predictable, flat-rate pricing model that CFOs love. No more surprise cloud bills at the end of the month.


Secure Repository Sharing

Another powerful feature of Velocity is the ability to securely share specific repositories with external contractors or freelancers.

Instead of adding a contractor to your GitHub organization (which might grant them more access than intended), you can invite them directly to a Velocity workspace.

  1. You create a Velocity workspace linked to your private repository.
  2. You invite the contractor via email, granting them "Edit" access.
  3. The contractor logs in, writes code in the browser, and submits a PR.
  4. They never clone the repository to their local machine.
  5. They never see your production environment variables.

This workflow drastically reduces the onboarding time for new developers and ensures that your intellectual property remains securely in the cloud.


Conclusion: The Future of Collaboration is Secure and Cloud-Native

The days of saying "It works on my machine" and "Don't look at my .env file" are over. By adopting a cloud-native development environment like Velocity, teams can unlock unprecedented levels of collaboration without compromising on security.

With browser-based VS Code and Jupyter Lab, zero-trust secret management, Daytona-powered sandboxes, and blazing-fast performance, Velocity is the ultimate platform for modern software engineering teams.

Ready to transform how your team collaborates? Sign up for Velocity today and get your first 50 hours free.


Written by the Velocity Engineering Team. We are passionate about building tools that empower developers to write better code, securely.