memory-bank/components/workspacekit.md
Workspacekit is a critical component in Gitpod that manages the container setup and namespace isolation for workspaces. It serves as the initialization system for workspace containers, setting up the necessary namespaces, mounts, and security configurations to provide a secure and isolated environment for user code execution.
The primary purposes of the Workspacekit component are:
Workspacekit implements a multi-ring security architecture:
This ring-based architecture provides defense in depth, ensuring that even if a vulnerability is exploited in the innermost ring, additional security boundaries must be crossed to gain access to the host system.
Workspacekit integrates with:
The component implements several security measures:
Workspacekit can be configured through environment variables:
GITPOD_WORKSPACE_ID: Workspace identifierWORKSPACEKIT_FSSHIFT: Filesystem shift method (e.g., SHIFTFS)GITPOD_WORKSPACEKIT_BIND_MOUNTS: Additional bind mountsWORKSPACEKIT_RING2_ENCLAVE: Commands to run in the Ring2 namespaceGITPOD_WORKSPACEKIT_SUPERVISOR_PATH: Path to the supervisor binaryGITPOD_RLIMIT_CORE: Core dump size limitsGITPOD_WORKSPACEKIT_SLEEP_FOR_DEBUGGING: Enable debugging sleepcomponents/common-go: Common Go utilitiescomponents/content-service-api: Content service API definitionscomponents/ws-daemon-api: Workspace daemon API definitionsWorkspacekit is typically used to: