fix(vault): canonicalize + allowed-root containment on provision target (#92) #119
Loading…
Add table
Reference in a new issue
No description provided.
Delete branch "fix/vault-provision-containment"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Implements #92.
PR #91's registered-vs-spawned root check is string-equality, so it misses
.., symlinks, and roots pointing outside the jails tree. This adds a real containment guard incolibri-vault::provision(the layer that writes the.env):create_dir_all, canonicalize the target (resolving../symlinks) and assert it is strictly under the allowed jail-root base; refuse otherwise./usr/local/bastille/jails; override withCOLIBRI_JAIL_ROOT_BASEfor Linux/Docker volume roots.TargetEscapesRoot); the spawn hook already treats provision errors as fail-soft.Tests cover child-accepted, base-itself / nonexistent /
..-escape / symlink-escape refused. fmt + clippy--all-targetsclean;cargo test --workspace230 passed / 0 failed.Closes #92.
🤖 Generated with Claude Code