Skip to content

Restrict OCI bind-mount sources to configured directories and check the launch command username - #9010

Open
reiabreu wants to merge 2 commits into
masterfrom
worker-launcher-oci-mount-sources
Open

Restrict OCI bind-mount sources to configured directories and check the launch command username#9010
reiabreu wants to merge 2 commits into
masterfrom
worker-launcher-oci-mount-sources

Conversation

@reiabreu

Copy link
Copy Markdown
Contributor

run-oci-container parses the launch command file before setup_dir_permissions changes the worker directory's ownership, and requires the command file's username to match the user passed to the worker-launcher. run_oci_container now takes the parsed oci_launch_cmd, which main owns and frees. Bind-mount sources must be absolute paths with no "." or ".." component, equal to or under a directory listed in the new worker.launcher.oci.allowed.mount.source.dirs config key; if none are configured, all sources are rejected.

How this was tested

Built the worker-launcher native tree with autoreconf -i && ./configure && make check (autotools, compiled with -Werror); the test suite passes. Adds test_mount_path_helpers and test_mount_source_allowed_dirs.

…he launch command username

run-oci-container parses the launch command file before setup_dir_permissions
changes the worker directory's ownership, and requires the command file's
username to match the user passed to the worker-launcher. run_oci_container now
takes the parsed oci_launch_cmd, which main owns and frees. Bind-mount sources
must be absolute paths with no "." or ".." component, equal to or under a
directory listed in the new worker.launcher.oci.allowed.mount.source.dirs
config key; if none are configured, all sources are rejected. Adds
test_mount_path_helpers and test_mount_source_allowed_dirs.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Adds an OCI-support.md section describing
worker.launcher.oci.allowed.mount.source.dirs (set in worker-launcher.cfg):
OCI/runc bind-mount sources must be equal to or under one of the configured
directories, and OCI workers do not start when it is unset.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@rzo1 rzo1 added this to the 3.1.0 milestone Aug 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants