Explicit sandbox configuration for workspace operations.
Describes allowed/blocked paths, resource limits, shell access, and timeouts. When provided, this config is validated at startup and enforced by the runner.
'''Phase 1:''' Config structure, validation, and documentation. '''Phase 2:''' Enforcement in runner and tools. '''Phase 3:''' Advanced policies (profiles, allowlists).
Value parameters
- allowedCommands
-
Set of bare executable names permitted by executeCommand. Defaults to WorkspaceSandboxConfig.ReadOnlyCommands. Use WorkspaceSandboxConfig.ReadWriteCommands to also permit write-capable commands (cp, mv, rm, mkdir, …). Held to the checks
WORKSPACE_EXTRA_COMMANDSgets (#3064): bare names, no batch file, nothing on WorkspaceSandboxConfig.NeverAllowedCommands unless also intrustedLaunchers. - allowedPaths
-
If non-empty, only these paths are accessible; if empty, whole workspace
- defaultCommandTimeout
-
Default timeout for shell commands (more than zero, at most an hour)
- excludePatterns
-
Glob patterns for paths to exclude from explore/search (e.g. node_modules, .git)
- inheritedVariables
-
Names of the runner's environment variables a command also inherits, besides the fixed list (
PATH,HOME, the locale, ...) (#3064):SBT_OPTS,COURSIER_CACHE.ContainerisedWorkspacepasses each into the container (docker run -e NAME) from its own process's environment. Never aLD_orDYLD_loader variable, nor anLLM4S_one (the runner's own, its token among them) - limits
-
Resource limits (file size, directory entries, search results, output size)
- maxConcurrentCommands
-
The most commands that run at once (#3064); one more waits at the command gate, then is refused
WORKSPACE_BUSY.None, the default, is no cap - networkAllowed
-
Whether commands may open network sockets; on Linux the runner enforces it (design §4.39)
- readExecPaths
-
Absolute directories outside the workspace that a confined command may also read and execute from, besides the system ones (
/usr,/opt, ...): a toolchain under/nixor/snap, which aPATHentry resolves but Landlock would refuse (exit 126) (#3064). Never/, nor a path holding..; a grant over the workspace, or over the runner's own temporary directories, is dropped by the runner. Read and execute only: nothing there becomes writable - readOnlyPaths
-
Paths under workspace root that are read-only (writes denied)
- shellAllowed
-
Whether
executeCommandis allowed (false = read-only file ops only) - trustedLaunchers
-
Programs on WorkspaceSandboxConfig.NeverAllowedCommands - interpreters and launchers, each of which runs any code it is given - that
allowedCommandsmay name anyway: an operator's explicit opt-in, as for a workspace that must runjava. Naming one makes the allowlist no bound on what commands run; confinement (paths, network) still applies. Empty by default; never read fromWORKSPACE_EXTRA_COMMANDS.
Attributes
- Companion
- object
- Source
- WorkspaceSandboxConfig.scala
- Graph
-
- Supertypes
