mxc
mxc copied to clipboard
WSLC: workloads run as root in the container; can they run as non-root?
Description of the new feature / enhancement
In the WSLC backend the workload runs as uid 0 inside the container:
python3 -c "import os; print('uid', os.getuid())"
uid 0
Only the granted host folder is mounted, so the host is still protected, but root inside the container is more privilege than a typical tool call needs, and security reviews usually flag it. Is root intended? If so, a short note in the WSLC guide would help. If not, an option to run as a non-root user (or a non-root default) would be useful.
Seen on MXC 1.0.0 and 1.0.1, image python:3.12-alpine, Windows 11 26300.9711.
Proposed technical implementation details
For example a wslc.user field (uid[:gid] or name) passed to the container runtime, defaulting to the image's
USER or to a non-root uid.