Build App (Preview) / compute-version (pull_request) Successful in 3s
Build App (Preview) / create-release (pull_request) Successful in 1s
Build App (Preview) / build-macos (pull_request) Successful in 2m37s
Build App (Preview) / build-linux (pull_request) Successful in 5m30s
Build App (Preview) / build-windows (pull_request) Successful in 5m55s
Build App (Preview) / prune-previews (pull_request) Successful in 3s
Review caught that the device guard was wired to the wrong call. The
daemon does not resolve `--device` at create: verified against Docker
29.7, `docker create --device /dev/does-not-exist` succeeds and prints an
id, and runc only resolves the device — and validates sysctls — when it
builds the container. So on a host with no tun module the create returns
fine and `start` fails, which means the explanation never ran and the
user saw the raw daemon string naming a path they would go looking for on
the wrong machine. The unit tests fed the create-side string straight in,
so they confirmed a function no real failure could reach.
Move the guard onto `start_container`, covering create as well in case a
future daemon checks earlier. It no longer takes `vpn_support_enabled` —
`start_container` has a container id and no project, and nothing else in
Triple-C ever requests a device, so an error naming /dev/net/tun is
unambiguous on its own. The test now uses the daemon's verbatim message
via bollard's real Display format.
Also from review:
* Soften the security claim. Docker does not enable user-namespace
remapping by default, so this is a real CAP_NET_ADMIN in the initial
user namespace with only the network namespace confining it. It
cannot touch host interfaces, but "confers no authority outside the
container" was too strong: within its namespace it can set
promiscuous mode and add addresses, routes and NAT on the shared
docker0 segment, which puts sibling containers — the LiteLLM gateway
among them — within ARP-spoofing reach, and it can flush netfilter
rules sandbox mode may rely on. Said plainly in the code, CLAUDE.md
and HOW-TO-USE.
* Drop Tailscale from the list of clients needing this. Its
--tun=userspace-networking mode needs neither the capability nor the
device, and listing it invites granting NET_ADMIN for nothing.
* Say in the toggle's own hint that changing it recreates the
container, matching how every other recreation-triggering setting is
labelled. The tab's generic "stop the container first" chip does not
tell the user what is about to happen.
* Add RuntimeSection tests: saves on, saves off explicitly rather than
dropping the key, reflects state, is disabled while running, and
carries the recreation warning.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
117 lines
4.1 KiB
TypeScript
117 lines
4.1 KiB
TypeScript
import type { Project } from "../../../../lib/types";
|
|
import Toggle from "../../../ui/Toggle";
|
|
import { ConfigGroup, SwitchRow } from "../../../ui/Field";
|
|
import PermissionModeControl, { permissionModePatch } from "../../PermissionModeControl";
|
|
import ClaudeInstructionsEditor from "../../ClaudeInstructionsEditor";
|
|
import ClaudeCodeSettingsEditor from "../../ClaudeCodeSettingsEditor";
|
|
|
|
interface Props {
|
|
project: Project;
|
|
save: (patch: Partial<Project>) => Promise<boolean>;
|
|
disabled: boolean;
|
|
disabledReason?: string;
|
|
}
|
|
|
|
export default function RuntimeSection({
|
|
project,
|
|
save,
|
|
disabled,
|
|
disabledReason,
|
|
}: Props) {
|
|
return (
|
|
<>
|
|
<ConfigGroup
|
|
title="Runtime"
|
|
description="How much the sandbox lets Claude do, and what contains it."
|
|
>
|
|
<div className="pb-2 border-b border-[var(--border-color)]">
|
|
<PermissionModeControl
|
|
project={project}
|
|
onChange={(mode) => save(permissionModePatch(mode))}
|
|
/>
|
|
</div>
|
|
|
|
<SwitchRow
|
|
label="Sandbox mode"
|
|
hint="Claude Code's bash sandbox (bubblewrap filesystem and network isolation). Triple-C is the source of truth: toggling this overrides any manual /sandbox configuration in the container's settings.json on next start."
|
|
control={
|
|
<Toggle
|
|
label="Sandbox mode"
|
|
checked={project.sandbox_mode_enabled}
|
|
disabled={disabled}
|
|
onChange={(v) => save({ sandbox_mode_enabled: v })}
|
|
/>
|
|
}
|
|
/>
|
|
|
|
<SwitchRow
|
|
label="Allow container spawning"
|
|
hint="Mounts the Docker socket so Claude can build and run Docker containers from inside the sandbox."
|
|
control={
|
|
<Toggle
|
|
label="Allow container spawning"
|
|
checked={project.allow_docker_access}
|
|
disabled={disabled}
|
|
onChange={(v) => save({ allow_docker_access: v })}
|
|
/>
|
|
}
|
|
/>
|
|
|
|
<SwitchRow
|
|
label="VPN support"
|
|
hint="Grants NET_ADMIN and the /dev/net/tun device so a VPN client (PIA, WireGuard, OpenVPN) can build a tunnel inside the container. Without it a client installs and runs but its connection hangs until it times out. Anything in the container can then reconfigure the container's own network stack; the host's is untouched. Changing this recreates the container on its next start — the home and .claude volumes are preserved."
|
|
control={
|
|
<Toggle
|
|
label="VPN support"
|
|
checked={project.vpn_support_enabled}
|
|
disabled={disabled}
|
|
onChange={(v) => save({ vpn_support_enabled: v })}
|
|
/>
|
|
}
|
|
/>
|
|
|
|
<SwitchRow
|
|
label="Mission Control"
|
|
hint="A web dashboard for monitoring and managing Claude sessions remotely."
|
|
control={
|
|
<Toggle
|
|
label="Mission Control"
|
|
checked={project.mission_control_enabled}
|
|
disabled={disabled}
|
|
onChange={(v) => save({ mission_control_enabled: v })}
|
|
/>
|
|
}
|
|
/>
|
|
|
|
{disabled && disabledReason && (
|
|
<p className="text-xs text-[var(--text-disabled)]">{disabledReason}</p>
|
|
)}
|
|
</ConfigGroup>
|
|
|
|
<ConfigGroup
|
|
title="Claude instructions"
|
|
description="Written to ~/.claude/CLAUDE.md inside this project's container."
|
|
>
|
|
<ClaudeInstructionsEditor
|
|
instructions={project.claude_instructions ?? ""}
|
|
disabled={disabled}
|
|
disabledReason={disabledReason}
|
|
onSave={(value) => save({ claude_instructions: value || null })}
|
|
/>
|
|
</ConfigGroup>
|
|
|
|
<ConfigGroup
|
|
title="Claude Code settings"
|
|
description="Per-project CLI behaviour. These override the global defaults in Settings."
|
|
>
|
|
<ClaudeCodeSettingsEditor
|
|
settings={project.claude_code_settings}
|
|
disabled={disabled}
|
|
disabledReason={disabledReason}
|
|
onSave={(settings) => save({ claude_code_settings: settings })}
|
|
/>
|
|
</ConfigGroup>
|
|
</>
|
|
);
|
|
}
|