marvin cb87541151
CI / build (pull_request) Successful in 11s
fix: validate image name before building registry path
The user-supplied image/name argument was interpolated unsanitized into
registry/{name}/initrd, so a name containing '../' (e.g. 'slim run
../../.ssh/authorized_keys') escaped the XDG data dir and let slim
create directories and read/write files at attacker-chosen locations.

validate_image_name now rejects empty names, '.', '..' and anything
outside [A-Za-z0-9._:-] at the registry_dir chokepoint used by both
build and run, plus a defense-in-depth containment check that the
resolved path stays under the registry root.

Fixes sec-2 from the code review.
2026-08-26 20:10:32 +00:00
S
Description
Turn container images into bootable VMs
251 KiB
Languages
Rust 75.1%
Shell 24.7%
Dockerfile 0.2%